drm/amd/pm: fix the return value of pm message
Subsystems (3)
PATCH 1/1 drm/amd/pm: fix the return value of pm message
0 should be right driver return value, 0x1 is the right firmware return value. So switch to 0 at last.
--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +1 -0
@@ -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;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: Huang, Ray <[email protected]>
Sent: 2021年1月12日 18:25
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Liu, Aaron <[email protected]>; Du, Xiaojian <[email protected]>; Hou, Xiaomeng (Matthew) <[email protected]>; Quan, Evan <[email protected]>; Huang, Ray <[email protected]>
Subject: [PATCH] drm/amd/pm: fix the return value of pm message
0 should be right driver return value, 0x1 is the right firmware return value. So switch to 0 at last.
--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +1 -0
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[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 <[email protected]> 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
Best Regards
Kenneth
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Huang Rui
Sent: Tuesday, January 12, 2021 6:25 PM
To: [email protected]
Cc: Du, Xiaojian <[email protected]>; Huang, Ray <[email protected]>; Liu, Aaron <[email protected]>; Hou, Xiaomeng (Matthew) <[email protected]>; Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>
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.
--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +1 -0
@@ -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
[email protected]
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines · Kenneth
[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?
We perfer to print firmware return values like below:
#define SMC_Status_BUSY 0x0 #define SMC_Result_OK 0x1 #define SMC_Result_Failed 0xFF #define SMC_Result_UnknownCmd 0xFE #define SMC_Result_CmdRejectedPrereq 0xFD #define SMC_Result_CmdRejectedBusy 0xFC
dev_err(adev->dev, "failed send message: %10s (%d) \tparam: 0x%08x response %#x\n",
smu_get_message_name(smu, msg),
index, param, ret);-EIO is not very useful on debugging.
Thanks,
Ray
Quoted 49 lines
Thanks.
commit72a33b4b7433780df5334f9cfb23ff51669431a0Author: Huang Rui <[email protected]> Date: Fri Jan 8 16:27:15 2021 +0800drm/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 <[email protected]>Reviewed-by Evan Quan <[email protected]>Best Regards
Kenneth-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Huang Rui
Sent: Tuesday, January 12, 2021 6:25 PM
To: [email protected]
Cc: Du, Xiaojian <[email protected]>; Huang, Ray <[email protected]>; Liu, Aaron <[email protected]>; Hou, Xiaomeng (Matthew) <[email protected]>; Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amd/pm: fix the return value of pm message[CAUTION: External Email]
0 should be right driver return value,
0x1is the right firmware return value. So switch to 0 at last.Signed-off-by Huang Rui <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +1
-1@@ -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
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx