drm/amdgpu: dequeue mes scheduler during fini
Subsystems (2)
PATCH 1/1 drm/amdgpu: dequeue mes scheduler during fini
[Why]
If mes is not dequeued during fini, mes will be in an uncleaned state during reload, then mes couldn't receive some commands which leads to reload failure.
[How]
Perform MES dequeue via MMIO after all the unmap jobs are done by mes and before kiq fini.
Signed-off-by YuBiao Wang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 3 ++ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 ++ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 47 +++++++++++++++++++++++-- 3 files changed, 50 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h +3 -0
@@ -130,6 +130,9 @@ struct amdgpu_mes {int (*kiq_hw_init)(struct amdgpu_device *adev);int (*kiq_hw_fini)(struct amdgpu_device *adev); +/* dequeue sched pipe via kiq */ +void (*kiq_dequeue_sched)(struct amdgpu_device *adev); +/* ip specific functions */ const struct amdgpu_mes_funcs *funcs; };
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +3 -0
@@ -4406,6 +4406,9 @@ static int gfx_v11_0_hw_fini(void *handle)if (amdgpu_gfx_disable_kcq (adev))DRM_ERROR ("KCQ disable failed\n" ); +if (adev->mes.ring.sched.ready && adev->mes.kiq_dequeue_sched) + adev->mes.kiq_dequeue_sched (adev); +amdgpu_mes_kiq_hw_fini (adev); }
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +44 -3
71 lines not on this page · raw message
Signature · 1 line
2.25.1