1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2023 Intel Corporation 4 */ 5 6 #ifndef _XE_GT_REGS_H_ 7 #define _XE_GT_REGS_H_ 8 9 #include "regs/xe_reg_defs.h" 10 11 /* 12 * The GSI register range [0x0 - 0x40000) is replicated at a higher offset 13 * for the media GT. xe_mmio and xe_gt_mcr functions will automatically 14 * translate offsets by MEDIA_GT_GSI_OFFSET when operating on the media GT. 15 */ 16 #define MEDIA_GT_GSI_OFFSET 0x380000 17 #define MEDIA_GT_GSI_LENGTH 0x40000 18 19 /* MTL workpoint reg to get core C state and actual freq of 3D, SAMedia */ 20 #define MTL_MIRROR_TARGET_WP1 XE_REG(0xc60) 21 #define MTL_CAGF_MASK REG_GENMASK(8, 0) 22 #define MTL_CC_MASK REG_GENMASK(12, 9) 23 24 /* RPM unit config (Gen8+) */ 25 #define RPM_CONFIG0 XE_REG(0xd00) 26 #define RPM_CONFIG0_CRYSTAL_CLOCK_FREQ_MASK REG_GENMASK(5, 3) 27 #define RPM_CONFIG0_CRYSTAL_CLOCK_FREQ_24_MHZ 0 28 #define RPM_CONFIG0_CRYSTAL_CLOCK_FREQ_19_2_MHZ 1 29 #define RPM_CONFIG0_CRYSTAL_CLOCK_FREQ_38_4_MHZ 2 30 #define RPM_CONFIG0_CRYSTAL_CLOCK_FREQ_25_MHZ 3 31 #define RPM_CONFIG0_CTC_SHIFT_PARAMETER_MASK REG_GENMASK(2, 1) 32 33 #define FORCEWAKE_ACK_MEDIA_VDBOX(n) XE_REG(0xd50 + (n) * 4) 34 #define FORCEWAKE_ACK_MEDIA_VEBOX(n) XE_REG(0xd70 + (n) * 4) 35 #define FORCEWAKE_ACK_RENDER XE_REG(0xd84) 36 37 #define GMD_ID XE_REG(0xd8c) 38 #define GMD_ID_ARCH_MASK REG_GENMASK(31, 22) 39 #define GMD_ID_RELEASE_MASK REG_GENMASK(21, 14) 40 #define GMD_ID_REVID REG_GENMASK(5, 0) 41 42 #define FORCEWAKE_ACK_GSC XE_REG(0xdf8) 43 #define FORCEWAKE_ACK_GT_MTL XE_REG(0xdfc) 44 45 #define MCFG_MCR_SELECTOR XE_REG(0xfd0) 46 #define MTL_MCR_SELECTOR XE_REG(0xfd4) 47 #define SF_MCR_SELECTOR XE_REG(0xfd8) 48 #define MCR_SELECTOR XE_REG(0xfdc) 49 #define GAM_MCR_SELECTOR XE_REG(0xfe0) 50 #define MCR_MULTICAST REG_BIT(31) 51 #define MCR_SLICE_MASK REG_GENMASK(30, 27) 52 #define MCR_SLICE(slice) REG_FIELD_PREP(MCR_SLICE_MASK, slice) 53 #define MCR_SUBSLICE_MASK REG_GENMASK(26, 24) 54 #define MCR_SUBSLICE(subslice) REG_FIELD_PREP(MCR_SUBSLICE_MASK, subslice) 55 #define MTL_MCR_GROUPID REG_GENMASK(11, 8) 56 #define MTL_MCR_INSTANCEID REG_GENMASK(3, 0) 57 58 #define PS_INVOCATION_COUNT XE_REG(0x2348) 59 60 #define XELP_GLOBAL_MOCS(i) XE_REG(0x4000 + (i) * 4) 61 #define XEHP_GLOBAL_MOCS(i) XE_REG_MCR(0x4000 + (i) * 4) 62 #define LE_SSE_MASK REG_GENMASK(18, 17) 63 #define LE_SSE(value) REG_FIELD_PREP(LE_SSE_MASK, value) 64 #define LE_COS_MASK REG_GENMASK(16, 15) 65 #define LE_COS(value) REG_FIELD_PREP(LE_COS_MASK) 66 #define LE_SCF_MASK REG_BIT(14) 67 #define LE_SCF(value) REG_FIELD_PREP(LE_SCF_MASK, value) 68 #define LE_PFM_MASK REG_GENMASK(13, 11) 69 #define LE_PFM(value) REG_FIELD_PREP(LE_PFM_MASK, value) 70 #define LE_SCC_MASK REG_GENMASK(10, 8) 71 #define LE_SCC(value) REG_FIELD_PREP(LE_SCC_MASK, value) 72 #define LE_RSC_MASK REG_BIT(7) 73 #define LE_RSC(value) REG_FIELD_PREP(LE_RSC_MASK, value) 74 #define LE_AOM_MASK REG_BIT(6) 75 #define LE_AOM(value) REG_FIELD_PREP(LE_AOM_MASK, value) 76 #define LE_LRUM_MASK REG_GENMASK(5, 4) 77 #define LE_LRUM(value) REG_FIELD_PREP(LE_LRUM_MASK, value) 78 #define LE_TGT_CACHE_MASK REG_GENMASK(3, 2) 79 #define LE_TGT_CACHE(value) REG_FIELD_PREP(LE_TGT_CACHE_MASK, value) 80 #define LE_CACHEABILITY_MASK REG_GENMASK(1, 0) 81 #define LE_CACHEABILITY(value) REG_FIELD_PREP(LE_CACHEABILITY_MASK, value) 82 83 #define STATELESS_COMPRESSION_CTRL XE_REG_MCR(0x4148) 84 #define UNIFIED_COMPRESSION_FORMAT REG_GENMASK(3, 0) 85 86 #define XE2_GAMREQSTRM_CTRL XE_REG_MCR(0x4194) 87 #define CG_DIS_CNTLBUS REG_BIT(6) 88 89 #define CCS_AUX_INV XE_REG(0x4208) 90 91 #define VD0_AUX_INV XE_REG(0x4218) 92 #define VE0_AUX_INV XE_REG(0x4238) 93 94 #define VE1_AUX_INV XE_REG(0x42b8) 95 #define AUX_INV REG_BIT(0) 96 97 #define XE2_LMEM_CFG XE_REG(0x48b0) 98 99 #define XEHP_TILE_ADDR_RANGE(_idx) XE_REG_MCR(0x4900 + (_idx) * 4) 100 #define XEHP_FLAT_CCS_BASE_ADDR XE_REG_MCR(0x4910) 101 #define XEHP_FLAT_CCS_PTR REG_GENMASK(31, 8) 102 103 #define WM_CHICKEN3 XE_REG_MCR(0x5588, XE_REG_OPTION_MASKED) 104 #define HIZ_PLANE_COMPRESSION_DIS REG_BIT(10) 105 106 #define CHICKEN_RASTER_1 XE_REG_MCR(0x6204, XE_REG_OPTION_MASKED) 107 #define DIS_SF_ROUND_NEAREST_EVEN REG_BIT(8) 108 #define DIS_CLIP_NEGATIVE_BOUNDING_BOX REG_BIT(6) 109 110 #define CHICKEN_RASTER_2 XE_REG_MCR(0x6208, XE_REG_OPTION_MASKED) 111 #define TBIMR_FAST_CLIP REG_BIT(5) 112 113 #define FF_MODE XE_REG_MCR(0x6210) 114 #define DIS_TE_AUTOSTRIP REG_BIT(31) 115 #define VS_HIT_MAX_VALUE_MASK REG_GENMASK(25, 20) 116 #define DIS_MESH_PARTIAL_AUTOSTRIP REG_BIT(16) 117 #define DIS_MESH_AUTOSTRIP REG_BIT(15) 118 119 #define VFLSKPD XE_REG_MCR(0x62a8, XE_REG_OPTION_MASKED) 120 #define DIS_PARTIAL_AUTOSTRIP REG_BIT(9) 121 #define DIS_AUTOSTRIP REG_BIT(6) 122 #define DIS_OVER_FETCH_CACHE REG_BIT(1) 123 #define DIS_MULT_MISS_RD_SQUASH REG_BIT(0) 124 125 #define FF_MODE2 XE_REG(0x6604) 126 #define XEHP_FF_MODE2 XE_REG_MCR(0x6604) 127 #define FF_MODE2_GS_TIMER_MASK REG_GENMASK(31, 24) 128 #define FF_MODE2_GS_TIMER_224 REG_FIELD_PREP(FF_MODE2_GS_TIMER_MASK, 224) 129 #define FF_MODE2_TDS_TIMER_MASK REG_GENMASK(23, 16) 130 #define FF_MODE2_TDS_TIMER_128 REG_FIELD_PREP(FF_MODE2_TDS_TIMER_MASK, 4) 131 132 #define XEHPG_INSTDONE_GEOM_SVGUNIT XE_REG_MCR(0x666c) 133 134 #define CACHE_MODE_1 XE_REG(0x7004, XE_REG_OPTION_MASKED) 135 #define MSAA_OPTIMIZATION_REDUC_DISABLE REG_BIT(11) 136 137 #define COMMON_SLICE_CHICKEN1 XE_REG(0x7010, XE_REG_OPTION_MASKED) 138 #define DISABLE_BOTTOM_CLIP_RECTANGLE_TEST REG_BIT(14) 139 140 #define HIZ_CHICKEN XE_REG(0x7018, XE_REG_OPTION_MASKED) 141 #define DG1_HZ_READ_SUPPRESSION_OPTIMIZATION_DISABLE REG_BIT(14) 142 #define HZ_DEPTH_TEST_LE_GE_OPT_DISABLE REG_BIT(13) 143 144 #define XEHP_PSS_MODE2 XE_REG_MCR(0x703c, XE_REG_OPTION_MASKED) 145 #define SCOREBOARD_STALL_FLUSH_CONTROL REG_BIT(5) 146 147 #define XEHP_PSS_CHICKEN XE_REG_MCR(0x7044, XE_REG_OPTION_MASKED) 148 #define FLSH_IGNORES_PSD REG_BIT(10) 149 #define FD_END_COLLECT REG_BIT(5) 150 151 #define SC_INSTDONE XE_REG(0x7100) 152 #define SC_INSTDONE_EXTRA XE_REG(0x7104) 153 #define SC_INSTDONE_EXTRA2 XE_REG(0x7108) 154 155 #define XEHPG_SC_INSTDONE XE_REG_MCR(0x7100) 156 #define XEHPG_SC_INSTDONE_EXTRA XE_REG_MCR(0x7104) 157 #define XEHPG_SC_INSTDONE_EXTRA2 XE_REG_MCR(0x7108) 158 159 #define COMMON_SLICE_CHICKEN4 XE_REG(0x7300, XE_REG_OPTION_MASKED) 160 #define DISABLE_TDC_LOAD_BALANCING_CALC REG_BIT(6) 161 162 #define COMMON_SLICE_CHICKEN3 XE_REG(0x7304, XE_REG_OPTION_MASKED) 163 #define XEHP_COMMON_SLICE_CHICKEN3 XE_REG_MCR(0x7304, XE_REG_OPTION_MASKED) 164 #define DG1_FLOAT_POINT_BLEND_OPT_STRICT_MODE_EN REG_BIT(12) 165 #define XEHP_DUAL_SIMD8_SEQ_MERGE_DISABLE REG_BIT(12) 166 #define BLEND_EMB_FIX_DISABLE_IN_RCC REG_BIT(11) 167 #define DISABLE_CPS_AWARE_COLOR_PIPE REG_BIT(9) 168 169 #define XEHP_SLICE_COMMON_ECO_CHICKEN1 XE_REG_MCR(0x731c, XE_REG_OPTION_MASKED) 170 #define MSC_MSAA_REODER_BUF_BYPASS_DISABLE REG_BIT(14) 171 172 #define XE2LPM_CCCHKNREG1 XE_REG(0x82a8) 173 174 #define VF_PREEMPTION XE_REG(0x83a4, XE_REG_OPTION_MASKED) 175 #define PREEMPTION_VERTEX_COUNT REG_GENMASK(15, 0) 176 177 #define VF_SCRATCHPAD XE_REG(0x83a8, XE_REG_OPTION_MASKED) 178 #define XE2_VFG_TED_CREDIT_INTERFACE_DISABLE REG_BIT(13) 179 180 #define VFG_PREEMPTION_CHICKEN XE_REG(0x83b4, XE_REG_OPTION_MASKED) 181 #define POLYGON_TRIFAN_LINELOOP_DISABLE REG_BIT(4) 182 183 #define SQCNT1 XE_REG_MCR(0x8718) 184 #define XELPMP_SQCNT1 XE_REG(0x8718) 185 #define SQCNT1_PMON_ENABLE REG_BIT(30) 186 #define SQCNT1_OABPC REG_BIT(29) 187 #define ENFORCE_RAR REG_BIT(23) 188 189 #define XEHP_SQCM XE_REG_MCR(0x8724) 190 #define EN_32B_ACCESS REG_BIT(30) 191 192 #define XE2_FLAT_CCS_BASE_RANGE_LOWER XE_REG_MCR(0x8800) 193 #define XE2_FLAT_CCS_ENABLE REG_BIT(0) 194 #define XE2_FLAT_CCS_BASE_LOWER_ADDR_MASK REG_GENMASK(31, 6) 195 196 #define XE2_FLAT_CCS_BASE_RANGE_UPPER XE_REG_MCR(0x8804) 197 #define XE2_FLAT_CCS_BASE_UPPER_ADDR_MASK REG_GENMASK(7, 0) 198 199 #define GSCPSMI_BASE XE_REG(0x880c) 200 201 #define CCCHKNREG1 XE_REG_MCR(0x8828) 202 #define L3CMPCTRL REG_BIT(23) 203 #define ENCOMPPERFFIX REG_BIT(18) 204 205 /* Fuse readout registers for GT */ 206 #define XEHP_FUSE4 XE_REG(0x9114) 207 #define CFEG_WMTP_DISABLE REG_BIT(20) 208 #define CCS_EN_MASK REG_GENMASK(19, 16) 209 #define GT_L3_EXC_MASK REG_GENMASK(6, 4) 210 211 #define MIRROR_FUSE3 XE_REG(0x9118) 212 #define XE2_NODE_ENABLE_MASK REG_GENMASK(31, 16) 213 #define L3BANK_PAIR_COUNT 4 214 #define XEHPC_GT_L3_MODE_MASK REG_GENMASK(7, 4) 215 #define XE2_GT_L3_MODE_MASK REG_GENMASK(7, 4) 216 #define L3BANK_MASK REG_GENMASK(3, 0) 217 #define XELP_GT_L3_MODE_MASK REG_GENMASK(7, 0) 218 /* on Xe_HP the same fuses indicates mslices instead of L3 banks */ 219 #define MAX_MSLICES 4 220 #define MEML3_EN_MASK REG_GENMASK(3, 0) 221 222 #define MIRROR_FUSE1 XE_REG(0x911c) 223 224 #define XELP_EU_ENABLE XE_REG(0x9134) /* "_DISABLE" on Xe_LP */ 225 #define XELP_EU_MASK REG_GENMASK(7, 0) 226 #define XELP_GT_SLICE_ENABLE XE_REG(0x9138) 227 #define XELP_GT_GEOMETRY_DSS_ENABLE XE_REG(0x913c) 228 229 #define GT_VEBOX_VDBOX_DISABLE XE_REG(0x9140) 230 #define GT_VEBOX_DISABLE_MASK REG_GENMASK(19, 16) 231 #define GT_VDBOX_DISABLE_MASK REG_GENMASK(7, 0) 232 233 #define XEHP_GT_COMPUTE_DSS_ENABLE XE_REG(0x9144) 234 #define XEHPC_GT_COMPUTE_DSS_ENABLE_EXT XE_REG(0x9148) 235 #define XE2_GT_COMPUTE_DSS_2 XE_REG(0x914c) 236 #define XE2_GT_GEOMETRY_DSS_1 XE_REG(0x9150) 237 #define XE2_GT_GEOMETRY_DSS_2 XE_REG(0x9154) 238 239 #define GDRST XE_REG(0x941c) 240 #define GRDOM_GUC REG_BIT(3) 241 #define GRDOM_FULL REG_BIT(0) 242 243 #define MISCCPCTL XE_REG(0x9424) 244 #define DOP_CLOCK_GATE_RENDER_ENABLE REG_BIT(1) 245 246 #define UNSLCGCTL9430 XE_REG(0x9430) 247 #define MSQDUNIT_CLKGATE_DIS REG_BIT(3) 248 249 #define UNSLICE_UNIT_LEVEL_CLKGATE XE_REG(0x9434) 250 #define VFUNIT_CLKGATE_DIS REG_BIT(20) 251 #define TSGUNIT_CLKGATE_DIS REG_BIT(17) /* XEHPSDV */ 252 #define CG3DDISCFEG_CLKGATE_DIS REG_BIT(17) /* DG2 */ 253 #define GAMEDIA_CLKGATE_DIS REG_BIT(11) 254 #define HSUNIT_CLKGATE_DIS REG_BIT(8) 255 #define VSUNIT_CLKGATE_DIS REG_BIT(3) 256 257 #define UNSLCGCTL9440 XE_REG(0x9440) 258 #define GAMTLBOACS_CLKGATE_DIS REG_BIT(28) 259 #define GAMTLBVDBOX5_CLKGATE_DIS REG_BIT(27) 260 #define GAMTLBVDBOX6_CLKGATE_DIS REG_BIT(26) 261 #define GAMTLBVDBOX3_CLKGATE_DIS REG_BIT(24) 262 #define GAMTLBVDBOX4_CLKGATE_DIS REG_BIT(23) 263 #define GAMTLBVDBOX7_CLKGATE_DIS REG_BIT(22) 264 #define GAMTLBVDBOX2_CLKGATE_DIS REG_BIT(21) 265 #define GAMTLBVDBOX0_CLKGATE_DIS REG_BIT(17) 266 #define GAMTLBKCR_CLKGATE_DIS REG_BIT(16) 267 #define GAMTLBGUC_CLKGATE_DIS REG_BIT(15) 268 #define GAMTLBBLT_CLKGATE_DIS REG_BIT(14) 269 #define GAMTLBVDBOX1_CLKGATE_DIS REG_BIT(6) 270 271 #define UNSLCGCTL9444 XE_REG(0x9444) 272 #define GAMTLBGFXA0_CLKGATE_DIS REG_BIT(30) 273 #define GAMTLBGFXA1_CLKGATE_DIS REG_BIT(29) 274 #define GAMTLBCOMPA0_CLKGATE_DIS REG_BIT(28) 275 #define GAMTLBCOMPA1_CLKGATE_DIS REG_BIT(27) 276 #define GAMTLBCOMPB0_CLKGATE_DIS REG_BIT(26) 277 #define GAMTLBCOMPB1_CLKGATE_DIS REG_BIT(25) 278 #define GAMTLBCOMPC0_CLKGATE_DIS REG_BIT(24) 279 #define GAMTLBCOMPC1_CLKGATE_DIS REG_BIT(23) 280 #define GAMTLBCOMPD0_CLKGATE_DIS REG_BIT(22) 281 #define GAMTLBCOMPD1_CLKGATE_DIS REG_BIT(21) 282 #define GAMTLBMERT_CLKGATE_DIS REG_BIT(20) 283 #define GAMTLBVEBOX3_CLKGATE_DIS REG_BIT(19) 284 #define GAMTLBVEBOX2_CLKGATE_DIS REG_BIT(18) 285 #define GAMTLBVEBOX1_CLKGATE_DIS REG_BIT(17) 286 #define GAMTLBVEBOX0_CLKGATE_DIS REG_BIT(16) 287 #define LTCDD_CLKGATE_DIS REG_BIT(10) 288 289 #define UNSLCGCTL9454 XE_REG(0x9454) 290 #define LSCFE_CLKGATE_DIS REG_BIT(4) 291 292 #define XEHP_SLICE_UNIT_LEVEL_CLKGATE XE_REG_MCR(0x94d4) 293 #define L3_CR2X_CLKGATE_DIS REG_BIT(17) 294 #define L3_CLKGATE_DIS REG_BIT(16) 295 #define NODEDSS_CLKGATE_DIS REG_BIT(12) 296 #define MSCUNIT_CLKGATE_DIS REG_BIT(10) 297 #define RCCUNIT_CLKGATE_DIS REG_BIT(7) 298 #define SARBUNIT_CLKGATE_DIS REG_BIT(5) 299 #define SBEUNIT_CLKGATE_DIS REG_BIT(4) 300 301 #define UNSLICE_UNIT_LEVEL_CLKGATE2 XE_REG(0x94e4) 302 #define VSUNIT_CLKGATE2_DIS REG_BIT(19) 303 304 #define SUBSLICE_UNIT_LEVEL_CLKGATE XE_REG_MCR(0x9524) 305 #define DSS_ROUTER_CLKGATE_DIS REG_BIT(28) 306 #define GWUNIT_CLKGATE_DIS REG_BIT(16) 307 308 #define SUBSLICE_UNIT_LEVEL_CLKGATE2 XE_REG_MCR(0x9528) 309 #define CPSSUNIT_CLKGATE_DIS REG_BIT(9) 310 311 #define SSMCGCTL9530 XE_REG_MCR(0x9530) 312 #define RTFUNIT_CLKGATE_DIS REG_BIT(18) 313 314 #define DFR_RATIO_EN_AND_CHICKEN XE_REG_MCR(0x9550) 315 #define DFR_DISABLE REG_BIT(9) 316 317 #define RPNSWREQ XE_REG(0xa008) 318 #define REQ_RATIO_MASK REG_GENMASK(31, 23) 319 320 #define RP_CONTROL XE_REG(0xa024) 321 #define RPSWCTL_MASK REG_GENMASK(10, 9) 322 #define RPSWCTL_ENABLE REG_FIELD_PREP(RPSWCTL_MASK, 2) 323 #define RPSWCTL_DISABLE REG_FIELD_PREP(RPSWCTL_MASK, 0) 324 #define RC_CONTROL XE_REG(0xa090) 325 #define RC_CTL_HW_ENABLE REG_BIT(31) 326 #define RC_CTL_TO_MODE REG_BIT(28) 327 #define RC_CTL_RC6_ENABLE REG_BIT(18) 328 #define RC_STATE XE_REG(0xa094) 329 #define RC_IDLE_HYSTERSIS XE_REG(0xa0ac) 330 #define MEDIA_POWERGATE_IDLE_HYSTERESIS XE_REG(0xa0c4) 331 #define RENDER_POWERGATE_IDLE_HYSTERESIS XE_REG(0xa0c8) 332 333 #define PMINTRMSK XE_REG(0xa168) 334 #define PMINTR_DISABLE_REDIRECT_TO_GUC REG_BIT(31) 335 #define ARAT_EXPIRED_INTRMSK REG_BIT(9) 336 337 #define FORCEWAKE_GT XE_REG(0xa188) 338 339 #define POWERGATE_ENABLE XE_REG(0xa210) 340 #define RENDER_POWERGATE_ENABLE REG_BIT(0) 341 #define MEDIA_POWERGATE_ENABLE REG_BIT(1) 342 #define VDN_HCP_POWERGATE_ENABLE(n) REG_BIT(3 + 2 * (n)) 343 #define VDN_MFXVDENC_POWERGATE_ENABLE(n) REG_BIT(4 + 2 * (n)) 344 345 #define CTC_MODE XE_REG(0xa26c) 346 #define CTC_SHIFT_PARAMETER_MASK REG_GENMASK(2, 1) 347 #define CTC_SOURCE_DIVIDE_LOGIC REG_BIT(0) 348 349 #define FORCEWAKE_RENDER XE_REG(0xa278) 350 351 #define POWERGATE_DOMAIN_STATUS XE_REG(0xa2a0) 352 #define MEDIA_SLICE3_AWAKE_STATUS REG_BIT(4) 353 #define MEDIA_SLICE2_AWAKE_STATUS REG_BIT(3) 354 #define MEDIA_SLICE1_AWAKE_STATUS REG_BIT(2) 355 #define RENDER_AWAKE_STATUS REG_BIT(1) 356 #define MEDIA_SLICE0_AWAKE_STATUS REG_BIT(0) 357 358 #define FORCEWAKE_MEDIA_VDBOX(n) XE_REG(0xa540 + (n) * 4) 359 #define FORCEWAKE_MEDIA_VEBOX(n) XE_REG(0xa560 + (n) * 4) 360 #define FORCEWAKE_GSC XE_REG(0xa618) 361 362 #define XEHPC_LNCFMISCCFGREG0 XE_REG_MCR(0xb01c, XE_REG_OPTION_MASKED) 363 #define XEHPC_OVRLSCCC REG_BIT(0) 364 365 /* L3 Cache Control */ 366 #define LNCFCMOCS_REG_COUNT 32 367 #define XELP_LNCFCMOCS(i) XE_REG(0xb020 + (i) * 4) 368 #define XEHP_LNCFCMOCS(i) XE_REG_MCR(0xb020 + (i) * 4) 369 #define L3_UPPER_LKUP_MASK REG_BIT(23) 370 #define L3_UPPER_GLBGO_MASK REG_BIT(22) 371 #define L3_UPPER_IDX_CACHEABILITY_MASK REG_GENMASK(21, 20) 372 #define L3_UPPER_IDX_SCC_MASK REG_GENMASK(19, 17) 373 #define L3_UPPER_IDX_ESC_MASK REG_BIT(16) 374 #define L3_LKUP_MASK REG_BIT(7) 375 #define L3_LKUP(value) REG_FIELD_PREP(L3_LKUP_MASK, value) 376 #define L3_GLBGO_MASK REG_BIT(6) 377 #define L3_GLBGO(value) REG_FIELD_PREP(L3_GLBGO_MASK, value) 378 #define L3_CACHEABILITY_MASK REG_GENMASK(5, 4) 379 #define L3_CACHEABILITY(value) REG_FIELD_PREP(L3_CACHEABILITY_MASK, value) 380 #define L3_SCC_MASK REG_GENMASK(3, 1) 381 #define L3_SCC(value) REG_FIELD_PREP(L3_SCC_MASK, value) 382 #define L3_ESC_MASK REG_BIT(0) 383 #define L3_ESC(value) REG_FIELD_PREP(L3_ESC_MASK, value) 384 385 #define XEHP_L3NODEARBCFG XE_REG_MCR(0xb0b4) 386 #define XEHP_LNESPARE REG_BIT(19) 387 388 #define L3SQCREG2 XE_REG_MCR(0xb104) 389 #define COMPMEMRD256BOVRFETCHEN REG_BIT(20) 390 391 #define L3SQCREG3 XE_REG_MCR(0xb108) 392 #define COMPPWOVERFETCHEN REG_BIT(28) 393 394 #define SCRATCH3_LBCF XE_REG_MCR(0xb154) 395 #define RWFLUSHALLEN REG_BIT(17) 396 397 #define XEHP_L3SQCREG5 XE_REG_MCR(0xb158) 398 #define L3_PWM_TIMER_INIT_VAL_MASK REG_GENMASK(9, 0) 399 400 #define XEHP_L3SCQREG7 XE_REG_MCR(0xb188) 401 #define BLEND_FILL_CACHING_OPT_DIS REG_BIT(3) 402 403 #define XEHPC_L3CLOS_MASK(i) XE_REG_MCR(0xb194 + (i) * 8) 404 405 #define XE2_GLOBAL_INVAL XE_REG(0xb404) 406 407 #define XE2LPM_L3SQCREG2 XE_REG_MCR(0xb604) 408 409 #define XE2LPM_L3SQCREG3 XE_REG_MCR(0xb608) 410 411 #define XE2LPM_SCRATCH3_LBCF XE_REG_MCR(0xb654) 412 413 #define XE2LPM_L3SQCREG5 XE_REG_MCR(0xb658) 414 415 #define XE2_TDF_CTRL XE_REG(0xb418) 416 #define TRANSIENT_FLUSH_REQUEST REG_BIT(0) 417 418 #define XEHP_MERT_MOD_CTRL XE_REG_MCR(0xcf28) 419 #define RENDER_MOD_CTRL XE_REG_MCR(0xcf2c) 420 #define COMP_MOD_CTRL XE_REG_MCR(0xcf30) 421 #define XEHP_VDBX_MOD_CTRL XE_REG_MCR(0xcf34) 422 #define XELPMP_VDBX_MOD_CTRL XE_REG(0xcf34) 423 #define XEHP_VEBX_MOD_CTRL XE_REG_MCR(0xcf38) 424 #define XELPMP_VEBX_MOD_CTRL XE_REG(0xcf38) 425 #define FORCE_MISS_FTLB REG_BIT(3) 426 427 #define XEHP_GAMSTLB_CTRL XE_REG_MCR(0xcf4c) 428 #define CONTROL_BLOCK_CLKGATE_DIS REG_BIT(12) 429 #define EGRESS_BLOCK_CLKGATE_DIS REG_BIT(11) 430 #define TAG_BLOCK_CLKGATE_DIS REG_BIT(7) 431 432 #define XEHP_GAMCNTRL_CTRL XE_REG_MCR(0xcf54) 433 #define INVALIDATION_BROADCAST_MODE_DIS REG_BIT(12) 434 #define GLOBAL_INVALIDATION_MODE REG_BIT(2) 435 436 #define LMEM_CFG XE_REG(0xcf58) 437 #define LMEM_EN REG_BIT(31) 438 #define LMTT_DIR_PTR REG_GENMASK(30, 0) /* in multiples of 64KB */ 439 440 #define HALF_SLICE_CHICKEN5 XE_REG_MCR(0xe188, XE_REG_OPTION_MASKED) 441 #define DISABLE_SAMPLE_G_PERFORMANCE REG_BIT(0) 442 443 #define SAMPLER_INSTDONE XE_REG_MCR(0xe160) 444 #define ROW_INSTDONE XE_REG_MCR(0xe164) 445 446 #define SAMPLER_MODE XE_REG_MCR(0xe18c, XE_REG_OPTION_MASKED) 447 #define ENABLE_SMALLPL REG_BIT(15) 448 #define SC_DISABLE_POWER_OPTIMIZATION_EBB REG_BIT(9) 449 #define SAMPLER_ENABLE_HEADLESS_MSG REG_BIT(5) 450 #define INDIRECT_STATE_BASE_ADDR_OVERRIDE REG_BIT(0) 451 452 #define HALF_SLICE_CHICKEN7 XE_REG_MCR(0xe194, XE_REG_OPTION_MASKED) 453 #define DG2_DISABLE_ROUND_ENABLE_ALLOW_FOR_SSLA REG_BIT(15) 454 #define CLEAR_OPTIMIZATION_DISABLE REG_BIT(6) 455 456 #define CACHE_MODE_SS XE_REG_MCR(0xe420, XE_REG_OPTION_MASKED) 457 #define DISABLE_ECC REG_BIT(5) 458 #define ENABLE_PREFETCH_INTO_IC REG_BIT(3) 459 460 #define ROW_CHICKEN4 XE_REG_MCR(0xe48c, XE_REG_OPTION_MASKED) 461 #define DISABLE_GRF_CLEAR REG_BIT(13) 462 #define XEHP_DIS_BBL_SYSPIPE REG_BIT(11) 463 #define DISABLE_TDL_PUSH REG_BIT(9) 464 #define DIS_PICK_2ND_EU REG_BIT(7) 465 #define DISABLE_HDR_PAST_PAYLOAD_HOLD_FIX REG_BIT(4) 466 #define THREAD_EX_ARB_MODE REG_GENMASK(3, 2) 467 #define THREAD_EX_ARB_MODE_RR_AFTER_DEP REG_FIELD_PREP(THREAD_EX_ARB_MODE, 0x2) 468 469 #define ROW_CHICKEN3 XE_REG_MCR(0xe49c, XE_REG_OPTION_MASKED) 470 #define XE2_EUPEND_CHK_FLUSH_DIS REG_BIT(14) 471 #define DIS_FIX_EOT1_FLUSH REG_BIT(9) 472 473 #define TDL_TSL_CHICKEN XE_REG_MCR(0xe4c4, XE_REG_OPTION_MASKED) 474 #define STK_ID_RESTRICT REG_BIT(12) 475 #define SLM_WMTP_RESTORE REG_BIT(11) 476 477 #define ROW_CHICKEN XE_REG_MCR(0xe4f0, XE_REG_OPTION_MASKED) 478 #define UGM_BACKUP_MODE REG_BIT(13) 479 #define MDQ_ARBITRATION_MODE REG_BIT(12) 480 #define STALL_DOP_GATING_DISABLE REG_BIT(5) 481 #define EARLY_EOT_DIS REG_BIT(1) 482 483 #define ROW_CHICKEN2 XE_REG_MCR(0xe4f4, XE_REG_OPTION_MASKED) 484 #define DISABLE_READ_SUPPRESSION REG_BIT(15) 485 #define DISABLE_EARLY_READ REG_BIT(14) 486 #define ENABLE_LARGE_GRF_MODE REG_BIT(12) 487 #define PUSH_CONST_DEREF_HOLD_DIS REG_BIT(8) 488 #define DISABLE_TDL_SVHS_GATING REG_BIT(1) 489 #define DISABLE_DOP_GATING REG_BIT(0) 490 491 #define RT_CTRL XE_REG_MCR(0xe530) 492 #define DIS_NULL_QUERY REG_BIT(10) 493 494 #define EU_SYSTOLIC_LIC_THROTTLE_CTL_WITH_LOCK XE_REG_MCR(0xe534) 495 #define EU_SYSTOLIC_LIC_THROTTLE_CTL_LOCK_BIT REG_BIT(31) 496 497 #define XEHP_HDC_CHICKEN0 XE_REG_MCR(0xe5f0, XE_REG_OPTION_MASKED) 498 #define LSC_L1_FLUSH_CTL_3D_DATAPORT_FLUSH_EVENTS_MASK REG_GENMASK(13, 11) 499 #define DIS_ATOMIC_CHAINING_TYPED_WRITES REG_BIT(3) 500 501 #define LSC_CHICKEN_BIT_0 XE_REG_MCR(0xe7c8) 502 #define DISABLE_D8_D16_COASLESCE REG_BIT(30) 503 #define WR_REQ_CHAINING_DIS REG_BIT(26) 504 #define TGM_WRITE_EOM_FORCE REG_BIT(17) 505 #define FORCE_1_SUB_MESSAGE_PER_FRAGMENT REG_BIT(15) 506 #define SEQUENTIAL_ACCESS_UPGRADE_DISABLE REG_BIT(13) 507 508 #define LSC_CHICKEN_BIT_0_UDW XE_REG_MCR(0xe7c8 + 4) 509 #define UGM_FRAGMENT_THRESHOLD_TO_3 REG_BIT(58 - 32) 510 #define DIS_CHAIN_2XSIMD8 REG_BIT(55 - 32) 511 #define XE2_ALLOC_DPA_STARVE_FIX_DIS REG_BIT(47 - 32) 512 #define ENABLE_SMP_LD_RENDER_SURFACE_CONTROL REG_BIT(44 - 32) 513 #define FORCE_SLM_FENCE_SCOPE_TO_TILE REG_BIT(42 - 32) 514 #define FORCE_UGM_FENCE_SCOPE_TO_TILE REG_BIT(41 - 32) 515 #define MAXREQS_PER_BANK REG_GENMASK(39 - 32, 37 - 32) 516 #define DISABLE_128B_EVICTION_COMMAND_UDW REG_BIT(36 - 32) 517 518 #define SARB_CHICKEN1 XE_REG_MCR(0xe90c) 519 #define COMP_CKN_IN REG_GENMASK(30, 29) 520 521 #define RCU_MODE XE_REG(0x14800, XE_REG_OPTION_MASKED) 522 #define RCU_MODE_FIXED_SLICE_CCS_MODE REG_BIT(1) 523 #define RCU_MODE_CCS_ENABLE REG_BIT(0) 524 525 /* 526 * Total of 4 cslices, where each cslice is in the form: 527 * [0-3] CCS ID 528 * [4-6] RSVD 529 * [7] Disabled 530 */ 531 #define CCS_MODE XE_REG(0x14804, XE_REG_OPTION_MASKED) 532 #define CCS_MODE_CSLICE_0_3_MASK REG_GENMASK(11, 0) /* 3 bits per cslice */ 533 #define CCS_MODE_CSLICE_MASK 0x7 /* CCS0-3 + rsvd */ 534 #define CCS_MODE_CSLICE_WIDTH ilog2(CCS_MODE_CSLICE_MASK + 1) 535 #define CCS_MODE_CSLICE(cslice, ccs) \ 536 ((ccs) << ((cslice) * CCS_MODE_CSLICE_WIDTH)) 537 538 #define FORCEWAKE_ACK_GT XE_REG(0x130044) 539 540 /* Applicable for all FORCEWAKE_DOMAIN and FORCEWAKE_ACK_DOMAIN regs */ 541 #define FORCEWAKE_KERNEL 0 542 #define FORCEWAKE_MT(bit) BIT(bit) 543 #define FORCEWAKE_MT_MASK(bit) BIT((bit) + 16) 544 545 #define MTL_MEDIA_PERF_LIMIT_REASONS XE_REG(0x138030) 546 #define MTL_MEDIA_MC6 XE_REG(0x138048) 547 548 #define GT_CORE_STATUS XE_REG(0x138060) 549 #define RCN_MASK REG_GENMASK(2, 0) 550 #define GT_C0 0 551 #define GT_C6 3 552 553 #define GT_GFX_RC6_LOCKED XE_REG(0x138104) 554 #define GT_GFX_RC6 XE_REG(0x138108) 555 556 #define GT0_PERF_LIMIT_REASONS XE_REG(0x1381a8) 557 #define GT0_PERF_LIMIT_REASONS_MASK 0xde3 558 #define PROCHOT_MASK REG_BIT(0) 559 #define THERMAL_LIMIT_MASK REG_BIT(1) 560 #define RATL_MASK REG_BIT(5) 561 #define VR_THERMALERT_MASK REG_BIT(6) 562 #define VR_TDC_MASK REG_BIT(7) 563 #define POWER_LIMIT_4_MASK REG_BIT(8) 564 #define POWER_LIMIT_1_MASK REG_BIT(10) 565 #define POWER_LIMIT_2_MASK REG_BIT(11) 566 567 #define GT_PERF_STATUS XE_REG(0x1381b4) 568 #define VOLTAGE_MASK REG_GENMASK(10, 0) 569 570 #define SFC_DONE(n) XE_REG(0x1cc000 + (n) * 0x1000) 571 572 #endif 573