diff options
author | Xiaojie Yuan <[email protected]> | 2019-04-19 18:44:18 +0800 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2019-06-21 18:59:28 -0500 |
commit | c39f3da4e246c84af6272c18ff00353c221d74b1 (patch) | |
tree | fe47fe11cece7f30a73727667c5cfdcef0941d19 | |
parent | ec171a93020206027a2dba32c4f1e22314439c49 (diff) |
drm/amdgpu/gfx10: fix unbalanced MAP/UNMAP_QUEUES when async_gfx_ring is disabled
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 <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Reviewed-by: Jack Xiao <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 10 |
1 files 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 01b3f4ae6aaa..f9ad98889c7d 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c @@ -3540,7 +3540,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; @@ -3589,12 +3589,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"); |