drm/amd/pm: Update metric table for smu v13_0_6
Subsystems (3)
PATCH 1/2 drm/amd/pm: Update metric table for smu v13_0_6
Update pmfw metric table to include pcie
instantaneous bandwidth & pcie error counters
Signed-off-by Asad Kamal <[email protected]>
Reviewed-by Le Ma <[email protected]>
--- .../drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h +9 -1
@@ -123,7 +123,7 @@ typedef enum {VOLTAGE_GUARDBAND_COUNT } GFX_GUARDBAND_e; -#define SMU_METRICS_TABLE_VERSION 0x8 +#define SMU_METRICS_TABLE_VERSION 0x9 typedef struct __attribute__((packed, aligned(4))) { uint32_t AccumulationCounter;
@@ -211,6 +211,14 @@ typedef struct __attribute__((packed, aligned(4))) {//XGMI Data tranfser size uint64_t XgmiReadDataSizeAcc[8 ];//in KByte uint64_t XgmiWriteDataSizeAcc[8 ];//in KByte + +//PCIE BW Data and error count +uint32_t PcieBandwidth[4 ]; +uint32_t PCIeL0ToRecoveryCountAcc;// The Pcie counter itself is accumulated +uint32_t PCIenReplayAAcc;// The Pcie counter itself is accumulated +uint32_t PCIenReplayARolloverCountAcc;// The Pcie counter itself is accumulated +uint32_t PCIeNAKSentCountAcc;// The Pcie counter itself is accumulated +uint32_t PCIeNAKReceivedCountAcc;// The Pcie counter itself is accumulated } MetricsTable_t;#define SMU_VF_METRICS_TABLE_VERSION 0x3
Signature · 1 line
2.42.0
PATCH 2/2 drm/amd/pm: Fill pcie error counters for gpu v1_4
Fill PCIE error counters & instantaneous bandwidth in gpu metrics v1_4 for smu v_13_0_6
Signed-off-by Asad Kamal <[email protected]>
Reviewed-by Le Ma <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +8 -0
@@ -2095,6 +2095,14 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **tablesmu_v13_0_6_get_current_pcie_link_speed (smu); gpu_metrics->pcie_bandwidth_acc =SMUQ10_ROUND (metrics->PcieBandwidthAcc[0 ]); + gpu_metrics->pcie_bandwidth_inst = +SMUQ10_ROUND (metrics->PcieBandwidth[0 ]); + gpu_metrics->pcie_l0_to_recov_count_acc = + metrics->PCIeL0ToRecoveryCountAcc; + gpu_metrics->pcie_replay_count_acc = + metrics->PCIenReplayAAcc; + gpu_metrics->pcie_replay_rover_count_acc = + metrics->PCIenReplayARolloverCountAcc; } gpu_metrics->system_clock_counter =ktime_get_boottime_ns ();
Signature · 1 line
2.42.0
Quoted 5 lines · Asad Kamal
Update pmfw metric table to include pcie
instantaneous bandwidth & pcie error countersSigned-off-by Asad Kamal <[email protected]>Reviewed-by Le Ma <[email protected]>
Series is -
Reviewed-by Lijo Lazar <[email protected]>
Thanks,
Lijo
Quoted 32 lines
--- .../drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h +9
-1@@ -123,7 +123,7 @@ typedef enum {VOLTAGE_GUARDBAND_COUNT } GFX_GUARDBAND_e; -#define SMU_METRICS_TABLE_VERSION 0x8 +#define SMU_METRICS_TABLE_VERSION 0x9 typedef struct __attribute__((packed, aligned(4))) { uint32_t AccumulationCounter;@@ -211,6 +211,14 @@ typedef struct __attribute__((packed, aligned(4))) {//XGMI Data tranfser size uint64_t XgmiReadDataSizeAcc[8 ];//in KByte uint64_t XgmiWriteDataSizeAcc[8 ];//in KByte + +//PCIE BW Data and error count +uint32_t PcieBandwidth[4 ]; +uint32_t PCIeL0ToRecoveryCountAcc;// The Pcie counter itself is accumulated +uint32_t PCIenReplayAAcc;// The Pcie counter itself is accumulated +uint32_t PCIenReplayARolloverCountAcc;// The Pcie counter itself is accumulated +uint32_t PCIeNAKSentCountAcc;// The Pcie counter itself is accumulated +uint32_t PCIeNAKReceivedCountAcc;// The Pcie counter itself is accumulated } MetricsTable_t;#define SMU_VF_METRICS_TABLE_VERSION 0x3