1 /* SPDX-License-Identifier: GPL-2.0-only OR MIT */
2 /* Copyright (c) 2023 Imagination Technologies Ltd. */
4 #ifndef PVR_DEVICE_INFO_H
5 #define PVR_DEVICE_INFO_H
7 #include <linux/types.h>
12 * struct pvr_device_features - Hardware feature information
14 struct pvr_device_features {
16 bool has_cdm_control_stream_format;
17 bool has_cluster_grouping;
18 bool has_common_store_size_in_dwords;
20 bool has_compute_morton_capable;
21 bool has_compute_overlap;
22 bool has_coreid_per_os;
23 bool has_dynamic_dust_power;
26 bool has_fbc_max_default_descriptors;
27 bool has_fbc_max_large_descriptors;
29 bool has_fbcdc_algorithm;
30 bool has_fbcdc_architecture;
31 bool has_gpu_multicore_support;
32 bool has_gpu_virtualisation;
33 bool has_gs_rta_support;
35 bool has_isp_max_tiles_in_flight;
36 bool has_isp_samples_per_pixel;
37 bool has_isp_zls_d24_s8_packing_ogl_mode;
39 bool has_max_partitions;
41 bool has_meta_coremem_size;
43 bool has_num_clusters;
44 bool has_num_isp_ipp_pipes;
46 bool has_num_raster_pipes;
48 bool has_pbvnc_coreid_reg;
50 bool has_perf_counter_batch;
51 bool has_phys_bus_width;
52 bool has_riscv_fw_processor;
54 bool has_s7_top_infrastructure;
55 bool has_simple_internal_parameter_format;
56 bool has_simple_internal_parameter_format_v2;
57 bool has_simple_parameter_format_version;
59 bool has_slc_cache_line_size_bits;
60 bool has_slc_size_configurable;
61 bool has_slc_size_in_kilobytes;
63 bool has_sys_bus_secure_reset;
64 bool has_tessellation;
65 bool has_tile_region_protection;
69 bool has_tpu_cem_datamaster_global_registers;
70 bool has_tpu_dm_global_registers;
71 bool has_tpu_filtering_mode_control;
72 bool has_usc_min_output_registers_per_pix;
73 bool has_vdm_drawindirect;
74 bool has_vdm_object_level_lls;
75 bool has_virtual_address_space_bits;
76 bool has_watchdog_timer;
77 bool has_workgroup_protection;
78 bool has_xe_architecture;
79 bool has_xe_memory_hierarchy;
81 bool has_xpu_max_regbanks_addr_width;
82 bool has_xpu_max_slaves;
83 bool has_xpu_register_broadcast;
84 bool has_xt_top_infrastructure;
87 u64 cdm_control_stream_format;
88 u64 common_store_size_in_dwords;
90 u64 fbc_max_default_descriptors;
91 u64 fbc_max_large_descriptors;
94 u64 fbcdc_architecture;
95 u64 isp_max_tiles_in_flight;
96 u64 isp_samples_per_pixel;
100 u64 meta_coremem_size;
102 u64 num_isp_ipp_pipes;
104 u64 num_raster_pipes;
106 u64 simple_parameter_format_version;
108 u64 slc_cache_line_size_bits;
109 u64 slc_size_in_kilobytes;
112 u64 usc_min_output_registers_per_pix;
113 u64 virtual_address_space_bits;
115 u64 xpu_max_regbanks_addr_width;
117 u64 xpu_register_broadcast;
121 * struct pvr_device_quirks - Hardware quirk information
123 struct pvr_device_quirks {
139 * struct pvr_device_enhancements - Hardware enhancement information
141 struct pvr_device_enhancements {
152 void pvr_device_info_set_quirks(struct pvr_device *pvr_dev, const u64 *bitmask,
154 void pvr_device_info_set_enhancements(struct pvr_device *pvr_dev, const u64 *bitmask,
156 int pvr_device_info_set_features(struct pvr_device *pvr_dev, const u64 *features, u32 features_size,
157 u32 feature_param_size);
162 * These are the values for the 'meta' feature when the feature is present
163 * (as per &struct pvr_device_features)/
165 #define PVR_META_MTP218 (1)
166 #define PVR_META_MTP219 (2)
167 #define PVR_META_LTP218 (3)
168 #define PVR_META_LTP217 (4)
171 PVR_FEATURE_CDM_USER_MODE_QUEUE,
172 PVR_FEATURE_CLUSTER_GROUPING,
173 PVR_FEATURE_COMPUTE_MORTON_CAPABLE,
174 PVR_FEATURE_FB_CDC_V4,
175 PVR_FEATURE_GPU_MULTICORE_SUPPORT,
176 PVR_FEATURE_ISP_ZLS_D24_S8_PACKING_OGL_MODE,
177 PVR_FEATURE_REQUIRES_FB_CDC_ZLS_SETUP,
178 PVR_FEATURE_S7_TOP_INFRASTRUCTURE,
179 PVR_FEATURE_TESSELLATION,
180 PVR_FEATURE_TPU_DM_GLOBAL_REGISTERS,
181 PVR_FEATURE_VDM_DRAWINDIRECT,
182 PVR_FEATURE_VDM_OBJECT_LEVEL_LLS,
183 PVR_FEATURE_ZLS_SUBTILE,
186 #endif /* PVR_DEVICE_INFO_H */