drm/amd/pm: Fill pcie error counters for gpu v1_4
authorAsad Kamal <asad.kamal@amd.com>
Tue, 14 Nov 2023 08:17:17 +0000 (16:17 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Nov 2023 05:49:40 +0000 (00:49 -0500)
Fill PCIE error counters & instantaneous bandwidth
in gpu metrics v1_4 for smu v_13_0_6

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

index 891605d4975f4e4460f83cb153f887a54cc16146..84fac499cf0cb801bb37624e0f9c20bd7525d1cb 100644 (file)
@@ -2095,6 +2095,14 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **table
                        smu_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();