[PATCH Review 1/1] drm/amdgpu: adjust ip block suspend sequence on aldebaran to fix disable smu feature failure

Zhang, Hawking Hawking.Zhang at amd.com
Mon Nov 29 06:02:20 UTC 2021


[AMD Official Use Only]

Thanks for the quick turnaround. Please check my comments inline.

In addition, it might be better to shorten the commit tile to "adjust ip block add sequence on aldebaran", and add detailed information in commit message

Something like "to fix disable smu feature failure on aldebaran"

Regards,
Hawking

-----Original Message-----
From: Stanley.Yang <Stanley.Yang at amd.com>
Sent: Monday, November 29, 2021 13:56
To: amd-gfx at lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang at amd.com>; Clements, John <John.Clements at amd.com>; Zhou1, Tao <Tao.Zhou1 at amd.com>
Cc: Yang, Stanley <Stanley.Yang at amd.com>
Subject: [PATCH Review 1/1] drm/amdgpu: adjust ip block suspend sequence on aldebaran to fix disable smu feature failure

{
    [  578.019986] amdgpu 0000:23:00.0: amdgpu: GPU reset begin!
    [  583.245566] amdgpu 0000:23:00.0: amdgpu: Failed to disable smu features.
    [  583.245621] amdgpu 0000:23:00.0: amdgpu: Fail to disable dpm features!
    [  583.245639] [drm:amdgpu_device_ip_suspend_phase2 [amdgpu]] *ERROR* suspend of IP block <smu> failed -62
    [  583.248504] [drm] free PSP TMR buffer }

Signed-off-by: Stanley.Yang <Stanley.Yang at amd.com<mailto:Stanley.Yang at amd.com>>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 4e3669407518..364808f3607f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -1309,10 +1309,13 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
                }
        }

-       if (likely(adev->firmware.load_type == AMDGPU_FW_LOAD_PSP)) {
-               r = amdgpu_discovery_set_smu_ip_blocks(adev);
-               if (r)
-                       return r;
+       /* move add smu block after add smda block for aldebaran */
+       if (adev->ip_versions[MP1_HWIP][0] != IP_VERSION(13, 0 ,2)) {
+               if (likely(adev->firmware.load_type == AMDGPU_FW_LOAD_PSP)) {
[Hawking]: can we merge the condition with "&&"?

+                       r = amdgpu_discovery_set_smu_ip_blocks(adev);
+                       if (r)
+                               return r;
+               }
        }

        r = amdgpu_discovery_set_display_ip_blocks(adev);
@@ -1327,6 +1330,14 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
        if (r)
                return r;

+       if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0 ,2)) {
+               if (likely(adev->firmware.load_type == AMDGPU_FW_LOAD_PSP)) {
+                       r = amdgpu_discovery_set_smu_ip_blocks(adev);
+                       if (r)
+                               return r;
+               }
+       }
+
        if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&
            !amdgpu_sriov_vf(adev)) {
[Hawking]: can we merge the condition check with "||"
                r = amdgpu_discovery_set_smu_ip_blocks(adev);
--
2.17.1


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20211129/a03b101d/attachment-0001.htm>


More information about the amd-gfx mailing list