drm/amdgpu: set completion status as preempted for the resubmission
authorJiadong Zhu <Jiadong.Zhu@amd.com>
Wed, 26 Jul 2023 07:21:48 +0000 (15:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jul 2023 19:04:19 +0000 (15:04 -0400)
commit8cbbd11547f61b90b33a4ef70c4614eb2e789c49
treee128b747f8696cdb3c0722e70bf3b411b0f63c42
parentdb996e64b293a3452cd26f5de22004f3d26f215f
drm/amdgpu: set completion status as preempted for the resubmission

The driver's CSA buffer is shared by all the ibs. When the high priority ib
is submitted after the preempted ib, CP overrides the ib_completion_status
as completed in the csa buffer. After that the preempted ib is resubmitted,
CP would clear some locals stored for ib resume when reading the completed
status, which causes gpu hang in some cases.

Always set status as preempted for those resubmitted ib instead of reading
everything from the CSA buffer.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2535
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2717
Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c