@@ -341,6 +341,7 @@ enum pp_policy_soc_pstate {
341
341
#define MAX_CLKS 4
342
342
#define NUM_VCN 4
343
343
#define NUM_JPEG_ENG 32
344
+ #define NUM_JPEG_ENG_V1 40
344
345
#define MAX_XCC 8
345
346
#define NUM_XCP 8
346
347
struct seq_file ;
@@ -376,6 +377,20 @@ struct amdgpu_xcp_metrics_v1_1 {
376
377
uint64_t gfx_below_host_limit_acc [MAX_XCC ];
377
378
};
378
379
380
+ struct amdgpu_xcp_metrics_v1_2 {
381
+ /* Utilization Instantaneous (%) */
382
+ uint32_t gfx_busy_inst [MAX_XCC ];
383
+ uint16_t jpeg_busy [NUM_JPEG_ENG_V1 ];
384
+ uint16_t vcn_busy [NUM_VCN ];
385
+ /* Utilization Accumulated (%) */
386
+ uint64_t gfx_busy_acc [MAX_XCC ];
387
+ /* Total App Clock Counter Accumulated */
388
+ uint64_t gfx_below_host_limit_ppt_acc [MAX_XCC ];
389
+ uint64_t gfx_below_host_limit_thm_acc [MAX_XCC ];
390
+ uint64_t gfx_low_utilization_acc [MAX_XCC ];
391
+ uint64_t gfx_below_host_limit_total_acc [MAX_XCC ];
392
+ };
393
+
379
394
struct amd_pm_funcs {
380
395
/* export for dpm on ci and si */
381
396
int (* pre_set_power_state )(void * handle );
@@ -1090,6 +1105,105 @@ struct gpu_metrics_v1_7 {
1090
1105
uint32_t pcie_lc_perf_other_end_recovery ;
1091
1106
};
1092
1107
1108
+ struct gpu_metrics_v1_8 {
1109
+ struct metrics_table_header common_header ;
1110
+
1111
+ /* Temperature (Celsius) */
1112
+ uint16_t temperature_hotspot ;
1113
+ uint16_t temperature_mem ;
1114
+ uint16_t temperature_vrsoc ;
1115
+
1116
+ /* Power (Watts) */
1117
+ uint16_t curr_socket_power ;
1118
+
1119
+ /* Utilization (%) */
1120
+ uint16_t average_gfx_activity ;
1121
+ uint16_t average_umc_activity ; // memory controller
1122
+
1123
+ /* VRAM max bandwidthi (in GB/sec) at max memory clock */
1124
+ uint64_t mem_max_bandwidth ;
1125
+
1126
+ /* Energy (15.259uJ (2^-16) units) */
1127
+ uint64_t energy_accumulator ;
1128
+
1129
+ /* Driver attached timestamp (in ns) */
1130
+ uint64_t system_clock_counter ;
1131
+
1132
+ /* Accumulation cycle counter */
1133
+ uint32_t accumulation_counter ;
1134
+
1135
+ /* Accumulated throttler residencies */
1136
+ uint32_t prochot_residency_acc ;
1137
+ uint32_t ppt_residency_acc ;
1138
+ uint32_t socket_thm_residency_acc ;
1139
+ uint32_t vr_thm_residency_acc ;
1140
+ uint32_t hbm_thm_residency_acc ;
1141
+
1142
+ /* Clock Lock Status. Each bit corresponds to clock instance */
1143
+ uint32_t gfxclk_lock_status ;
1144
+
1145
+ /* Link width (number of lanes) and speed (in 0.1 GT/s) */
1146
+ uint16_t pcie_link_width ;
1147
+ uint16_t pcie_link_speed ;
1148
+
1149
+ /* XGMI bus width and bitrate (in Gbps) */
1150
+ uint16_t xgmi_link_width ;
1151
+ uint16_t xgmi_link_speed ;
1152
+
1153
+ /* Utilization Accumulated (%) */
1154
+ uint32_t gfx_activity_acc ;
1155
+ uint32_t mem_activity_acc ;
1156
+
1157
+ /*PCIE accumulated bandwidth (GB/sec) */
1158
+ uint64_t pcie_bandwidth_acc ;
1159
+
1160
+ /*PCIE instantaneous bandwidth (GB/sec) */
1161
+ uint64_t pcie_bandwidth_inst ;
1162
+
1163
+ /* PCIE L0 to recovery state transition accumulated count */
1164
+ uint64_t pcie_l0_to_recov_count_acc ;
1165
+
1166
+ /* PCIE replay accumulated count */
1167
+ uint64_t pcie_replay_count_acc ;
1168
+
1169
+ /* PCIE replay rollover accumulated count */
1170
+ uint64_t pcie_replay_rover_count_acc ;
1171
+
1172
+ /* PCIE NAK sent accumulated count */
1173
+ uint32_t pcie_nak_sent_count_acc ;
1174
+
1175
+ /* PCIE NAK received accumulated count */
1176
+ uint32_t pcie_nak_rcvd_count_acc ;
1177
+
1178
+ /* XGMI accumulated data transfer size(KiloBytes) */
1179
+ uint64_t xgmi_read_data_acc [NUM_XGMI_LINKS ];
1180
+ uint64_t xgmi_write_data_acc [NUM_XGMI_LINKS ];
1181
+
1182
+ /* XGMI link status(active/inactive) */
1183
+ uint16_t xgmi_link_status [NUM_XGMI_LINKS ];
1184
+
1185
+ uint16_t padding ;
1186
+
1187
+ /* PMFW attached timestamp (10ns resolution) */
1188
+ uint64_t firmware_timestamp ;
1189
+
1190
+ /* Current clocks (Mhz) */
1191
+ uint16_t current_gfxclk [MAX_GFX_CLKS ];
1192
+ uint16_t current_socclk [MAX_CLKS ];
1193
+ uint16_t current_vclk0 [MAX_CLKS ];
1194
+ uint16_t current_dclk0 [MAX_CLKS ];
1195
+ uint16_t current_uclk ;
1196
+
1197
+ /* Number of current partition */
1198
+ uint16_t num_partition ;
1199
+
1200
+ /* XCP metrics stats */
1201
+ struct amdgpu_xcp_metrics_v1_2 xcp_stats [NUM_XCP ];
1202
+
1203
+ /* PCIE other end recovery counter */
1204
+ uint32_t pcie_lc_perf_other_end_recovery ;
1205
+ };
1206
+
1093
1207
/*
1094
1208
* gpu_metrics_v2_0 is not recommended as it's not naturally aligned.
1095
1209
* Use gpu_metrics_v2_1 or later instead.
0 commit comments