Skip to content

Commit 1b81674

Browse files
committed
drm/amdgpu/pm: add VCN activity for SMU 14.0.2
Wire up the query. Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 2393c1a commit 1b81674

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,10 @@ static int smu_v14_0_2_get_smu_metrics_data(struct smu_context *smu,
756756
case METRICS_AVERAGE_MEMACTIVITY:
757757
*value = metrics->AverageUclkActivity;
758758
break;
759+
case METRICS_AVERAGE_VCNACTIVITY:
760+
*value = max(metrics->AverageVcn0ActivityPercentage,
761+
metrics->Vcn1ActivityPercentage);
762+
break;
759763
case METRICS_AVERAGE_SOCKETPOWER:
760764
*value = metrics->AverageSocketPower << 8;
761765
break;
@@ -882,6 +886,12 @@ static int smu_v14_0_2_read_sensor(struct smu_context *smu,
882886
(uint32_t *)data);
883887
*size = 4;
884888
break;
889+
case AMDGPU_PP_SENSOR_VCN_LOAD:
890+
ret = smu_v14_0_2_get_smu_metrics_data(smu,
891+
METRICS_AVERAGE_VCNACTIVITY,
892+
(uint32_t *)data);
893+
*size = 4;
894+
break;
885895
case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
886896
ret = smu_v14_0_2_get_smu_metrics_data(smu,
887897
METRICS_AVERAGE_SOCKETPOWER,

0 commit comments

Comments
 (0)