[PATCH] drm/amd/pm: Get metrics table version for smu_v13_0_12
Lazar, Lijo
lijo.lazar at amd.com
Mon Feb 24 03:51:17 UTC 2025
On 2/22/2025 10:43 PM, Asad Kamal wrote:
> Get metrics table version for smu_v13_0_12 and populate pm_metrics
>
> Signed-off-by: Asad Kamal <asad.kamal at amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar at amd.com>
Thanks,
Lijo
> ---
> drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c
> index 5e7e97d90805..5e80b9aabfc9 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c
> @@ -208,6 +208,7 @@ int smu_v13_0_12_setup_driver_pptable(struct smu_context *smu)
> StaticMetricsTable_t *static_metrics = (StaticMetricsTable_t *)smu_table->metrics_table;
> struct PPTable_t *pptable =
> (struct PPTable_t *)smu_table->driver_pptable;
> + uint32_t table_version;
> int ret, i;
>
> if (!pptable->Init) {
> @@ -215,6 +216,13 @@ int smu_v13_0_12_setup_driver_pptable(struct smu_context *smu)
> if (ret)
> return ret;
>
> + ret = smu_cmn_send_smc_msg(smu, SMU_MSG_GetMetricsVersion,
> + &table_version);
> + if (ret)
> + return ret;
> + smu_table->tables[SMU_TABLE_SMU_METRICS].version =
> + table_version;
> +
> pptable->MaxSocketPowerLimit =
> SMUQ10_ROUND(static_metrics->MaxSocketPowerLimit);
> pptable->MaxGfxclkFrequency =
More information about the amd-gfx
mailing list