diff options
| author | Alex Deucher <[email protected]> | 2025-03-11 18:48:22 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-03-14 03:12:12 +0000 |
| commit | 1b81674e0baf6661b12bbd0beaf68d9ed1afb04c (patch) | |
| tree | 1831f3ee5d48bd03d2b9b5b5d85673ed564e73a5 | |
| parent | drm/amdgpu/pm: add VCN activity for SMU 13.0.0/7 (diff) | |
| download | kernel-1b81674e0baf6661b12bbd0beaf68d9ed1afb04c.tar.gz kernel-1b81674e0baf6661b12bbd0beaf68d9ed1afb04c.zip | |
drm/amdgpu/pm: add VCN activity for SMU 14.0.2
Wire up the query.
Reviewed-by: Lijo Lazar <[email protected]>
Reviewed-by: Kenneth Feng <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
| -rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c index e4089fd58711..21d1b34ada05 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c @@ -756,6 +756,10 @@ static int smu_v14_0_2_get_smu_metrics_data(struct smu_context *smu, case METRICS_AVERAGE_MEMACTIVITY: *value = metrics->AverageUclkActivity; break; + case METRICS_AVERAGE_VCNACTIVITY: + *value = max(metrics->AverageVcn0ActivityPercentage, + metrics->Vcn1ActivityPercentage); + break; case METRICS_AVERAGE_SOCKETPOWER: *value = metrics->AverageSocketPower << 8; break; @@ -882,6 +886,12 @@ static int smu_v14_0_2_read_sensor(struct smu_context *smu, (uint32_t *)data); *size = 4; break; + case AMDGPU_PP_SENSOR_VCN_LOAD: + ret = smu_v14_0_2_get_smu_metrics_data(smu, + METRICS_AVERAGE_VCNACTIVITY, + (uint32_t *)data); + *size = 4; + break; case AMDGPU_PP_SENSOR_GPU_AVG_POWER: ret = smu_v14_0_2_get_smu_metrics_data(smu, METRICS_AVERAGE_SOCKETPOWER, |
