From: Xiaojie Yuan <xiaojie.yuan@xxxxxxx> gfx_v10_0_kiq_enable_kgq() is called only when async_gfx_ring is enabled, so should gfx_v10_0_kiq_disable_kgq(). Signed-off-by: Xiaojie Yuan <xiaojie.yuan@xxxxxxx> Acked-by: Alex Deucher <alexander.deucher@xxxxxxx> Reviewed-by: Jack Xiao <Jack.Xiao@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index 6289d79e8b65..716467388c2d 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c @@ -3563,7 +3563,7 @@ static int gfx_v10_0_hw_init(void *handle) } #ifndef BRING_UP_DEBUG -static int gfx10_0_disable_kgq(struct amdgpu_device *adev) +static int gfx_v10_0_kiq_disable_kgq(struct amdgpu_device *adev) { struct amdgpu_kiq *kiq = &adev->gfx.kiq; struct amdgpu_ring *ring, *kiq_ring = &kiq->ring; @@ -3612,12 +3612,16 @@ static int gfx10_0_disable_kgq(struct amdgpu_device *adev) static int gfx_v10_0_hw_fini(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; + int r; amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0); amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0); #ifndef BRING_UP_DEBUG - if (gfx10_0_disable_kgq(adev)) - DRM_ERROR("KGQ disable failed\n"); + if (amdgpu_async_gfx_ring) { + r = gfx_v10_0_kiq_disable_kgq(adev); + if (r) + DRM_ERROR("KGQ disable failed\n"); + } #endif if (amdgpu_gfx_disable_kcq(adev)) DRM_ERROR("KCQ disable failed\n"); -- 2.20.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx