drm/amd/pm: make smu_set_temp_funcs() smu specific for smu v13.0.6
Subsystems (3)
PATCH 1/1 drm/amd/pm: make smu_set_temp_funcs() smu specific for smu v13.0.6
move smu_set_temp_funcs() into smu_v13.0.6 ppt.c file to keep same code layer in amdgpu_smu.c. (only set_ppt func in amdgpu_smu.c)
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 - drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 12 +++++++----- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h | 1 - 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -1
@@ -766,7 +766,6 @@ static int smu_set_funcs(struct amdgpu_device *adev)case IP_VERSION (13 ,0 ,14 ):case IP_VERSION (13 ,0 ,12 ):smu_v13_0_6_set_ppt_funcs (smu); -smu_v13_0_6_set_temp_funcs (smu);/* Enable pp_od_clk_voltage node */ smu->od_enabled = true;break ;
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +7 -5
@@ -3850,6 +3850,12 @@ static const struct aca_smu_funcs smu_v13_0_6_aca_smu_funcs = { .parse_error_code = aca_smu_parse_error_code, }; +static void smu_v13_0_6_set_temp_funcs (struct smu_context *smu) +{ + smu->smu_temp.temp_funcs = (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 ) + ==IP_VERSION (13 ,0 ,12 )) ? &smu_v13_0_12_temp_funcs :NULL ; +} +static const struct pptable_funcs smu_v13_0_6_ppt_funcs = {/* init dpm */ .get_allowed_feature_mask = smu_v13_0_6_get_allowed_feature_mask,
@@ -3921,12 +3927,8 @@ void smu_v13_0_6_set_ppt_funcs(struct smu_context *smu) smu->smc_driver_if_version =SMU13_0_6_DRIVER_IF_VERSION ; smu->smc_fw_caps |=SMU_FW_CAP_RAS_PRI ;smu_v13_0_set_smu_mailbox_registers (smu); +smu_v13_0_6_set_temp_funcs (smu);amdgpu_mca_smu_init_funcs (smu->adev, &smu_v13_0_6_mca_smu_funcs);amdgpu_aca_set_smu_funcs (smu->adev, &smu_v13_0_6_aca_smu_funcs); } -void smu_v13_0_6_set_temp_funcs (struct smu_context *smu) -{ - smu->smu_temp.temp_funcs = (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 ) - ==IP_VERSION (13 ,0 ,12 )) ? &smu_v13_0_12_temp_funcs :NULL ; -}
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h +0 -1
@@ -74,7 +74,6 @@ enum smu_v13_0_6_caps { };extern void smu_v13_0_6_set_ppt_funcs (struct smu_context *smu); -extern void smu_v13_0_6_set_temp_funcs (struct smu_context *smu);bool smu_v13_0_6_cap_supported (struct smu_context *smu,enum smu_v13_0_6_caps cap);int smu_v13_0_6_get_static_metrics_table (struct smu_context *smu); int smu_v13_0_6_get_metrics_table(struct smu_context *smu, void *metrics_table,
Signature · 1 line
2.34.1
[Public]
The purpose is to keep thermal related interfaces separate going forward. It's not about this one alone.
Thanks,
Lijo
________________________________
From: amd-gfx <[email protected]> on behalf of Yang Wang <[email protected]>
Sent: Tuesday, September 9, 2025 7:51:10 AM
To: [email protected] <[email protected]>
Cc: Kamal, Asad <[email protected]>
Subject: [PATCH] drm/amd/pm: make smu_set_temp_funcs() smu specific for smu v13.0.6
move smu_set_temp_funcs() into smu_v13.0.6 ppt.c file to keep same code layer in amdgpu_smu.c. (only set_ppt func in amdgpu_smu.c)
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 - drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 12 +++++++----- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h | 1 - 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -1
@@ -766,7 +766,6 @@ static int smu_set_funcs(struct amdgpu_device *adev)case IP_VERSION (13 ,0 ,14 ):case IP_VERSION (13 ,0 ,12 ):smu_v13_0_6_set_ppt_funcs (smu); -smu_v13_0_6_set_temp_funcs (smu);/* Enable pp_od_clk_voltage node */ smu->od_enabled = true;break ;
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +7 -5
@@ -3850,6 +3850,12 @@ static const struct aca_smu_funcs smu_v13_0_6_aca_smu_funcs = { .parse_error_code = aca_smu_parse_error_code, }; +static void smu_v13_0_6_set_temp_funcs (struct smu_context *smu) +{ + smu->smu_temp.temp_funcs = (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 ) + ==IP_VERSION (13 ,0 ,12 )) ? &smu_v13_0_12_temp_funcs :NULL ; +} +static const struct pptable_funcs smu_v13_0_6_ppt_funcs = {/* init dpm */ .get_allowed_feature_mask = smu_v13_0_6_get_allowed_feature_mask,
@@ -3921,12 +3927,8 @@ void smu_v13_0_6_set_ppt_funcs(struct smu_context *smu) smu->smc_driver_if_version =SMU13_0_6_DRIVER_IF_VERSION ; smu->smc_fw_caps |=SMU_FW_CAP_RAS_PRI ;smu_v13_0_set_smu_mailbox_registers (smu); +smu_v13_0_6_set_temp_funcs (smu);amdgpu_mca_smu_init_funcs (smu->adev, &smu_v13_0_6_mca_smu_funcs);amdgpu_aca_set_smu_funcs (smu->adev, &smu_v13_0_6_aca_smu_funcs); } -void smu_v13_0_6_set_temp_funcs (struct smu_context *smu) -{ - smu->smu_temp.temp_funcs = (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 ) - ==IP_VERSION (13 ,0 ,12 )) ? &smu_v13_0_12_temp_funcs :NULL ; -}
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h +0 -1
@@ -74,7 +74,6 @@ enum smu_v13_0_6_caps { };extern void smu_v13_0_6_set_ppt_funcs (struct smu_context *smu); -extern void smu_v13_0_6_set_temp_funcs (struct smu_context *smu);bool smu_v13_0_6_cap_supported (struct smu_context *smu,enum smu_v13_0_6_caps cap);int smu_v13_0_6_get_static_metrics_table (struct smu_context *smu); int smu_v13_0_6_get_metrics_table(struct smu_context *smu, void *metrics_table,
--
2.34.1
Lazar, Lijo
Reviewed-by[Public]
Please ignore, misread the patch initially.
The patch is
Thanks,
Lijo
From: amd-gfx <[email protected]> On Behalf Of Lazar, Lijo
Sent: Tuesday, September 9, 2025 8:35 AM
To: Wang, Yang(Kevin) <[email protected]>; [email protected]
Cc: Kamal, Asad <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: make smu_set_temp_funcs() smu specific for smu v13.0.6
[Public]
The purpose is to keep thermal related interfaces separate going forward. It's not about this one alone.
Thanks,
Lijo
________________________________
From: amd-gfx <[email protected]<mailto:[email protected]>> on behalf of Yang Wang <[email protected]<mailto:[email protected]>>
Sent: Tuesday, September 9, 2025 7:51:10 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Kamal, Asad <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amd/pm: make smu_set_temp_funcs() smu specific for smu v13.0.6
move smu_set_temp_funcs() into smu_v13.0.6 ppt.c file to keep same code layer in amdgpu_smu.c. (only set_ppt func in amdgpu_smu.c)
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 - drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 12 +++++++----- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h | 1 - 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -1
@@ -766,7 +766,6 @@ static int smu_set_funcs(struct amdgpu_device *adev)case IP_VERSION (13 ,0 ,14 ):case IP_VERSION (13 ,0 ,12 ):smu_v13_0_6_set_ppt_funcs (smu); -smu_v13_0_6_set_temp_funcs (smu);/* Enable pp_od_clk_voltage node */ smu->od_enabled = true;break ;
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +7 -5
@@ -3850,6 +3850,12 @@ static const struct aca_smu_funcs smu_v13_0_6_aca_smu_funcs = { .parse_error_code = aca_smu_parse_error_code, }; +static void smu_v13_0_6_set_temp_funcs (struct smu_context *smu) +{ + smu->smu_temp.temp_funcs = (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 ) + ==IP_VERSION (13 ,0 ,12 )) ? &smu_v13_0_12_temp_funcs :NULL ; +} +static const struct pptable_funcs smu_v13_0_6_ppt_funcs = {/* init dpm */ .get_allowed_feature_mask = smu_v13_0_6_get_allowed_feature_mask,
@@ -3921,12 +3927,8 @@ void smu_v13_0_6_set_ppt_funcs(struct smu_context *smu) smu->smc_driver_if_version =SMU13_0_6_DRIVER_IF_VERSION ; smu->smc_fw_caps |=SMU_FW_CAP_RAS_PRI ;smu_v13_0_set_smu_mailbox_registers (smu); +smu_v13_0_6_set_temp_funcs (smu);amdgpu_mca_smu_init_funcs (smu->adev, &smu_v13_0_6_mca_smu_funcs);amdgpu_aca_set_smu_funcs (smu->adev, &smu_v13_0_6_aca_smu_funcs); } -void smu_v13_0_6_set_temp_funcs (struct smu_context *smu) -{ - smu->smu_temp.temp_funcs = (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 ) - ==IP_VERSION (13 ,0 ,12 )) ? &smu_v13_0_12_temp_funcs :NULL ; -}
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h +0 -1
@@ -74,7 +74,6 @@ enum smu_v13_0_6_caps { };extern void smu_v13_0_6_set_ppt_funcs (struct smu_context *smu); -extern void smu_v13_0_6_set_temp_funcs (struct smu_context *smu);bool smu_v13_0_6_cap_supported (struct smu_context *smu,enum smu_v13_0_6_caps cap);int smu_v13_0_6_get_static_metrics_table (struct smu_context *smu); int smu_v13_0_6_get_metrics_table(struct smu_context *smu, void *metrics_table,
--
2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Thanks & Regards
Asad
-----Original Message-----
From: Wang, Yang(Kevin) <[email protected]>
Sent: Tuesday, September 9, 2025 7:51 AM
To: [email protected]
Cc: Kamal, Asad <[email protected]>
Subject: [PATCH] drm/amd/pm: make smu_set_temp_funcs() smu specific for smu v13.0.6
move smu_set_temp_funcs() into smu_v13.0.6 ppt.c file to keep same code layer in amdgpu_smu.c. (only set_ppt func in amdgpu_smu.c)
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 - drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 12 +++++++----- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h | 1 - 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -1
@@ -766,7 +766,6 @@ static int smu_set_funcs(struct amdgpu_device *adev)case IP_VERSION (13 ,0 ,14 ):case IP_VERSION (13 ,0 ,12 ):smu_v13_0_6_set_ppt_funcs (smu); -smu_v13_0_6_set_temp_funcs (smu);/* Enable pp_od_clk_voltage node */ smu->od_enabled = true;break ;
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +5 -4
@@ -3850,6 +3850,12 @@ static const struct aca_smu_funcs smu_v13_0_6_aca_smu_funcs = { .parse_error_code = aca_smu_parse_error_code, }; +static void smu_v13_0_6_set_temp_funcs (struct smu_context *smu) { + smu->smu_temp.temp_funcs = (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 ) + ==IP_VERSION (13 ,0 ,12 )) ? &smu_v13_0_12_temp_funcs :NULL ; } +static const struct pptable_funcs smu_v13_0_6_ppt_funcs = {/* init dpm */ .get_allowed_feature_mask = smu_v13_0_6_get_allowed_feature_mask,
@@ -3921,12 +3927,8 @@ void smu_v13_0_6_set_ppt_funcs(struct smu_context *smu) smu->smc_driver_if_version =SMU13_0_6_DRIVER_IF_VERSION ; smu->smc_fw_caps |=SMU_FW_CAP_RAS_PRI ;smu_v13_0_set_smu_mailbox_registers (smu); +smu_v13_0_6_set_temp_funcs (smu);amdgpu_mca_smu_init_funcs (smu->adev, &smu_v13_0_6_mca_smu_funcs);amdgpu_aca_set_smu_funcs (smu->adev, &smu_v13_0_6_aca_smu_funcs); } -void smu_v13_0_6_set_temp_funcs(struct smu_context *smu) -{ - smu->smu_temp.temp_funcs = (amdgpu_ip_version (smu->adev,MP1_HWIP ,0 ) - ==IP_VERSION (13 ,0 ,12 )) ? &smu_v13_0_12_temp_funcs :NULL ; -}
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h +0 -1
@@ -74,7 +74,6 @@ enum smu_v13_0_6_caps { }; extern void smu_v13_0_6_set_ppt_funcs(struct smu_context *smu); -extern void smu_v13_0_6_set_temp_funcs(struct smu_context *smu); bool smu_v13_0_6_cap_supported(struct smu_context *smu, enum smu_v13_0_6_caps cap); int smu_v13_0_6_get_static_metrics_table(struct smu_context *smu); int smu_v13_0_6_get_metrics_table(struct smu_context *smu, void *metrics_table, --
2.34.1