[PATCH] drm/amd/pm: fix the return value of pm message

Feng, Kenneth Kenneth.Feng at amd.com
Wed Jan 13 01:45:31 UTC 2021


[AMD Official Use Only - Internal Distribution Only]

This can fix the problem of the below commit.
But I'm not sure what is the real purpose of the below commit. Or can we revert it?
Thanks.
commit 72a33b4b7433780df5334f9cfb23ff51669431a0
Author: Huang Rui <ray.huang at amd.com>
Date:   Fri Jan 8 16:27:15 2021 +0800

    drm/amd/pm: enhance the real response for smu message (v2)

    The user prefers to know the real response value from C2PMSG 90 register
    which is written by firmware not -EIO.

    v2: return C2PMSG 90 value

    Signed-off-by: Huang Rui <ray.huang at amd.com>
    Reviewed-by: Evan Quan <evan.quan at amd.com>

Best Regards
Kenneth

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Huang Rui
Sent: Tuesday, January 12, 2021 6:25 PM
To: amd-gfx at lists.freedesktop.org
Cc: Du, Xiaojian <Xiaojian.Du at amd.com>; Huang, Ray <Ray.Huang at amd.com>; Liu, Aaron <Aaron.Liu at amd.com>; Hou, Xiaomeng (Matthew) <Xiaomeng.Hou at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Quan, Evan <Evan.Quan at amd.com>
Subject: [PATCH] drm/amd/pm: fix the return value of pm message

[CAUTION: External Email]

0 should be right driver return value, 0x1 is the right firmware return value. So switch to 0 at last.

Signed-off-by: Huang Rui <ray.huang at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index d7d86fd79e1f..41d5c65a2f21 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -149,6 +149,7 @@ int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,
        if (read_arg)
                smu_cmn_read_arg(smu, read_arg);

+       ret = 0; /* 0 as driver return value */
 out:
        mutex_unlock(&smu->message_lock);
        return ret;
--
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CKenneth.Feng%40amd.com%7Ccb87272dd89a4b4a6bef08d8b6e463fc%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637460439339749600%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Hzm73NA1Y%2FSS3plnWpZ%2BcOxyIvEnySRBTTUV5%2FV6Lxo%3D&reserved=0


More information about the amd-gfx mailing list