From: Rex Zhu Date: Mon, 8 Oct 2018 06:55:42 +0000 (+0800) Subject: drm/amdgpu: Add helper function amdgpu_ring_set_preempt_cond_exec X-Git-Tag: v5.3-rc1~81^2~10^2~380 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=dfc9847956d55cdd1111711e2a3d9901967b4368;p=linux.git drm/amdgpu: Add helper function amdgpu_ring_set_preempt_cond_exec can preempt the ring by setting cond_exec to false Acked-by: Hawking Zhang Signed-off-by: Rex Zhu Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h index cdddce938bf5..764bf851c1df 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h @@ -266,6 +266,12 @@ void amdgpu_ring_emit_reg_write_reg_wait_helper(struct amdgpu_ring *ring, bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid, struct dma_fence *fence); +static inline void amdgpu_ring_set_preempt_cond_exec(struct amdgpu_ring *ring, + bool cond_exec) +{ + *ring->cond_exe_cpu_addr = cond_exec; +} + static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring) { int i = 0;