@@ -364,6 +364,17 @@ struct amdgpu_xcp_metrics {
364
364
uint64_t gfx_busy_acc [MAX_XCC ];
365
365
};
366
366
367
+ struct amdgpu_xcp_metrics_v1_1 {
368
+ /* Utilization Instantaneous (%) */
369
+ uint32_t gfx_busy_inst [MAX_XCC ];
370
+ uint16_t jpeg_busy [NUM_JPEG_ENG ];
371
+ uint16_t vcn_busy [NUM_VCN ];
372
+ /* Utilization Accumulated (%) */
373
+ uint64_t gfx_busy_acc [MAX_XCC ];
374
+ /* Total App Clock Counter Accumulated */
375
+ uint64_t gfx_below_host_limit_acc [MAX_XCC ];
376
+ };
377
+
367
378
struct amd_pm_funcs {
368
379
/* export for dpm on ci and si */
369
380
int (* pre_set_power_state )(void * handle );
@@ -977,6 +988,105 @@ struct gpu_metrics_v1_6 {
977
988
uint32_t pcie_lc_perf_other_end_recovery ;
978
989
};
979
990
991
+ struct gpu_metrics_v1_7 {
992
+ struct metrics_table_header common_header ;
993
+
994
+ /* Temperature (Celsius) */
995
+ uint16_t temperature_hotspot ;
996
+ uint16_t temperature_mem ;
997
+ uint16_t temperature_vrsoc ;
998
+
999
+ /* Power (Watts) */
1000
+ uint16_t curr_socket_power ;
1001
+
1002
+ /* Utilization (%) */
1003
+ uint16_t average_gfx_activity ;
1004
+ uint16_t average_umc_activity ; // memory controller
1005
+
1006
+ /* VRAM max bandwidthi (in GB/sec) at max memory clock */
1007
+ uint64_t mem_max_bandwidth ;
1008
+
1009
+ /* Energy (15.259uJ (2^-16) units) */
1010
+ uint64_t energy_accumulator ;
1011
+
1012
+ /* Driver attached timestamp (in ns) */
1013
+ uint64_t system_clock_counter ;
1014
+
1015
+ /* Accumulation cycle counter */
1016
+ uint32_t accumulation_counter ;
1017
+
1018
+ /* Accumulated throttler residencies */
1019
+ uint32_t prochot_residency_acc ;
1020
+ uint32_t ppt_residency_acc ;
1021
+ uint32_t socket_thm_residency_acc ;
1022
+ uint32_t vr_thm_residency_acc ;
1023
+ uint32_t hbm_thm_residency_acc ;
1024
+
1025
+ /* Clock Lock Status. Each bit corresponds to clock instance */
1026
+ uint32_t gfxclk_lock_status ;
1027
+
1028
+ /* Link width (number of lanes) and speed (in 0.1 GT/s) */
1029
+ uint16_t pcie_link_width ;
1030
+ uint16_t pcie_link_speed ;
1031
+
1032
+ /* XGMI bus width and bitrate (in Gbps) */
1033
+ uint16_t xgmi_link_width ;
1034
+ uint16_t xgmi_link_speed ;
1035
+
1036
+ /* Utilization Accumulated (%) */
1037
+ uint32_t gfx_activity_acc ;
1038
+ uint32_t mem_activity_acc ;
1039
+
1040
+ /*PCIE accumulated bandwidth (GB/sec) */
1041
+ uint64_t pcie_bandwidth_acc ;
1042
+
1043
+ /*PCIE instantaneous bandwidth (GB/sec) */
1044
+ uint64_t pcie_bandwidth_inst ;
1045
+
1046
+ /* PCIE L0 to recovery state transition accumulated count */
1047
+ uint64_t pcie_l0_to_recov_count_acc ;
1048
+
1049
+ /* PCIE replay accumulated count */
1050
+ uint64_t pcie_replay_count_acc ;
1051
+
1052
+ /* PCIE replay rollover accumulated count */
1053
+ uint64_t pcie_replay_rover_count_acc ;
1054
+
1055
+ /* PCIE NAK sent accumulated count */
1056
+ uint32_t pcie_nak_sent_count_acc ;
1057
+
1058
+ /* PCIE NAK received accumulated count */
1059
+ uint32_t pcie_nak_rcvd_count_acc ;
1060
+
1061
+ /* XGMI accumulated data transfer size(KiloBytes) */
1062
+ uint64_t xgmi_read_data_acc [NUM_XGMI_LINKS ];
1063
+ uint64_t xgmi_write_data_acc [NUM_XGMI_LINKS ];
1064
+
1065
+ /* XGMI link status(active/inactive) */
1066
+ uint16_t xgmi_link_status [NUM_XGMI_LINKS ];
1067
+
1068
+ uint16_t padding ;
1069
+
1070
+ /* PMFW attached timestamp (10ns resolution) */
1071
+ uint64_t firmware_timestamp ;
1072
+
1073
+ /* Current clocks (Mhz) */
1074
+ uint16_t current_gfxclk [MAX_GFX_CLKS ];
1075
+ uint16_t current_socclk [MAX_CLKS ];
1076
+ uint16_t current_vclk0 [MAX_CLKS ];
1077
+ uint16_t current_dclk0 [MAX_CLKS ];
1078
+ uint16_t current_uclk ;
1079
+
1080
+ /* Number of current partition */
1081
+ uint16_t num_partition ;
1082
+
1083
+ /* XCP metrics stats */
1084
+ struct amdgpu_xcp_metrics_v1_1 xcp_stats [NUM_XCP ];
1085
+
1086
+ /* PCIE other end recovery counter */
1087
+ uint32_t pcie_lc_perf_other_end_recovery ;
1088
+ };
1089
+
980
1090
/*
981
1091
* gpu_metrics_v2_0 is not recommended as it's not naturally aligned.
982
1092
* Use gpu_metrics_v2_1 or later instead.
0 commit comments