Commit 3a50403f authored by Surbhi Kakarya's avatar Surbhi Kakarya Committed by Alex Deucher

drm/amd/pm: add new fields for Sienna Cichlid.

Fill voltage fields in metrics table.
Signed-off-by: default avatarSurbhi Kakarya <Surbhi.Kakarya@amd.com>
Acked-by: default avatarAlexander Deucher <Alexander.Deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e771d71d
...@@ -3632,6 +3632,16 @@ static ssize_t sienna_cichlid_get_gpu_metrics(struct smu_context *smu, ...@@ -3632,6 +3632,16 @@ static ssize_t sienna_cichlid_get_gpu_metrics(struct smu_context *smu,
gpu_metrics->energy_accumulator = gpu_metrics->energy_accumulator =
use_metrics_v2 ? metrics_v2->EnergyAccumulator : metrics->EnergyAccumulator; use_metrics_v2 ? metrics_v2->EnergyAccumulator : metrics->EnergyAccumulator;
if (metrics->CurrGfxVoltageOffset)
gpu_metrics->voltage_gfx =
(155000 - 625 * metrics->CurrGfxVoltageOffset) / 100;
if (metrics->CurrMemVidOffset)
gpu_metrics->voltage_mem =
(155000 - 625 * metrics->CurrMemVidOffset) / 100;
if (metrics->CurrSocVoltageOffset)
gpu_metrics->voltage_soc =
(155000 - 625 * metrics->CurrSocVoltageOffset) / 100;
average_gfx_activity = use_metrics_v2 ? metrics_v2->AverageGfxActivity : metrics->AverageGfxActivity; average_gfx_activity = use_metrics_v2 ? metrics_v2->AverageGfxActivity : metrics->AverageGfxActivity;
if (average_gfx_activity <= SMU_11_0_7_GFX_BUSY_THRESHOLD) if (average_gfx_activity <= SMU_11_0_7_GFX_BUSY_THRESHOLD)
gpu_metrics->average_gfxclk_frequency = gpu_metrics->average_gfxclk_frequency =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment