Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <Hawking.Zhang@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rex Zhu and committed by
Alex Deucher
dfc98479 6f298bd8

+6
+6
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
··· 266 266 bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid, 267 267 struct dma_fence *fence); 268 268 269 + static inline void amdgpu_ring_set_preempt_cond_exec(struct amdgpu_ring *ring, 270 + bool cond_exec) 271 + { 272 + *ring->cond_exe_cpu_addr = cond_exec; 273 + } 274 + 269 275 static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring) 270 276 { 271 277 int i = 0;