Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: update latest IP discovery table structures

Add new tables.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+111 -3
+111 -3
drivers/gpu/drm/amd/include/discovery.h
··· 27 27 #define PSP_HEADER_SIZE 256 28 28 #define BINARY_SIGNATURE 0x28211407 29 29 #define DISCOVERY_TABLE_SIGNATURE 0x53445049 30 + #define GC_TABLE_ID 0x4347 31 + #define HARVEST_TABLE_SIGNATURE 0x56524148 32 + #define VCN_INFO_TABLE_ID 0x004E4356 33 + #define MALL_INFO_TABLE_ID 0x4D414C4C 30 34 31 35 typedef enum 32 36 { 33 37 IP_DISCOVERY = 0, 34 38 GC, 35 39 HARVEST_INFO, 36 - TABLE_4, 40 + VCN_INFO, 41 + MALL_INFO, 37 42 RESERVED_1, 38 - RESERVED_2, 39 43 TOTAL_TABLES = 6 40 44 } table; 41 45 ··· 100 96 uint32_t base_address[]; /* variable number of Addresses */ 101 97 } ip; 102 98 99 + typedef struct ip_v3 100 + { 101 + uint16_t hw_id; /* Hardware ID */ 102 + uint8_t instance_number; /* Instance number for the IP */ 103 + uint8_t num_base_address; /* Number of base addresses*/ 104 + uint8_t major; /* Hardware ID.major version */ 105 + uint8_t minor; /* Hardware ID.minor version */ 106 + uint8_t revision; /* Hardware ID.revision version */ 107 + #if defined(__BIG_ENDIAN) 108 + uint8_t variant : 4; /* HW variant */ 109 + uint8_t sub_revision : 4; /* HCID Sub-Revision */ 110 + #else 111 + uint8_t sub_revision : 4; /* HCID Sub-Revision */ 112 + uint8_t variant : 4; /* HW variant */ 113 + #endif 114 + uint32_t base_address[1]; /* Base Address list. Corresponds to the num_base_address field*/ 115 + } ip_v3; 116 + 103 117 typedef struct die_header 104 118 { 105 119 uint16_t die_id; ··· 130 108 struct die 131 109 { 132 110 die_header *die_header; 133 - ip *ip_list; 111 + union 112 + { 113 + ip *ip_list; 114 + ip_v3 *ip_v3_list; 115 + }; /* IP list. Variable size*/ 134 116 } die; 135 117 } ip_structure; 136 118 ··· 196 170 uint32_t gc_num_tcps; 197 171 }; 198 172 173 + struct gc_info_v1_2 { 174 + struct gpu_info_header header; 175 + uint32_t gc_num_se; 176 + uint32_t gc_num_wgp0_per_sa; 177 + uint32_t gc_num_wgp1_per_sa; 178 + uint32_t gc_num_rb_per_se; 179 + uint32_t gc_num_gl2c; 180 + uint32_t gc_num_gprs; 181 + uint32_t gc_num_max_gs_thds; 182 + uint32_t gc_gs_table_depth; 183 + uint32_t gc_gsprim_buff_depth; 184 + uint32_t gc_parameter_cache_depth; 185 + uint32_t gc_double_offchip_lds_buffer; 186 + uint32_t gc_wave_size; 187 + uint32_t gc_max_waves_per_simd; 188 + uint32_t gc_max_scratch_slots_per_cu; 189 + uint32_t gc_lds_size; 190 + uint32_t gc_num_sc_per_se; 191 + uint32_t gc_num_sa_per_se; 192 + uint32_t gc_num_packer_per_sc; 193 + uint32_t gc_num_gl2a; 194 + uint32_t gc_num_tcp_per_sa; 195 + uint32_t gc_num_sdp_interface; 196 + uint32_t gc_num_tcps; 197 + uint32_t gc_num_tcp_per_wpg; 198 + uint32_t gc_tcp_l1_size; 199 + uint32_t gc_num_sqc_per_wgp; 200 + uint32_t gc_l1_instruction_cache_size_per_sqc; 201 + uint32_t gc_l1_data_cache_size_per_sqc; 202 + uint32_t gc_gl1c_per_sa; 203 + uint32_t gc_gl1c_size_per_instance; 204 + uint32_t gc_gl2c_per_gpu; 205 + }; 206 + 199 207 struct gc_info_v2_0 { 200 208 struct gpu_info_header header; 201 209 ··· 267 207 harvest_info_header header; 268 208 harvest_info list[32]; 269 209 } harvest_table; 210 + 211 + struct mall_info_header { 212 + uint32_t table_id; /* table ID */ 213 + uint16_t version_major; /* table version */ 214 + uint16_t version_minor; /* table version */ 215 + uint32_t size_bytes; /* size of the entire header+data in bytes */ 216 + }; 217 + 218 + struct mall_info_v1_0 { 219 + struct mall_info_header header; 220 + uint32_t mall_size_per_m; 221 + uint32_t m_s_present; 222 + uint32_t m_half_use; 223 + uint32_t m_mall_config; 224 + uint32_t reserved[5]; 225 + }; 226 + 227 + #define VCN_INFO_TABLE_MAX_NUM_INSTANCES 4 228 + 229 + struct vcn_info_header { 230 + uint32_t table_id; /* table ID */ 231 + uint16_t version_major; /* table version */ 232 + uint16_t version_minor; /* table version */ 233 + uint32_t size_bytes; /* size of the entire header+data in bytes */ 234 + }; 235 + 236 + struct vcn_instance_info_v1_0 237 + { 238 + uint32_t instance_num; /* VCN IP instance number. 0 - VCN0; 1 - VCN1 etc*/ 239 + union _fuse_data { 240 + struct { 241 + uint32_t av1_disabled : 1; 242 + uint32_t vp9_disabled : 1; 243 + uint32_t hevc_disabled : 1; 244 + uint32_t h264_disabled : 1; 245 + uint32_t reserved : 28; 246 + } bits; 247 + uint32_t all_bits; 248 + } fuse_data; 249 + uint32_t reserved[2]; 250 + }; 251 + 252 + struct vcn_info_v1_0 { 253 + struct vcn_info_header header; 254 + uint32_t num_of_instances; /* number of entries used in instance_info below*/ 255 + struct vcn_instance_info_v1_0 instance_info[VCN_INFO_TABLE_MAX_NUM_INSTANCES]; 256 + uint32_t reserved[4]; 257 + }; 270 258 271 259 #pragma pack() 272 260