Commit 135d4735 authored by Leo Liu's avatar Leo Liu Committed by Alex Deucher

drm/amdgpu: add a ring func for end command

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
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 c773a632
...@@ -222,6 +222,9 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, ...@@ -222,6 +222,9 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
return r; return r;
} }
if (ring->funcs->insert_end)
ring->funcs->insert_end(ring);
/* wrap the last IB with fence */ /* wrap the last IB with fence */
if (job && job->uf_addr) { if (job && job->uf_addr) {
amdgpu_ring_emit_fence(ring, job->uf_addr, job->uf_sequence, amdgpu_ring_emit_fence(ring, job->uf_addr, job->uf_sequence,
......
...@@ -127,6 +127,7 @@ struct amdgpu_ring_funcs { ...@@ -127,6 +127,7 @@ struct amdgpu_ring_funcs {
int (*test_ib)(struct amdgpu_ring *ring, long timeout); int (*test_ib)(struct amdgpu_ring *ring, long timeout);
/* insert NOP packets */ /* insert NOP packets */
void (*insert_nop)(struct amdgpu_ring *ring, uint32_t count); void (*insert_nop)(struct amdgpu_ring *ring, uint32_t count);
void (*insert_end)(struct amdgpu_ring *ring);
/* pad the indirect buffer to the necessary number of dw */ /* pad the indirect buffer to the necessary number of dw */
void (*pad_ib)(struct amdgpu_ring *ring, struct amdgpu_ib *ib); void (*pad_ib)(struct amdgpu_ring *ring, struct amdgpu_ib *ib);
unsigned (*init_cond_exec)(struct amdgpu_ring *ring); unsigned (*init_cond_exec)(struct amdgpu_ring *ring);
......
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