Skip to content

Commit

Permalink
drm/amdgpu: fix ring timeout issue in gfx10 sr-iov environment
Browse files Browse the repository at this point in the history
commit 26c95e8 ("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: 26c95e8 ("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>
  • Loading branch information
Lin.Cao authored and Alex Deucher committed Jan 24, 2025
1 parent 1bf06a1 commit b529093
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs,
amdgpu_ring_patch_cond_exec(ring, cond_exec);

ring->current_ctx = fence_ctx;
if (vm && ring->funcs->emit_switch_buffer)
if (job && ring->funcs->emit_switch_buffer)
amdgpu_ring_emit_switch_buffer(ring);

if (ring->funcs->emit_wave_limit &&
Expand Down

0 comments on commit b529093

Please sign in to comment.