[PATCH 20/22] drm/amd/pm: fix get dpm level count for smu13
Zhang, Yifan
Yifan1.Zhang at amd.com
Fri May 10 05:43:07 UTC 2024
[AMD Official Use Only - General]
Reviewed-by: Yifan Zhang <yifan1.zhang at amd.com>
Best Regards,
Yifan
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Jesse Zhang
Sent: Friday, May 10, 2024 10:51 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>; Huang, Tim <Tim.Huang at amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>
Subject: [PATCH 20/22] drm/amd/pm: fix get dpm level count for smu13
For invalid clk types, return -EINVAL to check the return.
Signed-off-by: Jesse Zhang <Jesse.Zhang at amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
index 59854465d711..9c2c43bfed0b 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
@@ -643,7 +643,7 @@ static int smu_v13_0_5_get_dpm_level_count(struct smu_context *smu,
*count = clk_table->NumDfPstatesEnabled;
break;
default:
- break;
+ return -EINVAL;
}
return 0;
--
2.25.1
More information about the amd-gfx
mailing list