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

drm/amdgpu: fix ring timeout issue in gfx10 sr-iov environment

commit 26c95e838e63 ("drm/amdgpu: set the VM pointer to NULL in
amdgpu_job_prepare") set job->vm as NULL if there is no fence. It will
cause emit switch buffer be skippen if job->vm set as NULL.

Check job rather than vm could solve this problem.

Fixes: 26c95e838e63 ("drm/amdgpu: set the VM pointer to NULL in amdgpu_job_prepare")
Signed-off-by: Lin.Cao <lincao12@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lin.Cao and committed by
Alex Deucher
b5290939 1bf06a1f

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
··· 297 297 amdgpu_ring_patch_cond_exec(ring, cond_exec); 298 298 299 299 ring->current_ctx = fence_ctx; 300 - if (vm && ring->funcs->emit_switch_buffer) 300 + if (job && ring->funcs->emit_switch_buffer) 301 301 amdgpu_ring_emit_switch_buffer(ring); 302 302 303 303 if (ring->funcs->emit_wave_limit &&