Change-Id: Ibef63da7a4725651065fd316385c8521ec31897b
Signed-off-by: Rex Zhu <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c    | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 5bb88aa..f105116 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1493,7 +1493,8 @@ static int amdgpu_device_ip_fini(struct amdgpu_device 
*adev)
                        continue;
 
                if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
-                       adev->ip_blocks[i].version->type != 
AMD_IP_BLOCK_TYPE_VCE) {
+                       adev->ip_blocks[i].version->type != 
AMD_IP_BLOCK_TYPE_VCE &&
+                       
adev->ip_blocks[i].version->funcs->set_clockgating_state) {
                        /* ungate blocks before hw fini so that we can shutdown 
the blocks safely */
                        r = 
adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
                                                                                
     AMD_CG_STATE_UNGATE);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 11dfe57..3a5ca46 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -259,6 +259,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
                        }
                }
                kfree(adev->irq.client[i].sources);
+               adev->irq.client[i].sources = NULL;
        }
 }
 
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to