Skip to content
Snippets Groups Projects
Commit 1b81674e authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/pm: add VCN activity for SMU 14.0.2


Wire up the query.

Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarKenneth Feng <kenneth.feng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2393c1a9
No related merge requests found
...@@ -756,6 +756,10 @@ static int smu_v14_0_2_get_smu_metrics_data(struct smu_context *smu, ...@@ -756,6 +756,10 @@ static int smu_v14_0_2_get_smu_metrics_data(struct smu_context *smu,
case METRICS_AVERAGE_MEMACTIVITY: case METRICS_AVERAGE_MEMACTIVITY:
*value = metrics->AverageUclkActivity; *value = metrics->AverageUclkActivity;
break; break;
case METRICS_AVERAGE_VCNACTIVITY:
*value = max(metrics->AverageVcn0ActivityPercentage,
metrics->Vcn1ActivityPercentage);
break;
case METRICS_AVERAGE_SOCKETPOWER: case METRICS_AVERAGE_SOCKETPOWER:
*value = metrics->AverageSocketPower << 8; *value = metrics->AverageSocketPower << 8;
break; break;
...@@ -882,6 +886,12 @@ static int smu_v14_0_2_read_sensor(struct smu_context *smu, ...@@ -882,6 +886,12 @@ static int smu_v14_0_2_read_sensor(struct smu_context *smu,
(uint32_t *)data); (uint32_t *)data);
*size = 4; *size = 4;
break; 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: case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
ret = smu_v14_0_2_get_smu_metrics_data(smu, ret = smu_v14_0_2_get_smu_metrics_data(smu,
METRICS_AVERAGE_SOCKETPOWER, METRICS_AVERAGE_SOCKETPOWER,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment