Commit a4c424c5 authored by Leo Liu's avatar Leo Liu Committed by Alex Deucher

drm/amdgpu: implement insert end ring function for vcn decode

Signed-off-by: default avatarLeo Liu <leo.liu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e7501c34
...@@ -505,6 +505,20 @@ static void vcn_v1_0_dec_ring_insert_start(struct amdgpu_ring *ring) ...@@ -505,6 +505,20 @@ static void vcn_v1_0_dec_ring_insert_start(struct amdgpu_ring *ring)
amdgpu_ring_write(ring, VCN_CMD_PACKET_START << 1); amdgpu_ring_write(ring, VCN_CMD_PACKET_START << 1);
} }
/**
* vcn_v1_0_dec_ring_insert_end - insert a end command
*
* @ring: amdgpu_ring pointer
*
* Write a end command to the ring.
*/
static void vcn_v1_0_dec_ring_insert_end(struct amdgpu_ring *ring)
{
amdgpu_ring_write(ring,
PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_GPCOM_VCPU_CMD), 0));
amdgpu_ring_write(ring, VCN_CMD_PACKET_END << 1);
}
/** /**
* vcn_v1_0_dec_ring_emit_fence - emit an fence & trap command * vcn_v1_0_dec_ring_emit_fence - emit an fence & trap command
* *
...@@ -701,7 +715,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = { ...@@ -701,7 +715,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = {
2 + /* vcn_v1_0_dec_ring_emit_hdp_invalidate */ 2 + /* vcn_v1_0_dec_ring_emit_hdp_invalidate */
34 * AMDGPU_MAX_VMHUBS + /* vcn_v1_0_dec_ring_emit_vm_flush */ 34 * AMDGPU_MAX_VMHUBS + /* vcn_v1_0_dec_ring_emit_vm_flush */
14 + 14 + /* vcn_v1_0_dec_ring_emit_fence x2 vm fence */ 14 + 14 + /* vcn_v1_0_dec_ring_emit_fence x2 vm fence */
4, 6,
.emit_ib_size = 8, /* vcn_v1_0_dec_ring_emit_ib */ .emit_ib_size = 8, /* vcn_v1_0_dec_ring_emit_ib */
.emit_ib = vcn_v1_0_dec_ring_emit_ib, .emit_ib = vcn_v1_0_dec_ring_emit_ib,
.emit_fence = vcn_v1_0_dec_ring_emit_fence, .emit_fence = vcn_v1_0_dec_ring_emit_fence,
...@@ -711,6 +725,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = { ...@@ -711,6 +725,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = {
.test_ib = amdgpu_vcn_dec_ring_test_ib, .test_ib = amdgpu_vcn_dec_ring_test_ib,
.insert_nop = amdgpu_ring_insert_nop, .insert_nop = amdgpu_ring_insert_nop,
.insert_start = vcn_v1_0_dec_ring_insert_start, .insert_start = vcn_v1_0_dec_ring_insert_start,
.insert_end = vcn_v1_0_dec_ring_insert_end,
.pad_ib = amdgpu_ring_generic_pad_ib, .pad_ib = amdgpu_ring_generic_pad_ib,
.begin_use = amdgpu_vcn_ring_begin_use, .begin_use = amdgpu_vcn_ring_begin_use,
.end_use = amdgpu_vcn_ring_end_use, .end_use = amdgpu_vcn_ring_end_use,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment