drm/amdgpu/pm: add VCN activity for renoir
Subsystems (3)
Alex Deucher
maintainerPATCH 1/6 drm/amdgpu/pm: add VCN activity for renoir
Wire up the query.
--- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +6 -0
@@ -1285,6 +1285,12 @@ static int renoir_read_sensor(struct smu_context *smu, (uint32_t *)data); *size =4 ;break ; +case AMDGPU_PP_SENSOR_VCN_LOAD : + ret =renoir_get_smu_metrics_data (smu, +METRICS_AVERAGE_VCNACTIVITY , + (uint32_t *)data); + *size =4 ; +break ;case AMDGPU_PP_SENSOR_EDGE_TEMP : ret = renoir_get_smu_metrics_data(smu, METRICS_TEMPERATURE_EDGE,
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 2/6 drm/amdgpu/pm: add VCN activity for SMU 13.0.0/7
Wire up the query.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 10 ++++++++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 10 ++++++++++ 2 files changed, 20 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +10 -0
@@ -836,6 +836,10 @@ static int smu_v13_0_0_get_smu_metrics_data(struct smu_context *smu,case METRICS_AVERAGE_MEMACTIVITY : *value = metrics->AverageUclkActivity;break ; +case METRICS_AVERAGE_VCNACTIVITY : + *value =max (metrics->Vcn0ActivityPercentage, + metrics->Vcn1ActivityPercentage); +break ;case METRICS_AVERAGE_SOCKETPOWER : *value = metrics->AverageSocketPower <<8 ;break ;
@@ -962,6 +966,12 @@ static int smu_v13_0_0_read_sensor(struct smu_context *smu, (uint32_t *)data); *size =4 ;break ; +case AMDGPU_PP_SENSOR_VCN_LOAD : + ret =smu_v13_0_0_get_smu_metrics_data (smu, +METRICS_AVERAGE_VCNACTIVITY , + (uint32_t *)data); + *size =4 ; +break ;case AMDGPU_PP_SENSOR_GPU_AVG_POWER : ret = smu_v13_0_0_get_smu_metrics_data(smu, METRICS_AVERAGE_SOCKETPOWER,
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +10 -0
@@ -807,6 +807,10 @@ static int smu_v13_0_7_get_smu_metrics_data(struct smu_context *smu,else *value = metrics->AverageMemclkFrequencyPreDs;break ; +case METRICS_AVERAGE_VCNACTIVITY : + *value =max (metrics->Vcn0ActivityPercentage, + metrics->Vcn1ActivityPercentage); +break ;case METRICS_AVERAGE_VCLK : *value = metrics->AverageVclk0Frequency;break ;
@@ -951,6 +955,12 @@ static int smu_v13_0_7_read_sensor(struct smu_context *smu, (uint32_t *)data); *size =4 ;break ; +case AMDGPU_PP_SENSOR_VCN_LOAD : + ret =smu_v13_0_7_get_smu_metrics_data (smu, +METRICS_AVERAGE_VCNACTIVITY , + (uint32_t *)data); + *size =4 ; +break ;case AMDGPU_PP_SENSOR_GPU_AVG_POWER : ret = smu_v13_0_7_get_smu_metrics_data(smu, METRICS_AVERAGE_SOCKETPOWER,
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 3/6 drm/amdgpu/pm: add VCN activity for SMU 14.0.2
In reply to Alex DeucherWire up the query.
--- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +10 -0
@@ -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,
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 4/6 drm/amdgpu/pm: enable vcn busy sysfs for additional GC 11.x
In reply to Alex DeucherMake it visible for the all GC 11.x chips that support it.
--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +12 -6
@@ -2315,12 +2315,18 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_ *states =ATTR_STATE_UNSUPPORTED ; }else if (DEVICE_ATTR_IS (vcn_busy_percent)) {if (!(gc_ver ==IP_VERSION (10 ,3 ,1 ) || - gc_ver ==IP_VERSION (10 ,3 ,3 ) || - gc_ver ==IP_VERSION (10 ,3 ,6 ) || - gc_ver ==IP_VERSION (10 ,3 ,7 ) || - gc_ver ==IP_VERSION (11 ,0 ,1 ) || - gc_ver ==IP_VERSION (11 ,0 ,4 ) || - gc_ver ==IP_VERSION (11 ,5 ,0 ))) + gc_ver ==IP_VERSION (10 ,3 ,3 ) || + gc_ver ==IP_VERSION (10 ,3 ,6 ) || + gc_ver ==IP_VERSION (10 ,3 ,7 ) || + gc_ver ==IP_VERSION (11 ,0 ,0 ) || + gc_ver ==IP_VERSION (11 ,0 ,1 ) || + gc_ver ==IP_VERSION (11 ,0 ,2 ) || + gc_ver ==IP_VERSION (11 ,0 ,3 ) || + gc_ver ==IP_VERSION (11 ,0 ,4 ) || + gc_ver ==IP_VERSION (11 ,5 ,0 ) || + gc_ver ==IP_VERSION (11 ,5 ,1 ) || + gc_ver ==IP_VERSION (11 ,5 ,2 ) || + gc_ver ==IP_VERSION (11 ,5 ,3 ))) *states =ATTR_STATE_UNSUPPORTED ; }else if (DEVICE_ATTR_IS (pcie_bw)) {/* PCIe Perf counters won't work on APU nodes */
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 5/6 drm/amdgpu/pm: enable vcn busy sysfs for GC 12.x
In reply to Alex DeucherMake it visible for the all GC 12.x chips that support it.
--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +3 -1
@@ -2326,7 +2326,9 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_ gc_ver ==IP_VERSION (11 ,5 ,0 ) || gc_ver ==IP_VERSION (11 ,5 ,1 ) || gc_ver ==IP_VERSION (11 ,5 ,2 ) || - gc_ver == IP_VERSION(11, 5, 3))) + gc_ver ==IP_VERSION (11 ,5 ,3 ) || + gc_ver ==IP_VERSION (12 ,0 ,0 ) || + gc_ver == IP_VERSION(12, 0, 1))) *states =ATTR_STATE_UNSUPPORTED ; }else if (DEVICE_ATTR_IS (pcie_bw)) {/* PCIe Perf counters won't work on APU nodes */
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 6/6 drm/amdgpu/pm: enable vcn busy sysfs for GC 9.3.0
In reply to Alex DeucherMake it visible for the all GC 9.3.0 chips that support it.
--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -1
@@ -2314,7 +2314,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_ gc_ver == IP_VERSION(9, 0, 1)) *states =ATTR_STATE_UNSUPPORTED ; }else if (DEVICE_ATTR_IS (vcn_busy_percent)) { - if (!(gc_ver == IP_VERSION(10, 3, 1) || + if (!(gc_ver == IP_VERSION(9, 3, 0) || + gc_ver == IP_VERSION(10, 3, 1) || gc_ver == IP_VERSION(10, 3, 3) || gc_ver == IP_VERSION(10, 3, 6) || gc_ver == IP_VERSION(10, 3, 7) ||
Signature · 1 line
2.48.1
Feng, Kenneth
maintainer[AMD Official Use Only - AMD Internal Distribution Only]
Series is Reviewed-by: Kenneth Feng <[email protected]>
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, March 12, 2025 4:45 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 1/6] drm/amdgpu/pm: add VCN activity for renoir
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Wire up the query.
--- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +6 -0
@@ -1285,6 +1285,12 @@ static int renoir_read_sensor(struct smu_context *smu, (uint32_t *)data); *size =4 ;break ; +case AMDGPU_PP_SENSOR_VCN_LOAD : + ret =renoir_get_smu_metrics_data (smu, +METRICS_AVERAGE_VCNACTIVITY , + (uint32_t *)data); + *size =4 ; +break ;case AMDGPU_PP_SENSOR_EDGE_TEMP : ret = renoir_get_smu_metrics_data(smu, METRICS_TEMPERATURE_EDGE,
--
2.48.1
Quoted 3 lines · Alex Deucher
Wire up the query.
Signed-off-by Alex Deucher <[email protected]>
Series is -
Thanks,
Lijo
Quoted 21 lines
--- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +6
-0@@ -1285,6 +1285,12 @@ static int renoir_read_sensor(struct smu_context *smu, (uint32_t *)data); *size =4 ;break ; +case AMDGPU_PP_SENSOR_VCN_LOAD : + ret =renoir_get_smu_metrics_data (smu, +METRICS_AVERAGE_VCNACTIVITY , + (uint32_t *)data); + *size =4 ; +break ;case AMDGPU_PP_SENSOR_EDGE_TEMP : ret = renoir_get_smu_metrics_data(smu, METRICS_TEMPERATURE_EDGE,
Quoted 3 lines · Alex Deucher
Wire up the query.
Signed-off-by Alex Deucher <[email protected]>
Series is -
Thanks,
Lijo
Quoted 21 lines
--- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +6
-0@@ -1285,6 +1285,12 @@ static int renoir_read_sensor(struct smu_context *smu, (uint32_t *)data); *size =4 ;break ; +case AMDGPU_PP_SENSOR_VCN_LOAD : + ret =renoir_get_smu_metrics_data (smu, +METRICS_AVERAGE_VCNACTIVITY , + (uint32_t *)data); + *size =4 ; +break ;case AMDGPU_PP_SENSOR_EDGE_TEMP : ret = renoir_get_smu_metrics_data(smu, METRICS_TEMPERATURE_EDGE,