drm/amdgpu/pm: skip the power source check on smu v14.0.2/3
Subsystems (3)
Kenneth Feng
maintainerPATCH 1/1 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
--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +4 -0
@@ -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 ; + pwr_source =smu_cmn_to_asic_specific_index (smu,CMN2ASIC_MAPPING_PWR , (uint32_t )power_src);
Signature · 1 line
2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
-----Original Message-----
From: Kenneth Feng <[email protected]>
Sent: Tuesday, November 19, 2024 13:48
To: [email protected]
Cc: Wang, Yang(Kevin) <[email protected]>; Feng, Kenneth <[email protected]>
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
--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +4 -0
@@ -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
Quoted 12 lines · Kenneth Feng
skip the power source check on smu v14.0.2/3
Signed-off-by Kenneth Feng <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +0
-0
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c int smu_v14_0_set_power_source(struct smu_context *smu, · line 1371
Quoted 7 lines
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +4
-0@@ -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 ; +
.set_power_source = smu_v14_0_set_power_source
The right way is to set this to NULL or remove this line.
Thanks,
Lijo
Quoted 3 lines
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +0
-0pwr_source =smu_cmn_to_asic_specific_index (smu,CMN2ASIC_MAPPING_PWR , (uint32_t )power_src);