pvr_device_info.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. /* SPDX-License-Identifier: GPL-2.0-only OR MIT */
  2. /* Copyright (c) 2023 Imagination Technologies Ltd. */
  3. #ifndef PVR_DEVICE_INFO_H
  4. #define PVR_DEVICE_INFO_H
  5. #include <linux/types.h>
  6. struct pvr_device;
  7. /*
  8. * struct pvr_device_features - Hardware feature information
  9. */
  10. struct pvr_device_features {
  11. bool has_axi_acelite;
  12. bool has_cdm_control_stream_format;
  13. bool has_cluster_grouping;
  14. bool has_common_store_size_in_dwords;
  15. bool has_compute;
  16. bool has_compute_morton_capable;
  17. bool has_compute_overlap;
  18. bool has_coreid_per_os;
  19. bool has_dynamic_dust_power;
  20. bool has_ecc_rams;
  21. bool has_fb_cdc_v4;
  22. bool has_fbc_max_default_descriptors;
  23. bool has_fbc_max_large_descriptors;
  24. bool has_fbcdc;
  25. bool has_fbcdc_algorithm;
  26. bool has_fbcdc_architecture;
  27. bool has_gpu_multicore_support;
  28. bool has_gpu_virtualisation;
  29. bool has_gs_rta_support;
  30. bool has_irq_per_os;
  31. bool has_isp_max_tiles_in_flight;
  32. bool has_isp_samples_per_pixel;
  33. bool has_isp_zls_d24_s8_packing_ogl_mode;
  34. bool has_layout_mars;
  35. bool has_max_partitions;
  36. bool has_meta;
  37. bool has_meta_coremem_size;
  38. bool has_mips;
  39. bool has_num_clusters;
  40. bool has_num_isp_ipp_pipes;
  41. bool has_num_osids;
  42. bool has_num_raster_pipes;
  43. bool has_pbe2_in_xe;
  44. bool has_pbvnc_coreid_reg;
  45. bool has_perfbus;
  46. bool has_perf_counter_batch;
  47. bool has_phys_bus_width;
  48. bool has_riscv_fw_processor;
  49. bool has_roguexe;
  50. bool has_s7_top_infrastructure;
  51. bool has_simple_internal_parameter_format;
  52. bool has_simple_internal_parameter_format_v2;
  53. bool has_simple_parameter_format_version;
  54. bool has_slc_banks;
  55. bool has_slc_cache_line_size_bits;
  56. bool has_slc_size_configurable;
  57. bool has_slc_size_in_kilobytes;
  58. bool has_soc_timer;
  59. bool has_sys_bus_secure_reset;
  60. bool has_tessellation;
  61. bool has_tile_region_protection;
  62. bool has_tile_size_x;
  63. bool has_tile_size_y;
  64. bool has_tla;
  65. bool has_tpu_cem_datamaster_global_registers;
  66. bool has_tpu_dm_global_registers;
  67. bool has_tpu_filtering_mode_control;
  68. bool has_usc_min_output_registers_per_pix;
  69. bool has_vdm_drawindirect;
  70. bool has_vdm_object_level_lls;
  71. bool has_virtual_address_space_bits;
  72. bool has_watchdog_timer;
  73. bool has_workgroup_protection;
  74. bool has_xe_architecture;
  75. bool has_xe_memory_hierarchy;
  76. bool has_xe_tpu2;
  77. bool has_xpu_max_regbanks_addr_width;
  78. bool has_xpu_max_slaves;
  79. bool has_xpu_register_broadcast;
  80. bool has_xt_top_infrastructure;
  81. bool has_zls_subtile;
  82. u64 cdm_control_stream_format;
  83. u64 common_store_size_in_dwords;
  84. u64 ecc_rams;
  85. u64 fbc_max_default_descriptors;
  86. u64 fbc_max_large_descriptors;
  87. u64 fbcdc;
  88. u64 fbcdc_algorithm;
  89. u64 fbcdc_architecture;
  90. u64 isp_max_tiles_in_flight;
  91. u64 isp_samples_per_pixel;
  92. u64 layout_mars;
  93. u64 max_partitions;
  94. u64 meta;
  95. u64 meta_coremem_size;
  96. u64 num_clusters;
  97. u64 num_isp_ipp_pipes;
  98. u64 num_osids;
  99. u64 num_raster_pipes;
  100. u64 phys_bus_width;
  101. u64 simple_parameter_format_version;
  102. u64 slc_banks;
  103. u64 slc_cache_line_size_bits;
  104. u64 slc_size_in_kilobytes;
  105. u64 tile_size_x;
  106. u64 tile_size_y;
  107. u64 usc_min_output_registers_per_pix;
  108. u64 virtual_address_space_bits;
  109. u64 xe_architecture;
  110. u64 xpu_max_regbanks_addr_width;
  111. u64 xpu_max_slaves;
  112. u64 xpu_register_broadcast;
  113. };
  114. /*
  115. * struct pvr_device_quirks - Hardware quirk information
  116. */
  117. struct pvr_device_quirks {
  118. bool has_brn44079;
  119. bool has_brn47217;
  120. bool has_brn48492;
  121. bool has_brn48545;
  122. bool has_brn49927;
  123. bool has_brn50767;
  124. bool has_brn51764;
  125. bool has_brn62269;
  126. bool has_brn63142;
  127. bool has_brn63553;
  128. bool has_brn66011;
  129. bool has_brn71242;
  130. };
  131. /*
  132. * struct pvr_device_enhancements - Hardware enhancement information
  133. */
  134. struct pvr_device_enhancements {
  135. bool has_ern35421;
  136. bool has_ern38020;
  137. bool has_ern38748;
  138. bool has_ern42064;
  139. bool has_ern42290;
  140. bool has_ern42606;
  141. bool has_ern47025;
  142. bool has_ern57596;
  143. };
  144. void pvr_device_info_set_quirks(struct pvr_device *pvr_dev, const u64 *bitmask,
  145. u32 bitmask_len);
  146. void pvr_device_info_set_enhancements(struct pvr_device *pvr_dev, const u64 *bitmask,
  147. u32 bitmask_len);
  148. int pvr_device_info_set_features(struct pvr_device *pvr_dev, const u64 *features, u32 features_size,
  149. u32 feature_param_size);
  150. /*
  151. * Meta cores
  152. *
  153. * These are the values for the 'meta' feature when the feature is present
  154. * (as per &struct pvr_device_features)/
  155. */
  156. #define PVR_META_MTP218 (1)
  157. #define PVR_META_MTP219 (2)
  158. #define PVR_META_LTP218 (3)
  159. #define PVR_META_LTP217 (4)
  160. enum {
  161. PVR_FEATURE_CDM_USER_MODE_QUEUE,
  162. PVR_FEATURE_CLUSTER_GROUPING,
  163. PVR_FEATURE_COMPUTE_MORTON_CAPABLE,
  164. PVR_FEATURE_FB_CDC_V4,
  165. PVR_FEATURE_GPU_MULTICORE_SUPPORT,
  166. PVR_FEATURE_ISP_ZLS_D24_S8_PACKING_OGL_MODE,
  167. PVR_FEATURE_REQUIRES_FB_CDC_ZLS_SETUP,
  168. PVR_FEATURE_S7_TOP_INFRASTRUCTURE,
  169. PVR_FEATURE_TESSELLATION,
  170. PVR_FEATURE_TPU_DM_GLOBAL_REGISTERS,
  171. PVR_FEATURE_VDM_DRAWINDIRECT,
  172. PVR_FEATURE_VDM_OBJECT_LEVEL_LLS,
  173. PVR_FEATURE_ZLS_SUBTILE,
  174. };
  175. #endif /* PVR_DEVICE_INFO_H */