[PATCH 2/2] drm/amdgpu: Fix suspend hang on RV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Series is:

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

________________________________
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Quan, Evan <Evan.Quan at amd.com>
Sent: Tuesday, March 13, 2018 3:30:26 AM
To: Zhu, Rex; amd-gfx at lists.freedesktop.org
Cc: Zhu, Rex
Subject: RE: [PATCH 2/2] drm/amdgpu: Fix suspend hang on RV

Reviewed-by: Evan Quan <evan.quan at amd.com>

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Rex Zhu
Sent: Tuesday, March 13, 2018 3:01 PM
To: amd-gfx at lists.freedesktop.org
Cc: Zhu, Rex <Rex.Zhu at amd.com>
Subject: [PATCH 2/2] drm/amdgpu: Fix suspend hang on RV

1. ip_block's index should not compared to type.
2. Add null function point check

Change-Id: Idbef9e5c69beef631e1e18cbc6f8c40cfe44862c
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 62d2740..a5d6f6b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1572,7 +1572,8 @@ int amdgpu_device_ip_suspend(struct amdgpu_device *adev)
                 if (!adev->ip_blocks[i].status.valid)
                         continue;
                 /* ungate blocks so that suspend can properly shut them down */
-               if (i != AMD_IP_BLOCK_TYPE_SMC) {
+               if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_SMC
+                       && adev->ip_blocks[i].version->funcs->set_clockgating_state) {
                         r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
                                                                                      AMD_CG_STATE_UNGATE);
                         if (r) {
--
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180313/7e7716ed/attachment.html>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux