[PATCH] drm/amdgpu/pm: skip the power source check on smu v14.0.2/3

Wang, Yang(Kevin) KevinYang.Wang at amd.com
Tue Nov 19 05:58:35 UTC 2024


[AMD Official Use Only - AMD Internal Distribution Only]

-----Original Message-----
From: Kenneth Feng <kenneth.feng at amd.com>
Sent: Tuesday, November 19, 2024 13:48
To: amd-gfx at lists.freedesktop.org
Cc: Wang, Yang(Kevin) <KevinYang.Wang at amd.com>; Feng, Kenneth <Kenneth.Feng at amd.com>
Subject: [PATCH] drm/amdgpu/pm: skip the power source check on smu v14.0.2/3

skip the power source check on smu v14.0.2/3

Signed-off-by: Kenneth Feng <kenneth.feng at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c
index 5460f8e62264..b60837bd259f 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c
@@ -1365,6 +1365,10 @@ int smu_v14_0_set_power_source(struct smu_context *smu,  {
        int pwr_source;

+       if ((amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(14, 0, 2)) ||
+           (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(14, 0, 3)))
+               return 0;
+
[kevin]:

I prefer to implement a new callback function in smu_v14_0_2_ppt.c source file, to avoid add version check in IP level source code.

Best Regards,
Kevin

        pwr_source = smu_cmn_to_asic_specific_index(smu,
                                                    CMN2ASIC_MAPPING_PWR,
                                                    (uint32_t)power_src);
--
2.34.1



More information about the amd-gfx mailing list