Lines Matching +full:0 +full:x60200
106 * #define _FOO_A 0xf000
107 * #define _FOO_B 0xf001
111 * #define FOO_MODE_BAR REG_FIELD_PREP(FOO_MODE_MASK, 0)
115 * #define BAR _MMIO(0xb000)
116 * #define GEN8_BAR _MMIO(0xb888)
119 #define GU_CNTL_PROTECTED _MMIO(0x10100C)
122 #define GU_CNTL _MMIO(0x101010)
125 #define GU_DEBUG _MMIO(0x101018)
128 #define GEN6_STOLEN_RESERVED _MMIO(0x1082C0)
129 #define GEN6_STOLEN_RESERVED_ADDR_MASK (0xFFF << 20)
130 #define GEN7_STOLEN_RESERVED_ADDR_MASK (0x3FFF << 18)
132 #define GEN6_STOLEN_RESERVED_1M (0 << 4)
137 #define GEN7_STOLEN_RESERVED_1M (0 << 5)
140 #define GEN8_STOLEN_RESERVED_1M (0 << 7)
144 #define GEN6_STOLEN_RESERVED_ENABLE (1 << 0)
145 #define GEN11_STOLEN_RESERVED_ADDR_MASK (0xFFFFFFFFFFFULL << 20)
147 #define _VGA_MSR_WRITE _MMIO(0x3c2)
149 #define _GEN7_PIPEA_DE_LOAD_SL 0x70068
150 #define _GEN7_PIPEB_DE_LOAD_SL 0x71068
156 #define DEBUG_RESET_I830 _MMIO(0x6070)
164 #define VLV_IOSF_DOORBELL_REQ _MMIO(VLV_DISPLAY_BASE + 0x2100)
170 #define IOSF_SB_BUSY (1 << 0)
171 #define IOSF_PORT_BUNIT 0x03
172 #define IOSF_PORT_PUNIT 0x04
173 #define IOSF_PORT_NC 0x11
174 #define IOSF_PORT_DPIO 0x12
175 #define IOSF_PORT_GPIO_NC 0x13
176 #define IOSF_PORT_CCK 0x14
177 #define IOSF_PORT_DPIO_2 0x1a
178 #define IOSF_PORT_FLISDSI 0x1b
179 #define IOSF_PORT_GPIO_SC 0x48
180 #define IOSF_PORT_GPIO_SUS 0xa8
181 #define IOSF_PORT_CCU 0xa9
182 #define CHV_IOSF_PORT_GPIO_N 0x13
183 #define CHV_IOSF_PORT_GPIO_SE 0x48
184 #define CHV_IOSF_PORT_GPIO_E 0xa8
185 #define CHV_IOSF_PORT_GPIO_SW 0xb2
186 #define VLV_IOSF_DATA _MMIO(VLV_DISPLAY_BASE + 0x2104)
187 #define VLV_IOSF_ADDR _MMIO(VLV_DISPLAY_BASE + 0x2108)
190 #define DPIO_DEVFN 0
192 #define DPIO_CTL _MMIO(VLV_DISPLAY_BASE + 0x2110)
196 #define DPIO_CMNRST (1 << 0)
198 #define BXT_P_CR_GT_DISP_PWRON _MMIO(0x138090)
201 #define _BXT_PHY_CTL_DDI_A 0x64C00
202 #define _BXT_PHY_CTL_DDI_B 0x64C10
203 #define _BXT_PHY_CTL_DDI_C 0x64C20
210 #define _PHY_CTL_FAMILY_DDI 0x64C90
211 #define _PHY_CTL_FAMILY_EDP 0x64C80
212 #define _PHY_CTL_FAMILY_DDI_C 0x64CA0
220 #define UAIMI_SPR1 _MMIO(0x4F074)
222 #define SKL_VCCIO_MASK 0x1
224 #define DISPIO_CR_TX_BMU_CR0 _MMIO(0x6C00C)
234 * [0-7] @ 0x2000 gen2,gen3
235 * [8-15] @ 0x3000 945,g33,pnv
237 * [0-15] @ 0x3000 gen4,gen5
239 * [0-15] @ 0x100000 gen6,vlv,chv
240 * [0-31] @ 0x100000 gen7+
242 #define FENCE_REG(i) _MMIO(0x2000 + (((i) & 8) << 9) + ((i) & 7) * 4)
243 #define I830_FENCE_START_MASK 0x07f80000
247 #define I830_FENCE_REG_VALID (1 << 0)
252 #define I915_FENCE_START_MASK 0x0ff00000
255 #define FENCE_REG_965_LO(i) _MMIO(0x03000 + (i) * 8)
256 #define FENCE_REG_965_HI(i) _MMIO(0x03000 + (i) * 8 + 4)
259 #define I965_FENCE_REG_VALID (1 << 0)
260 #define I965_FENCE_MAX_PITCH_VAL 0x0400
262 #define FENCE_REG_GEN6_LO(i) _MMIO(0x100000 + (i) * 8)
263 #define FENCE_REG_GEN6_HI(i) _MMIO(0x100000 + (i) * 8 + 4)
265 #define GEN7_FENCE_MAX_PITCH_VAL 0x0800
269 #define TILECTL _MMIO(0x101000)
270 #define TILECTL_SWZCTL (1 << 0)
278 #define PGTBL_CTL _MMIO(0x02020)
279 #define PGTBL_ADDRESS_LO_MASK 0xfffff000 /* bits [31:12] */
280 #define PGTBL_ADDRESS_HI_MASK 0x000000f0 /* bits [35:32] (gen4) */
281 #define PGTBL_ER _MMIO(0x02024)
282 #define PRB0_BASE (0x2030 - 0x30)
283 #define PRB1_BASE (0x2040 - 0x30) /* 830,gen3 */
284 #define PRB2_BASE (0x2050 - 0x30) /* gen3 */
285 #define SRB0_BASE (0x2100 - 0x30) /* gen2 */
286 #define SRB1_BASE (0x2110 - 0x30) /* gen2 */
287 #define SRB2_BASE (0x2120 - 0x30) /* 830 */
288 #define SRB3_BASE (0x2130 - 0x30) /* 830 */
289 #define RENDER_RING_BASE 0x02000
290 #define BSD_RING_BASE 0x04000
291 #define GEN6_BSD_RING_BASE 0x12000
292 #define GEN8_BSD2_RING_BASE 0x1c000
293 #define GEN11_BSD_RING_BASE 0x1c0000
294 #define GEN11_BSD2_RING_BASE 0x1c4000
295 #define GEN11_BSD3_RING_BASE 0x1d0000
296 #define GEN11_BSD4_RING_BASE 0x1d4000
297 #define XEHP_BSD5_RING_BASE 0x1e0000
298 #define XEHP_BSD6_RING_BASE 0x1e4000
299 #define XEHP_BSD7_RING_BASE 0x1f0000
300 #define XEHP_BSD8_RING_BASE 0x1f4000
301 #define VEBOX_RING_BASE 0x1a000
302 #define GEN11_VEBOX_RING_BASE 0x1c8000
303 #define GEN11_VEBOX2_RING_BASE 0x1d8000
304 #define XEHP_VEBOX3_RING_BASE 0x1e8000
305 #define XEHP_VEBOX4_RING_BASE 0x1f8000
306 #define MTL_GSC_RING_BASE 0x11a000
307 #define GEN12_COMPUTE0_RING_BASE 0x1a000
308 #define GEN12_COMPUTE1_RING_BASE 0x1c000
309 #define GEN12_COMPUTE2_RING_BASE 0x1e000
310 #define GEN12_COMPUTE3_RING_BASE 0x26000
311 #define BLT_RING_BASE 0x22000
312 #define XEHPC_BCS1_RING_BASE 0x3e0000
313 #define XEHPC_BCS2_RING_BASE 0x3e2000
314 #define XEHPC_BCS3_RING_BASE 0x3e4000
315 #define XEHPC_BCS4_RING_BASE 0x3e6000
316 #define XEHPC_BCS5_RING_BASE 0x3e8000
317 #define XEHPC_BCS6_RING_BASE 0x3ea000
318 #define XEHPC_BCS7_RING_BASE 0x3ec000
319 #define XEHPC_BCS8_RING_BASE 0x3ee000
320 #define DG1_GSC_HECI1_BASE 0x00258000
321 #define DG1_GSC_HECI2_BASE 0x00259000
322 #define DG2_GSC_HECI1_BASE 0x00373000
323 #define DG2_GSC_HECI2_BASE 0x00374000
324 #define MTL_GSC_HECI1_BASE 0x00116000
325 #define MTL_GSC_HECI2_BASE 0x00117000
327 #define HECI_H_CSR(base) _MMIO((base) + 0x4)
328 #define HECI_H_CSR_IE REG_BIT(0)
334 #define HECI_H_GS1(base) _MMIO((base) + 0xc4c)
335 #define HECI_H_GS1_ER_PREP REG_BIT(0)
341 #define HECI_FWSTS1 0xc40
342 #define HECI1_FWSTS1_CURRENT_STATE REG_GENMASK(3, 0)
343 #define HECI1_FWSTS1_CURRENT_STATE_RESET 0
346 #define HECI_FWSTS2 0xc48
347 #define HECI_FWSTS3 0xc60
348 #define HECI_FWSTS4 0xc64
349 #define HECI_FWSTS5 0xc68
351 #define HECI_FWSTS6 0xc6c
353 /* the FWSTS regs are 1-based, so we use -base for index 0 to get an invalid reg */
362 #define HSW_GTT_CACHE_EN _MMIO(0x4024)
363 #define GTT_CACHE_EN_ALL 0xF0007FFF
364 #define GEN7_WR_WATERMARK _MMIO(0x4028)
365 #define GEN7_GFX_PRIO_CTRL _MMIO(0x402C)
366 #define ARB_MODE _MMIO(0x4030)
369 #define GEN7_GFX_PEND_TLB0 _MMIO(0x4034)
370 #define GEN7_GFX_PEND_TLB1 _MMIO(0x4038)
372 #define GEN7_LRA_LIMITS(i) _MMIO(0x403C + (i) * 4)
374 #define GEN7_MEDIA_MAX_REQ_COUNT _MMIO(0x4070)
375 #define GEN7_GFX_MAX_REQ_COUNT _MMIO(0x4074)
377 #define GEN7_ERR_INT _MMIO(0x44040)
386 #define ERR_INT_FIFO_UNDERRUN_A (1 << 0)
389 #define FPGA_DBG _MMIO(0x42300)
392 #define CLAIM_ER _MMIO(VLV_DISPLAY_BASE + 0x2028)
395 #define CLAIM_ER_CTR_MASK REG_GENMASK(15, 0)
397 #define DERRMR _MMIO(0x44050)
399 #define DERRMR_PIPEA_SCANLINE (1 << 0)
416 #define VLV_GU_CTL0 _MMIO(VLV_DISPLAY_BASE + 0x2030)
417 #define VLV_GU_CTL1 _MMIO(VLV_DISPLAY_BASE + 0x2034)
418 #define SCPD0 _MMIO(0x209c) /* 915+ only */
421 #define GEN2_IER _MMIO(0x20a0)
422 #define GEN2_IIR _MMIO(0x20a4)
423 #define GEN2_IMR _MMIO(0x20a8)
424 #define GEN2_ISR _MMIO(0x20ac)
430 #define VLV_GUNIT_CLOCK_GATE _MMIO(VLV_DISPLAY_BASE + 0x2060)
433 #define VLV_GUNIT_CLOCK_GATE2 _MMIO(VLV_DISPLAY_BASE + 0x2064)
434 #define VLV_IIR_RW _MMIO(VLV_DISPLAY_BASE + 0x2084)
435 #define VLV_IER _MMIO(VLV_DISPLAY_BASE + 0x20a0)
436 #define VLV_IIR _MMIO(VLV_DISPLAY_BASE + 0x20a4)
437 #define VLV_IMR _MMIO(VLV_DISPLAY_BASE + 0x20a8)
438 #define VLV_ISR _MMIO(VLV_DISPLAY_BASE + 0x20ac)
439 #define VLV_PCBR _MMIO(VLV_DISPLAY_BASE + 0x2120)
447 #define EIR _MMIO(0x20b0)
448 #define EMR _MMIO(0x20b4)
449 #define ESR _MMIO(0x20b8)
455 #define I915_ERROR_INSTRUCTION (1 << 0)
456 #define INSTPM _MMIO(0x20c0)
464 #define MEM_MODE _MMIO(0x20cc)
468 #define FW_BLC _MMIO(0x20d8)
469 #define FW_BLC2 _MMIO(0x20dc)
470 #define FW_BLC_SELF _MMIO(0x20e0) /* 915+ only */
474 #define MM_BURST_LENGTH 0x00700000
475 #define MM_FIFO_WATERMARK 0x0001F000
476 #define LM_BURST_LENGTH 0x00000700
477 #define LM_FIFO_WATERMARK 0x0000001F
478 #define MI_ARB_STATE _MMIO(0x20e4) /* 915+ only */
480 #define _MBUS_ABOX0_CTL 0x45038
481 #define _MBUS_ABOX1_CTL 0x45048
482 #define _MBUS_ABOX2_CTL 0x4504C
490 #define MBUS_ABOX_B_CREDIT_MASK (0xF << 16)
492 #define MBUS_ABOX_BT_CREDIT_POOL2_MASK (0x1F << 8)
494 #define MBUS_ABOX_BT_CREDIT_POOL1_MASK (0x1F << 0)
495 #define MBUS_ABOX_BT_CREDIT_POOL1(x) ((x) << 0)
512 #define MI_ARB_BLOCK_GRANT_8 (0 << 12) /* for 3 display planes */
539 #define MI_ARB_TIME_SLICE_1 (0 << 5)
549 #define MI_ARB_LOW_PRIORITY_GRACE_4KB (0 << 4) /* default */
556 #define MI_ARB_DISPLAY_PRIORITY_A_B (0 << 0) /* display A > display B */
557 #define MI_ARB_DISPLAY_PRIORITY_B_A (1 << 0) /* display B > display A */
559 #define MI_STATE _MMIO(0x20e4) /* gen2 only */
561 #define MI_AGPBUSY_830_MODE (1 << 0) /* 85x only */
587 #define GT_RENDER_USER_INTERRUPT (1 << 0)
594 (IS_HASWELL(dev_priv) ? GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1 : 0))
632 #define I915_ASLE_INTERRUPT (1 << 0)
635 #define GEN6_BSD_RNCID _MMIO(0x12198)
637 #define GEN7_FF_THREAD_MODE _MMIO(0x20a0)
638 #define GEN7_FF_SCHED_MASK 0x0077070
641 #define GEN7_FF_TS_SCHED_HS1 (0x5 << 16)
642 #define GEN7_FF_TS_SCHED_HS0 (0x3 << 16)
643 #define GEN7_FF_TS_SCHED_LOAD_BALANCE (0x1 << 16)
644 #define GEN7_FF_TS_SCHED_HW (0x0 << 16) /* Default */
646 #define GEN7_FF_VS_SCHED_HS1 (0x5 << 12)
647 #define GEN7_FF_VS_SCHED_HS0 (0x3 << 12)
648 #define GEN7_FF_VS_SCHED_LOAD_BALANCE (0x1 << 12) /* Default */
649 #define GEN7_FF_VS_SCHED_HW (0x0 << 12)
650 #define GEN7_FF_DS_SCHED_HS1 (0x5 << 4)
651 #define GEN7_FF_DS_SCHED_HS0 (0x3 << 4)
652 #define GEN7_FF_DS_SCHED_LOAD_BALANCE (0x1 << 4) /* Default */
653 #define GEN7_FF_DS_SCHED_HW (0x0 << 4)
655 #define ILK_DISPLAY_CHICKEN1 _MMIO(0x42000)
660 #define IVB_PRI_STRETCH_MAX_X8 REG_FIELD_PREP(IVB_PRI_STRETCH_MAX_MASK, 0)
665 #define IVB_SPR_STRETCH_MAX_X8 REG_FIELD_PREP(IVB_SPR_STRETCH_MAX_MASK, 0)
670 #define IPS_CTL _MMIO(0x43408)
677 #define _DPLL_A 0x6014
678 #define _DPLL_B 0x6018
679 #define _CHV_DPLL_C 0x6030
683 #define VGA0 _MMIO(0x6000)
684 #define VGA1 _MMIO(0x6004)
685 #define VGA_PD _MMIO(0x6010)
688 #define VGA0_PD_P1_SHIFT 0
689 #define VGA0_PD_P1_MASK (0x1f << 0)
693 #define VGA1_PD_P1_MASK (0x1f << 8)
704 #define DPLL_DAC_SERIAL_P2_CLOCK_DIV_10 (0 << 24) /* i915 */
706 #define DPLLB_LVDS_P2_CLOCK_DIV_14 (0 << 24) /* i915 */
708 #define DPLL_P2_CLOCK_DIV_MASK 0x03000000 /* i915 */
709 #define DPLL_FPA01_P1_POST_DIV_MASK 0x00ff0000 /* i915 */
710 #define DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW 0x00ff8000 /* Pineview */
715 #define DPLL_PORTC_READY_MASK (0xf << 4)
716 #define DPLL_PORTB_READY_MASK (0xf)
718 #define DPLL_FPA01_P1_POST_DIV_MASK_I830 0x001f0000
721 #define DPIO_PHY_STATUS _MMIO(VLV_DISPLAY_BASE + 0x6240)
722 #define DPLL_PORTD_READY_MASK (0xf)
723 #define DISPLAY_PHY_CONTROL _MMIO(VLV_DISPLAY_BASE + 0x60100)
725 #define PHY_LDO_DELAY_0NS 0x0
726 #define PHY_LDO_DELAY_200NS 0x1
727 #define PHY_LDO_DELAY_600NS 0x2
730 #define PHY_CH_SU_PSR 0x1
731 #define PHY_CH_DEEP_PSR 0x7
734 #define DISPLAY_PHY_STATUS _MMIO(VLV_DISPLAY_BASE + 0x60104)
743 #define DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS 0x003f0000
749 #define PLL_REF_INPUT_DREFCLK (0 << 13)
759 # define DPLL_FPA1_P1_POST_DIV_SHIFT 0
760 # define DPLL_FPA1_P1_POST_DIV_MASK 0xff
768 #define PLL_LOAD_PULSE_PHASE_MASK (0xf << PLL_LOAD_PULSE_PHASE_SHIFT)
773 #define SDVO_MULTIPLIER_MASK 0x000000ff
775 #define SDVO_MULTIPLIER_SHIFT_VGA 0
777 #define _DPLL_A_MD 0x601c
778 #define _DPLL_B_MD 0x6020
779 #define _CHV_DPLL_C_MD 0x603c
788 #define DPLL_MD_UDI_DIVIDER_MASK 0x3f000000
791 #define DPLL_MD_VGA_UDI_DIVIDER_MASK 0x003f0000
810 #define DPLL_MD_UDI_MULTIPLIER_MASK 0x00003f00
817 #define DPLL_MD_VGA_UDI_MULTIPLIER_MASK 0x0000003f
818 #define DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT 0
820 #define RAWCLK_FREQ_VLV _MMIO(VLV_DISPLAY_BASE + 0x6024)
822 #define _FPA0 0x6040
823 #define _FPA1 0x6044
824 #define _FPB0 0x6048
825 #define _FPB1 0x604c
828 #define FP_N_DIV_MASK 0x003f0000
829 #define FP_N_PINEVIEW_DIV_MASK 0x00ff0000
831 #define FP_M1_DIV_MASK 0x00003f00
833 #define FP_M2_DIV_MASK 0x0000003f
834 #define FP_M2_PINEVIEW_DIV_MASK 0x000000ff
835 #define FP_M2_DIV_SHIFT 0
836 #define DPLL_TEST _MMIO(0x606c)
837 #define DPLLB_TEST_SDVO_DIV_1 (0 << 22)
846 #define DPLLA_INPUT_BUFFER_ENABLE (1 << 0)
847 #define D_STATE _MMIO(0x6104)
851 #define DSTATE_DOT_CLOCK_GATING (1 << 0)
852 #define DSPCLK_GATE_D(__i915) _MMIO(DISPLAY_MMIO_BASE(__i915) + 0x6200)
889 # define ZVUNIT_CLOCK_GATE_DISABLE (1 << 0) /* 830 */
890 # define OVLUNIT_CLOCK_GATE_DISABLE (1 << 0) /* 845,865 */
892 #define RENCLK_GATE_D1 _MMIO(0x6204)
908 # define SV_CLOCK_GATE_DISABLE (1 << 0)
925 # define I915_BY_CLOCK_GATE_DISABLE (1 << 0)
954 # define I965_DM_CLOCK_GATE_DISABLE (1 << 0)
956 #define RENCLK_GATE_D2 _MMIO(0x6208)
961 #define VDECCLK_GATE_D _MMIO(0x620C) /* g4x only */
964 #define RAMCLK_GATE_D _MMIO(0x6210) /* CRL only */
965 #define DEUC _MMIO(0x6214) /* CRL only */
967 #define FW_BLC_SELF_VLV _MMIO(VLV_DISPLAY_BASE + 0x6500)
970 #define MI_ARB_VLV _MMIO(VLV_DISPLAY_BASE + 0x6504)
972 #define CZCLK_CDCLK_FREQ_RATIO _MMIO(VLV_DISPLAY_BASE + 0x6508)
974 #define CDCLK_FREQ_MASK (0x1f << CDCLK_FREQ_SHIFT)
975 #define CZCLK_FREQ_MASK 0xf
977 #define GCI_CONTROL _MMIO(VLV_DISPLAY_BASE + 0x650C)
984 #define GMBUSFREQ_VLV _MMIO(VLV_DISPLAY_BASE + 0x6510)
986 #define PEG_BAND_GAP_DATA _MMIO(0x14d68)
988 #define BXT_RP_STATE_CAP _MMIO(0x138170)
989 #define GEN9_RP_STATE_LIMITS _MMIO(0x138148)
991 #define MTL_RP_STATE_CAP _MMIO(0x138000)
992 #define MTL_MEDIAP_STATE_CAP _MMIO(0x138020)
993 #define MTL_RP0_CAP_MASK REG_GENMASK(8, 0)
996 #define MTL_GT_RPE_FREQUENCY _MMIO(0x13800c)
997 #define MTL_MPE_FREQUENCY _MMIO(0x13802c)
998 #define MTL_RPE_MASK REG_GENMASK(8, 0)
1000 #define GT0_PERF_LIMIT_REASONS _MMIO(0x1381a8)
1001 #define GT0_PERF_LIMIT_REASONS_MASK 0xde3
1002 #define PROCHOT_MASK REG_BIT(0)
1011 #define MTL_MEDIA_PERF_LIMIT_REASONS _MMIO(0x138030)
1013 #define CHV_CLK_CTL1 _MMIO(0x101100)
1014 #define VLV_CLK_CTL2 _MMIO(0x101104)
1021 #define OVADD _MMIO(0x30000)
1022 #define DOVSTA _MMIO(0x30008)
1023 #define OC_BUF (0x3 << 20)
1024 #define OGAMC5 _MMIO(0x30010)
1025 #define OGAMC4 _MMIO(0x30014)
1026 #define OGAMC3 _MMIO(0x30018)
1027 #define OGAMC2 _MMIO(0x3001c)
1028 #define OGAMC1 _MMIO(0x30020)
1029 #define OGAMC0 _MMIO(0x30024)
1034 #define GEN9_CLKGATE_DIS_0 _MMIO(0x46530)
1041 #define GEN9_CLKGATE_DIS_3 _MMIO(0x46538)
1045 #define GEN9_CLKGATE_DIS_4 _MMIO(0x4653C)
1048 #define GEN9_CLKGATE_DIS_5 _MMIO(0x46540)
1051 #define _CLKGATE_DIS_PSL_A 0x46520
1052 #define _CLKGATE_DIS_PSL_B 0x46524
1053 #define _CLKGATE_DIS_PSL_C 0x46528
1065 #define _CLKGATE_DIS_PSL_EXT_A 0x4654C
1066 #define _CLKGATE_DIS_PSL_EXT_B 0x46550
1073 #define _DDI_CLK_VALFREQ_A 0x64030
1074 #define _DDI_CLK_VALFREQ_B 0x64130
1082 #define _TRANS_HTOTAL_A 0x60000
1083 #define _TRANS_HTOTAL_B 0x61000
1087 #define HACTIVE_MASK REG_GENMASK(15, 0)
1090 #define _TRANS_HBLANK_A 0x60004
1091 #define _TRANS_HBLANK_B 0x61004
1095 #define HBLANK_START_MASK REG_GENMASK(15, 0)
1098 #define _TRANS_HSYNC_A 0x60008
1099 #define _TRANS_HSYNC_B 0x61008
1103 #define HSYNC_START_MASK REG_GENMASK(15, 0)
1106 #define _TRANS_VTOTAL_A 0x6000c
1107 #define _TRANS_VTOTAL_B 0x6100c
1111 #define VACTIVE_MASK REG_GENMASK(15, 0)
1114 #define _TRANS_VBLANK_A 0x60010
1115 #define _TRANS_VBLANK_B 0x61010
1119 #define VBLANK_START_MASK REG_GENMASK(15, 0)
1122 #define _TRANS_VSYNC_A 0x60014
1123 #define _TRANS_VSYNC_B 0x61014
1127 #define VSYNC_START_MASK REG_GENMASK(15, 0)
1130 #define _PIPEASRC 0x6001c
1131 #define _PIPEBSRC 0x6101c
1135 #define PIPESRC_HEIGHT_MASK REG_GENMASK(15, 0)
1138 #define _BCLRPAT_A 0x60020
1139 #define _BCLRPAT_B 0x61020
1142 #define _TRANS_VSYNCSHIFT_A 0x60028
1143 #define _TRANS_VSYNCSHIFT_B 0x61028
1146 #define _TRANS_MULT_A 0x6002c
1147 #define _TRANS_MULT_B 0x6102c
1151 #define ADPA _MMIO(0x61100)
1152 #define PCH_ADPA _MMIO(0xe1100)
1153 #define VLV_ADPA _MMIO(VLV_DISPLAY_BASE + 0x61100)
1155 #define ADPA_DAC_DISABLE 0
1162 #define ADPA_CRT_HOTPLUG_MASK 0x03ff0000 /* bit 25-16 */
1163 #define ADPA_CRT_HOTPLUG_MONITOR_NONE (0 << 24)
1168 #define ADPA_CRT_HOTPLUG_PERIOD_64 (0 << 22)
1170 #define ADPA_CRT_HOTPLUG_WARMUP_5MS (0 << 21)
1172 #define ADPA_CRT_HOTPLUG_SAMPLE_2S (0 << 20)
1174 #define ADPA_CRT_HOTPLUG_VOLTAGE_40 (0 << 18)
1178 #define ADPA_CRT_HOTPLUG_VOLREF_325MV (0 << 17)
1182 #define ADPA_SETS_HVPOLARITY 0
1184 #define ADPA_VSYNC_CNTL_ENABLE 0
1186 #define ADPA_HSYNC_CNTL_ENABLE 0
1188 #define ADPA_VSYNC_ACTIVE_LOW 0
1190 #define ADPA_HSYNC_ACTIVE_LOW 0
1192 #define ADPA_DPMS_ON (0 << 10)
1198 #define PORT_HOTPLUG_EN(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61110)
1213 #define CRT_HOTPLUG_ACTIVATION_PERIOD_32 (0 << 8)
1216 #define CRT_HOTPLUG_DAC_ON_TIME_2M (0 << 7)
1218 #define CRT_HOTPLUG_VOLTAGE_COMPARE_40 (0 << 5)
1223 #define CRT_HOTPLUG_DETECT_DELAY_1G (0 << 4)
1225 #define CRT_HOTPLUG_DETECT_VOLTAGE_325MV (0 << 2)
1228 #define PORT_HOTPLUG_STAT(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61114)
1248 #define CRT_HOTPLUG_MONITOR_NONE (0 << 8)
1283 #define _GEN3_SDVOB 0x61140
1284 #define _GEN3_SDVOC 0x61160
1289 #define VLV_HDMIB _MMIO(VLV_DISPLAY_BASE + 0x61140)
1290 #define VLV_HDMIC _MMIO(VLV_DISPLAY_BASE + 0x61160)
1291 #define CHV_HDMID _MMIO(VLV_DISPLAY_BASE + 0x6116C)
1292 #define PCH_SDVOB _MMIO(0xe1140)
1294 #define PCH_HDMIC _MMIO(0xe1150)
1295 #define PCH_HDMID _MMIO(0xe1160)
1297 #define PORT_DFT_I9XX _MMIO(0x61150)
1299 #define PORT_DFT2_G4X(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61154)
1301 #define PIPE_SCRAMBLE_RESET_MASK ((1 << 14) | (0x3 << 0))
1304 #define PIPE_A_SCRAMBLE_RESET REG_BIT(0)
1333 #define SDVO_COLOR_FORMAT_8bpc (0 << 26)
1335 #define SDVO_ENCODING_SDVO (0 << 10)
1338 #define HDMI_MODE_SELECT_DVI (0 << 9) /* HDMI only */
1360 #define VIDEO_DIP_DATA _MMIO(0x61178)
1369 #define VIDEO_DIP_CTL _MMIO(0x61170)
1379 #define VIDEO_DIP_SELECT_AVI (0 << 19)
1384 #define VIDEO_DIP_FREQ_ONCE (0 << 16)
1391 #define VSC_SELECT_MASK (0x3 << 25)
1393 #define VSC_DIP_HW_HEA_DATA (0 << 25)
1403 #define VIDEO_DIP_ENABLE_SPD_HSW (1 << 0)
1408 #define PFIT_CONTROL(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61230)
1413 #define PFIT_SCALING_AUTO REG_FIELD_PREP(PFIT_SCALING_MASK, 0)
1418 #define PFIT_FILTER_FUZZY REG_FIELD_PREP(PFIT_FILTER_MASK, 0)
1429 #define PFIT_PGM_RATIOS(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61234)
1435 #define PFIT_HORIZ_SCALE_MASK_965 REG_GENMASK(12, 0) /* 965+ */
1437 #define PFIT_AUTO_RATIOS(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61238)
1439 #define PCH_GTC_CTL _MMIO(0xe7000)
1443 #define DP_A _MMIO(0x64000) /* eDP */
1444 #define DP_B _MMIO(0x64100)
1445 #define DP_C _MMIO(0x64200)
1446 #define DP_D _MMIO(0x64300)
1447 #define VLV_DP_B _MMIO(VLV_DISPLAY_BASE + 0x64100)
1448 #define VLV_DP_C _MMIO(VLV_DISPLAY_BASE + 0x64200)
1449 #define CHV_DP_D _MMIO(VLV_DISPLAY_BASE + 0x64300)
1462 #define DP_LINK_TRAIN_PAT_1 (0 << 28)
1470 #define DP_LINK_TRAIN_PAT_1_CPT (0 << 8)
1478 #define DP_VOLTAGE_0_4 (0 << 25)
1488 #define DP_PRE_EMPHASIS_0 (0 << 22)
1504 #define DP_PLL_FREQ_270MHZ (0 << 16)
1546 #define _PIPEA_DATA_M_G4X 0x70050
1547 #define _PIPEB_DATA_M_G4X 0x71050
1549 /* Transfer unit size for display port - 1, default is 0x3f (for TU size 64) */
1552 #define DATA_LINK_M_N_MASK REG_GENMASK(23, 0)
1553 #define DATA_LINK_N_MAX (0x800000)
1555 #define _PIPEA_DATA_N_G4X 0x70054
1556 #define _PIPEB_DATA_N_G4X 0x71054
1569 #define _PIPEA_LINK_M_G4X 0x70060
1570 #define _PIPEB_LINK_M_G4X 0x71060
1573 #define _PIPEA_LINK_N_G4X 0x70064
1574 #define _PIPEB_LINK_N_G4X 0x71064
1578 #define _PIPEADSL 0x70000
1581 #define PIPEDSL_LINE_MASK REG_GENMASK(19, 0)
1583 #define _TRANSACONF 0x70008
1590 …CONF_FRAME_START_DELAY(x) REG_FIELD_PREP(TRANSCONF_FRAME_START_DELAY_MASK, (x)) /* pre-hsw: 0-3 */
1595 #define TRANSCONF_GAMMA_MODE_8BIT REG_FIELD_PREP(TRANSCONF_GAMMA_MODE_MASK, 0)
1601 #define TRANSCONF_INTERLACE_PROGRESSIVE REG_FIELD_PREP(TRANSCONF_INTERLACE_MASK, 0)
1612 #define TRANSCONF_INTERLACE_PF_PD_ILK REG_FIELD_PREP(TRANSCONF_INTERLACE_MASK_ILK, 0)
1625 #define TRANSCONF_OUTPUT_COLORSPACE_RGB REG_FIELD_PREP(TRANSCONF_OUTPUT_COLORSPACE_MASK, 0) /* il…
1630 #define TRANSCONF_BPC_8 REG_FIELD_PREP(TRANSCONF_BPC_MASK, 0)
1636 #define TRANSCONF_DITHER_TYPE_SP REG_FIELD_PREP(TRANSCONF_DITHER_TYPE_MASK, 0)
1640 #define TRANSCONF_PIXEL_COUNT_SCALING_MASK REG_GENMASK(1, 0)
1643 #define _PIPEASTAT 0x70024
1689 #define PIPE_HBLANK_INT_STATUS (1UL << 0)
1690 #define PIPE_OVERLAY_UPDATED_STATUS (1UL << 0)
1691 #define PIPESTAT_INT_ENABLE_MASK 0x7fff0000
1692 #define PIPESTAT_INT_STATUS_MASK 0x0000ffff
1694 #define _PIPE_ARB_CTL_A 0x70028 /* icl+ */
1698 #define _PIPE_MISC_A 0x70030
1699 #define _PIPE_MISC_B 0x71030
1718 #define PIPE_MISC_BPC_8 REG_FIELD_PREP(PIPE_MISC_BPC_MASK, 0)
1724 #define PIPE_MISC_DITHER_TYPE_SP REG_FIELD_PREP(PIPE_MISC_DITHER_TYPE_MASK, 0)
1729 #define _PIPE_MISC2_A 0x7002C
1730 #define _PIPE_MISC2_B 0x7102C
1735 #define PIPE_MISC2_FLIP_INFO_PLANE_SEL_MASK REG_GENMASK(2, 0) /* tgl+ */
1738 #define VLV_DPFLIPSTAT _MMIO(VLV_DISPLAY_BASE + 0x70028)
1759 #define DPINVGTT _MMIO(VLV_DISPLAY_BASE + 0x7002c) /* VLV/CHV only */
1774 #define DPINVGTT_STATUS_MASK_CHV REG_GENMASK(11, 0)
1775 #define DPINVGTT_STATUS_MASK_VLV REG_GENMASK(7, 0)
1787 #define PLANEA_INVALID_GTT_STATUS REG_BIT(0)
1789 #define DSPARB(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x70030)
1790 #define DSPARB_CSTART_MASK (0x7f << 7)
1792 #define DSPARB_BSTART_MASK (0x7f)
1793 #define DSPARB_BSTART_SHIFT 0
1795 #define DSPARB_AEND_SHIFT 0
1796 #define DSPARB_SPRITEA_SHIFT_VLV 0
1797 #define DSPARB_SPRITEA_MASK_VLV (0xff << 0)
1799 #define DSPARB_SPRITEB_MASK_VLV (0xff << 8)
1801 #define DSPARB_SPRITEC_MASK_VLV (0xff << 16)
1803 #define DSPARB_SPRITED_MASK_VLV (0xff << 24)
1804 #define DSPARB2 _MMIO(VLV_DISPLAY_BASE + 0x70060) /* vlv/chv */
1805 #define DSPARB_SPRITEA_HI_SHIFT_VLV 0
1806 #define DSPARB_SPRITEA_HI_MASK_VLV (0x1 << 0)
1808 #define DSPARB_SPRITEB_HI_MASK_VLV (0x1 << 4)
1810 #define DSPARB_SPRITEC_HI_MASK_VLV (0x1 << 8)
1812 #define DSPARB_SPRITED_HI_MASK_VLV (0x1 << 12)
1814 #define DSPARB_SPRITEE_HI_MASK_VLV (0x1 << 16)
1816 #define DSPARB_SPRITEF_HI_MASK_VLV (0x1 << 20)
1817 #define DSPARB3 _MMIO(VLV_DISPLAY_BASE + 0x7006c) /* chv */
1818 #define DSPARB_SPRITEE_SHIFT_VLV 0
1819 #define DSPARB_SPRITEE_MASK_VLV (0xff << 0)
1821 #define DSPARB_SPRITEF_MASK_VLV (0xff << 8)
1824 #define DSPFW1(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x70034)
1826 #define DSPFW_SR_MASK (0x1ff << 23)
1828 #define DSPFW_CURSORB_MASK (0x3f << 16)
1830 #define DSPFW_PLANEB_MASK (0x7f << 8)
1831 #define DSPFW_PLANEB_MASK_VLV (0xff << 8) /* vlv/chv */
1832 #define DSPFW_PLANEA_SHIFT 0
1833 #define DSPFW_PLANEA_MASK (0x7f << 0)
1834 #define DSPFW_PLANEA_MASK_VLV (0xff << 0) /* vlv/chv */
1835 #define DSPFW2(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x70038)
1838 #define DSPFW_FBC_SR_MASK (0x7 << 28) /* g4x */
1840 #define DSPFW_FBC_HPLL_SR_MASK (0xf << 24) /* g4x */
1842 #define DSPFW_SPRITEB_MASK (0x7f << 16) /* g4x */
1843 #define DSPFW_SPRITEB_MASK_VLV (0xff << 16) /* vlv/chv */
1845 #define DSPFW_CURSORA_MASK (0x3f << 8)
1846 #define DSPFW_PLANEC_OLD_SHIFT 0
1847 #define DSPFW_PLANEC_OLD_MASK (0x7f << 0) /* pre-gen4 sprite C */
1848 #define DSPFW_SPRITEA_SHIFT 0
1849 #define DSPFW_SPRITEA_MASK (0x7f << 0) /* g4x */
1850 #define DSPFW_SPRITEA_MASK_VLV (0xff << 0) /* vlv/chv */
1851 #define DSPFW3(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x7003c)
1855 #define DSPFW_CURSOR_SR_MASK (0x3f << 24)
1857 #define DSPFW_HPLL_CURSOR_MASK (0x3f << 16)
1858 #define DSPFW_HPLL_SR_SHIFT 0
1859 #define DSPFW_HPLL_SR_MASK (0x1ff << 0)
1862 #define DSPFW4 _MMIO(VLV_DISPLAY_BASE + 0x70070)
1864 #define DSPFW_SPRITEB_WM1_MASK (0xff << 16)
1866 #define DSPFW_CURSORA_WM1_MASK (0x3f << 8)
1867 #define DSPFW_SPRITEA_WM1_SHIFT 0
1868 #define DSPFW_SPRITEA_WM1_MASK (0xff << 0)
1869 #define DSPFW5 _MMIO(VLV_DISPLAY_BASE + 0x70074)
1871 #define DSPFW_PLANEB_WM1_MASK (0xff << 24)
1873 #define DSPFW_PLANEA_WM1_MASK (0xff << 16)
1875 #define DSPFW_CURSORB_WM1_MASK (0x3f << 8)
1876 #define DSPFW_CURSOR_SR_WM1_SHIFT 0
1877 #define DSPFW_CURSOR_SR_WM1_MASK (0x3f << 0)
1878 #define DSPFW6 _MMIO(VLV_DISPLAY_BASE + 0x70078)
1879 #define DSPFW_SR_WM1_SHIFT 0
1880 #define DSPFW_SR_WM1_MASK (0x1ff << 0)
1881 #define DSPFW7 _MMIO(VLV_DISPLAY_BASE + 0x7007c)
1882 #define DSPFW7_CHV _MMIO(VLV_DISPLAY_BASE + 0x700b4) /* wtf #1? */
1884 #define DSPFW_SPRITED_WM1_MASK (0xff << 24)
1886 #define DSPFW_SPRITED_MASK_VLV (0xff << 16)
1888 #define DSPFW_SPRITEC_WM1_MASK (0xff << 8)
1889 #define DSPFW_SPRITEC_SHIFT 0
1890 #define DSPFW_SPRITEC_MASK_VLV (0xff << 0)
1891 #define DSPFW8_CHV _MMIO(VLV_DISPLAY_BASE + 0x700b8)
1893 #define DSPFW_SPRITEF_WM1_MASK (0xff << 24)
1895 #define DSPFW_SPRITEF_MASK_VLV (0xff << 16)
1897 #define DSPFW_SPRITEE_WM1_MASK (0xff << 8)
1898 #define DSPFW_SPRITEE_SHIFT 0
1899 #define DSPFW_SPRITEE_MASK_VLV (0xff << 0)
1900 #define DSPFW9_CHV _MMIO(VLV_DISPLAY_BASE + 0x7007c) /* wtf #2? */
1902 #define DSPFW_PLANEC_WM1_MASK (0xff << 24)
1904 #define DSPFW_PLANEC_MASK_VLV (0xff << 16)
1906 #define DSPFW_CURSORC_WM1_MASK (0x3f << 16)
1907 #define DSPFW_CURSORC_SHIFT 0
1908 #define DSPFW_CURSORC_MASK (0x3f << 0)
1911 #define DSPHOWM _MMIO(VLV_DISPLAY_BASE + 0x70064)
1930 #define DSPFW_PLANEA_HI_SHIFT 0
1931 #define DSPFW_PLANEA_HI_MASK (1 << 0)
1932 #define DSPHOWM1 _MMIO(VLV_DISPLAY_BASE + 0x70068)
1951 #define DSPFW_PLANEA_WM1_HI_SHIFT 0
1952 #define DSPFW_PLANEA_WM1_HI_MASK (1 << 0)
1955 #define VLV_DDL(pipe) _MMIO(VLV_DISPLAY_BASE + 0x70050 + 4 * (pipe))
1958 #define DDL_PLANE_SHIFT 0
1960 #define DDL_PRECISION_LOW (0 << 7)
1961 #define DRAIN_LATENCY_MASK 0x7f
1963 #define CBR1_VLV _MMIO(VLV_DISPLAY_BASE + 0x70400)
1967 #define CBR4_VLV _MMIO(VLV_DISPLAY_BASE + 0x70450)
1983 #define VALLEYVIEW_MAX_WM 0xff
1984 #define G4X_MAX_WM 0x3f
1985 #define I915_MAX_WM 0x3f
1989 #define PINEVIEW_MAX_WM 0x1ff
1990 #define PINEVIEW_DFT_WM 0x3f
1991 #define PINEVIEW_DFT_HPLLOFF_WM 0
1994 #define PINEVIEW_CURSOR_MAX_WM 0x3f
1995 #define PINEVIEW_CURSOR_DFT_WM 0
2004 #define _WM0_PIPEA_ILK 0x45100
2005 #define _WM0_PIPEB_ILK 0x45104
2006 #define _WM0_PIPEC_IVB 0x45200
2007 #define WM0_PIPE_ILK(pipe) _MMIO_BASE_PIPE3(0, (pipe), _WM0_PIPEA_ILK, \
2011 #define WM0_PIPE_CURSOR_MASK REG_GENMASK(7, 0)
2015 #define WM1_LP_ILK _MMIO(0x45108)
2016 #define WM2_LP_ILK _MMIO(0x4510c)
2017 #define WM3_LP_ILK _MMIO(0x45110)
2023 #define WM_LP_CURSOR_MASK REG_GENMASK(7, 0)
2029 #define WM1S_LP_ILK _MMIO(0x45120)
2030 #define WM2S_LP_IVB _MMIO(0x45124)
2031 #define WM3S_LP_IVB _MMIO(0x45128)
2033 #define WM_LP_SPRITE_MASK REG_GENMASK(10, 0)
2051 #define _PIPEAFRAMEHIGH 0x70040
2053 #define PIPE_FRAME_HIGH_MASK 0x0000ffff
2054 #define PIPE_FRAME_HIGH_SHIFT 0
2056 #define _PIPEAFRAMEPIXEL 0x70044
2058 #define PIPE_FRAME_LOW_MASK 0xff000000
2060 #define PIPE_PIXEL_MASK 0x00ffffff
2061 #define PIPE_PIXEL_SHIFT 0
2064 #define _PIPEA_FRMCOUNT_G4X 0x70040
2067 #define _PIPEA_FLIPCOUNT_G4X 0x70044
2071 #define _CHV_BLEND_A 0x60a00
2074 #define CHV_BLEND_LEGACY REG_FIELD_PREP(CHV_BLEND_MASK, 0)
2078 #define _CHV_CANVAS_A 0x60a04
2082 #define CHV_CANVAS_BLUE_MASK REG_GENMASK(9, 0)
2085 #define DISP_BASEADDR_MASK (0xfffff000)
2096 * [00:0f] all
2100 #define SWF0(dev_priv, i) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x70410 + (i) * 4)
2101 #define SWF1(dev_priv, i) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x71410 + (i) * 4)
2102 #define SWF3(dev_priv, i) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x72414 + (i) * 4)
2103 #define SWF_ILK(i) _MMIO(0x4F000 + (i) * 4)
2106 #define VGACNTRL _MMIO(0x71400)
2111 #define VLV_VGACNTRL _MMIO(VLV_DISPLAY_BASE + 0x71400)
2115 #define CPU_VGACNTRL _MMIO(0x41000)
2117 #define DIGITAL_PORT_HOTPLUG_CNTRL _MMIO(0x44030)
2119 #define DIGITAL_PORTA_PULSE_DURATION_2ms (0 << 2) /* pre-HSW */
2124 #define DIGITAL_PORTA_HOTPLUG_STATUS_MASK (3 << 0)
2125 #define DIGITAL_PORTA_HOTPLUG_NO_DETECT (0 << 0)
2126 #define DIGITAL_PORTA_HOTPLUG_SHORT_DETECT (1 << 0)
2127 #define DIGITAL_PORTA_HOTPLUG_LONG_DETECT (2 << 0)
2130 #define RR_HW_CTL _MMIO(0x45300)
2131 #define RR_HW_LOW_POWER_FRAMES_MASK 0xff
2132 #define RR_HW_HIGH_POWER_FRAMES_MASK 0xff00
2134 #define PCH_3DCGDIS0 _MMIO(0x46020)
2138 #define PCH_3DCGDIS1 _MMIO(0x46024)
2141 #define _PIPEA_DATA_M1 0x60030
2142 #define _PIPEB_DATA_M1 0x61030
2145 #define _PIPEA_DATA_N1 0x60034
2146 #define _PIPEB_DATA_N1 0x61034
2149 #define _PIPEA_DATA_M2 0x60038
2150 #define _PIPEB_DATA_M2 0x61038
2153 #define _PIPEA_DATA_N2 0x6003c
2154 #define _PIPEB_DATA_N2 0x6103c
2157 #define _PIPEA_LINK_M1 0x60040
2158 #define _PIPEB_LINK_M1 0x61040
2161 #define _PIPEA_LINK_N1 0x60044
2162 #define _PIPEB_LINK_N1 0x61044
2165 #define _PIPEA_LINK_M2 0x60048
2166 #define _PIPEB_LINK_M2 0x61048
2169 #define _PIPEA_LINK_N2 0x6004c
2170 #define _PIPEB_LINK_N2 0x6104c
2174 /* IVB+ has 3 fitters, 0 is 7x5 capable, the other two only 3x3 */
2175 #define _PFA_CTL_1 0x68080
2176 #define _PFB_CTL_1 0x68880
2182 #define PF_FILTER_PROGRAMMED REG_FIELD_PREP(PF_FILTER_MASK, 0)
2187 #define _PFA_WIN_SZ 0x68074
2188 #define _PFB_WIN_SZ 0x68874
2192 #define PF_WIN_YSIZE_MASK REG_GENMASK(15, 0)
2195 #define _PFA_WIN_POS 0x68070
2196 #define _PFB_WIN_POS 0x68870
2200 #define PF_WIN_YPOS_MASK REG_GENMASK(15, 0)
2203 #define _PFA_VSCALE 0x68084
2204 #define _PFB_VSCALE 0x68884
2207 #define _PFA_HSCALE 0x68090
2208 #define _PFB_HSCALE 0x68890
2215 #define _PS_1A_CTRL 0x68180
2216 #define _PS_2A_CTRL 0x68280
2217 #define _PS_1B_CTRL 0x68980
2218 #define _PS_2B_CTRL 0x68A80
2219 #define _PS_1C_CTRL 0x69180
2225 #define PS_SCALER_TYPE_NON_LINEAR REG_FIELD_PREP(PS_SCALER_TYPE_MASK, 0)
2228 #define SKL_PS_SCALER_MODE_DYN REG_FIELD_PREP(SKL_PS_SCALER_MODE_MASK, 0)
2232 #define PS_SCALER_MODE_NORMAL REG_FIELD_PREP(PS_SCALER_MODE_MASK, 0)
2236 #define PS_BINDING_PIPE REG_FIELD_PREP(PS_BINDING_MASK, 0)
2239 #define PS_FILTER_MEDIUM REG_FIELD_PREP(PS_FILTER_MASK, 0)
2244 #define PS_ADAPTIVE_FILTER_MEDIUM REG_FIELD_PREP(PS_ADAPTIVE_FILTER_MASK, 0)
2247 #define PS_PIPE_SCALER_LOC_AFTER_OUTPUT_CSC REG_FIELD_PREP(PS_SCALER_LOCATION_MASK, 0) /* non-lin…
2256 #define PS_VADAPT_MODE_LEAST_ADAPT REG_FIELD_PREP(PS_VADAPT_MODE_MASK, 0)
2270 #define _PS_PWR_GATE_1A 0x68160
2271 #define _PS_PWR_GATE_2A 0x68260
2272 #define _PS_PWR_GATE_1B 0x68960
2273 #define _PS_PWR_GATE_2B 0x68A60
2274 #define _PS_PWR_GATE_1C 0x69160
2280 #define PS_PWR_GATE_SETTLING_TIME_32 REG_FIELD_PREP(PS_PWR_GATE_SETTLING_TIME_MASK, 0)
2284 #define PS_PWR_GATE_SLPEN_MASK REG_GENMASK(1, 0)
2285 #define PS_PWR_GATE_SLPEN_8 REG_FIELD_PREP(PS_PWR_GATE_SLPEN_MASK, 0)
2290 #define _PS_WIN_POS_1A 0x68170
2291 #define _PS_WIN_POS_2A 0x68270
2292 #define _PS_WIN_POS_1B 0x68970
2293 #define _PS_WIN_POS_2B 0x68A70
2294 #define _PS_WIN_POS_1C 0x69170
2300 #define PS_WIN_YPOS_MASK REG_GENMASK(15, 0)
2303 #define _PS_WIN_SZ_1A 0x68174
2304 #define _PS_WIN_SZ_2A 0x68274
2305 #define _PS_WIN_SZ_1B 0x68974
2306 #define _PS_WIN_SZ_2B 0x68A74
2307 #define _PS_WIN_SZ_1C 0x69174
2313 #define PS_WIN_YSIZE_MASK REG_GENMASK(15, 0)
2316 #define _PS_VSCALE_1A 0x68184
2317 #define _PS_VSCALE_2A 0x68284
2318 #define _PS_VSCALE_1B 0x68984
2319 #define _PS_VSCALE_2B 0x68A84
2320 #define _PS_VSCALE_1C 0x69184
2325 #define _PS_HSCALE_1A 0x68190
2326 #define _PS_HSCALE_2A 0x68290
2327 #define _PS_HSCALE_1B 0x68990
2328 #define _PS_HSCALE_2B 0x68A90
2329 #define _PS_HSCALE_1C 0x69190
2334 #define _PS_VPHASE_1A 0x68188
2335 #define _PS_VPHASE_2A 0x68288
2336 #define _PS_VPHASE_1B 0x68988
2337 #define _PS_VPHASE_2B 0x68A88
2338 #define _PS_VPHASE_1C 0x69188
2344 #define PS_UV_RGB_PHASE_MASK REG_GENMASK(15, 0)
2346 #define PS_PHASE_MASK (0x7fff << 1) /* u2.13 */
2347 #define PS_PHASE_TRIP (1 << 0)
2349 #define _PS_HPHASE_1A 0x68194
2350 #define _PS_HPHASE_2A 0x68294
2351 #define _PS_HPHASE_1B 0x68994
2352 #define _PS_HPHASE_2B 0x68A94
2353 #define _PS_HPHASE_1C 0x69194
2358 #define _PS_ECC_STAT_1A 0x681D0
2359 #define _PS_ECC_STAT_2A 0x682D0
2360 #define _PS_ECC_STAT_1B 0x689D0
2361 #define _PS_ECC_STAT_2B 0x68AD0
2362 #define _PS_ECC_STAT_1C 0x691D0
2367 #define _PS_COEF_SET0_INDEX_1A 0x68198
2368 #define _PS_COEF_SET0_INDEX_2A 0x68298
2369 #define _PS_COEF_SET0_INDEX_1B 0x68998
2370 #define _PS_COEF_SET0_INDEX_2B 0x68A98
2376 #define _PS_COEF_SET0_DATA_1A 0x6819C
2377 #define _PS_COEF_SET0_DATA_2A 0x6829C
2378 #define _PS_COEF_SET0_DATA_1B 0x6899C
2379 #define _PS_COEF_SET0_DATA_2B 0x68A9C
2385 #define RM_TIMEOUT _MMIO(0x42060)
2386 #define RM_TIMEOUT_REG_CAPTURE _MMIO(0x420E0)
2387 #define MMIO_TIMEOUT_US(us) ((us) << 0)
2419 #define DE_PIPEA_FIFO_UNDERRUN (1 << 0)
2438 #define DE_PIPEA_VBLANK_IVB (1 << 0)
2441 #define VLV_MASTER_IER _MMIO(0x4400c) /* Gunit master IER */
2444 #define DEISR _MMIO(0x44000)
2445 #define DEIMR _MMIO(0x44004)
2446 #define DEIIR _MMIO(0x44008)
2447 #define DEIER _MMIO(0x4400c)
2453 #define GTISR _MMIO(0x44010)
2454 #define GTIMR _MMIO(0x44014)
2455 #define GTIIR _MMIO(0x44018)
2456 #define GTIER _MMIO(0x4401c)
2462 #define GEN8_MASTER_IRQ _MMIO(0x44200)
2478 #define GEN8_GT_RCS_IRQ (1 << 0)
2480 #define XELPD_DISPLAY_ERR_FATAL_MASK _MMIO(0x4421c)
2482 #define GEN8_GT_ISR(which) _MMIO(0x44300 + (0x10 * (which)))
2483 #define GEN8_GT_IMR(which) _MMIO(0x44304 + (0x10 * (which)))
2484 #define GEN8_GT_IIR(which) _MMIO(0x44308 + (0x10 * (which)))
2485 #define GEN8_GT_IER(which) _MMIO(0x4430c + (0x10 * (which)))
2491 #define GEN8_RCS_IRQ_SHIFT 0
2493 #define GEN8_VCS0_IRQ_SHIFT 0 /* NB: VCS1 in bspec! */
2495 #define GEN8_VECS_IRQ_SHIFT 0
2498 #define GEN8_DE_PIPE_ISR(pipe) _MMIO(0x44400 + (0x10 * (pipe)))
2499 #define GEN8_DE_PIPE_IMR(pipe) _MMIO(0x44404 + (0x10 * (pipe)))
2500 #define GEN8_DE_PIPE_IIR(pipe) _MMIO(0x44408 + (0x10 * (pipe)))
2501 #define GEN8_DE_PIPE_IER(pipe) _MMIO(0x4440c + (0x10 * (pipe)))
2538 #define GEN8_PIPE_VBLANK REG_BIT(0)
2547 #define GEN8_DE_PORT_ISR _MMIO(0x44440)
2548 #define GEN8_DE_PORT_IMR _MMIO(0x44444)
2549 #define GEN8_DE_PORT_IIR _MMIO(0x44448)
2550 #define GEN8_DE_PORT_IER _MMIO(0x4444c)
2566 #define GEN8_AUX_CHANNEL_A (1 << 0)
2577 #define TGL_DE_PORT_AUX_DDIA REG_BIT(0)
2583 #define GEN8_DE_MISC_ISR _MMIO(0x44460)
2584 #define GEN8_DE_MISC_IMR _MMIO(0x44464)
2585 #define GEN8_DE_MISC_IIR _MMIO(0x44468)
2586 #define GEN8_DE_MISC_IER _MMIO(0x4446c)
2598 #define GEN8_PCU_ISR _MMIO(0x444e0)
2599 #define GEN8_PCU_IMR _MMIO(0x444e4)
2600 #define GEN8_PCU_IIR _MMIO(0x444e8)
2601 #define GEN8_PCU_IER _MMIO(0x444ec)
2607 #define GEN11_GU_MISC_ISR _MMIO(0x444f0)
2608 #define GEN11_GU_MISC_IMR _MMIO(0x444f4)
2609 #define GEN11_GU_MISC_IIR _MMIO(0x444f8)
2610 #define GEN11_GU_MISC_IER _MMIO(0x444fc)
2617 #define GEN11_GFX_MSTR_IRQ _MMIO(0x190010)
2624 #define GEN11_GT_DW0_IRQ (1 << 0)
2626 #define DG1_MSTR_TILE_INTR _MMIO(0x190008)
2630 #define GEN11_DISPLAY_INT_CTL _MMIO(0x44200)
2641 #define GEN11_DE_HPD_ISR _MMIO(0x44470)
2642 #define GEN11_DE_HPD_IMR _MMIO(0x44474)
2643 #define GEN11_DE_HPD_IIR _MMIO(0x44478)
2644 #define GEN11_DE_HPD_IER _MMIO(0x4447c)
2664 #define GEN11_TBT_HOTPLUG_CTL _MMIO(0x44030)
2665 #define GEN11_TC_HOTPLUG_CTL _MMIO(0x44038)
2669 #define GEN11_HOTPLUG_CTL_NO_DETECT(hpd_pin) (0 << (_HPD_PIN_TC(hpd_pin) * 4))
2671 #define PICAINTERRUPT_ISR _MMIO(0x16FE50)
2672 #define PICAINTERRUPT_IMR _MMIO(0x16FE54)
2673 #define PICAINTERRUPT_IIR _MMIO(0x16FE58)
2674 #define PICAINTERRUPT_IER _MMIO(0x16FE5C)
2682 #define XELPDP_TBT_HOTPLUG_MASK REG_GENMASK(3, 0)
2688 #define XELPDP_PORT_HOTPLUG_CTL(hpd_pin) _MMIO(0x16F270 + (_HPD_PIN_TC(hpd_pin) * 0x200))
2694 #define XELPDP_DP_ALT_HPD_SHORT_DETECT REG_BIT(0)
2696 #define XELPDP_INITIATE_PMDEMAND_REQUEST(dword) _MMIO(0x45230 + 4 * (dword))
2703 #define XELPDP_PMDEMAND_PHYS_MASK REG_GENMASK(2, 0)
2709 #define XELPDP_PMDEMAND_PLLS_MASK REG_GENMASK(2, 0)
2711 #define GEN12_DCPR_STATUS_1 _MMIO(0x46440)
2714 #define ILK_DISPLAY_CHICKEN2 _MMIO(0x42004)
2720 #define FUSE_STRAP _MMIO(0x42014)
2731 #define FUSE_STRAP3 _MMIO(0x42020)
2734 #define ILK_DSPCLK_GATE_D _MMIO(0x42020)
2741 #define IVB_CHICKEN3 _MMIO(0x4200c)
2745 #define CHICKEN_PAR1_1 _MMIO(0x42080)
2755 #define CHICKEN_PAR2_1 _MMIO(0x42090)
2758 #define CHICKEN_MISC_2 _MMIO(0x42084)
2767 #define CHICKEN_MISC_3 _MMIO(0x42088)
2770 #define DP_MST_FEC_BS_JITTER_WA(trans) REG_BIT(0 + (trans) - TRANSCODER_A)
2772 #define CHICKEN_MISC_4 _MMIO(0x4208c)
2774 #define CHICKEN_FBC_STRIDE_MASK REG_GENMASK(12, 0)
2777 #define _CHICKEN_PIPESL_1_A 0x420b0
2778 #define _CHICKEN_PIPESL_1_B 0x420b4
2781 #define HSW_PRI_STRETCH_MAX_X8 REG_FIELD_PREP(HSW_PRI_STRETCH_MAX_MASK, 0)
2786 #define HSW_SPR_STRETCH_MAX_X8 REG_FIELD_PREP(HSW_SPR_STRETCH_MAX_MASK, 0)
2793 #define SKL_PLANE1_STRETCH_MAX_MASK REG_GENMASK(1, 0)
2794 #define SKL_PLANE1_STRETCH_MAX_X8 REG_FIELD_PREP(SKL_PLANE1_STRETCH_MAX_MASK, 0)
2798 #define BDW_UNMASK_VBL_TO_REGS_IN_SRD REG_BIT(0) /* bdw */
2800 #define _CHICKEN_TRANS_A 0x420c0
2801 #define _CHICKEN_TRANS_B 0x420c4
2802 #define _CHICKEN_TRANS_C 0x420c8
2803 #define _CHICKEN_TRANS_EDP 0x420cc
2804 #define _CHICKEN_TRANS_D 0x420d8
2811 #define _MTL_CHICKEN_TRANS_A 0x604e0
2812 #define _MTL_CHICKEN_TRANS_B 0x614e0
2831 #define HDCP_LINE_REKEY_DISABLE REG_BIT(0)
2833 #define DISP_ARB_CTL _MMIO(0x45000)
2838 #define DISP_ARB_CTL2 _MMIO(0x45004)
2842 #define GEN7_MSG_CTL _MMIO(0x45010)
2844 #define WAIT_FOR_PCH_FLR_ACK (1 << 0)
2846 #define _BW_BUDDY0_CTL 0x45130
2847 #define _BW_BUDDY1_CTL 0x45140
2855 #define _BW_BUDDY0_PAGE_MASK 0x45134
2856 #define _BW_BUDDY1_PAGE_MASK 0x45144
2861 #define HSW_NDE_RSTWRN_OPT _MMIO(0x46408)
2865 #define GEN8_CHICKEN_DCPR_1 _MMIO(0x46430)
2876 #define GEN11_CHICKEN_DCPR_2 _MMIO(0x46434)
2882 #define XELPD_CHICKEN_DCPR_3 _MMIO(0x46438)
2885 #define SKL_DFSM _MMIO(0x51000)
2889 #define SKL_DFSM_CDCLK_LIMIT_675 (0 << 23)
2901 #define XE2LPD_DE_CAP _MMIO(0x41100)
2908 #define SKL_DSSM _MMIO(0x51004)
2910 #define ICL_DSSM_CDCLK_PLL_REFCLK_24MHz (0 << 29)
2914 #define GMD_ID_DISPLAY _MMIO(0x510a0)
2917 #define GMD_ID_STEP REG_GENMASK(5, 0)
2920 #define _PIPEA_CHICKEN 0x70038
2921 #define _PIPEB_CHICKEN 0x71038
2922 #define _PIPEC_CHICKEN 0x72038
2933 #define PCH_DISPLAY_BASE 0xc0000u
2973 #define SDE_TRANSA_FIFO_UNDER (1 << 0)
2974 #define SDE_TRANS_MASK (0x3f)
3013 #define SDE_FDI_RXA_CPT (1 << 0)
3041 #define SDEISR _MMIO(0xc4000)
3042 #define SDEIMR _MMIO(0xc4004)
3043 #define SDEIIR _MMIO(0xc4008)
3044 #define SDEIER _MMIO(0xc400c)
3050 #define SERR_INT _MMIO(0xc4040)
3055 #define PCH_PORT_HOTPLUG _MMIO(0xc4030) /* SHOTPLUG_CTL */
3059 #define PORTA_HOTPLUG_NO_DETECT (0 << 24) /* SPT+ & BXT */
3063 #define PORTD_PULSE_DURATION_2ms (0 << 18) /* pre-LPT */
3069 #define PORTD_HOTPLUG_NO_DETECT (0 << 16)
3074 #define PORTC_PULSE_DURATION_2ms (0 << 10) /* pre-LPT */
3080 #define PORTC_HOTPLUG_NO_DETECT (0 << 8)
3085 #define PORTB_PULSE_DURATION_2ms (0 << 2) /* pre-LPT */
3090 #define PORTB_HOTPLUG_STATUS_MASK (3 << 0)
3091 #define PORTB_HOTPLUG_NO_DETECT (0 << 0)
3092 #define PORTB_HOTPLUG_SHORT_DETECT (1 << 0)
3093 #define PORTB_HOTPLUG_LONG_DETECT (2 << 0)
3098 #define PCH_PORT_HOTPLUG2 _MMIO(0xc403C) /* SHOTPLUG_CTL2 SPT+ */
3100 #define PORTE_HOTPLUG_STATUS_MASK (3 << 0)
3101 #define PORTE_HOTPLUG_NO_DETECT (0 << 0)
3102 #define PORTE_HOTPLUG_SHORT_DETECT (1 << 0)
3103 #define PORTE_HOTPLUG_LONG_DETECT (2 << 0)
3110 #define SHOTPLUG_CTL_DDI _MMIO(0xc4030)
3111 #define SHOTPLUG_CTL_DDI_HPD_ENABLE(hpd_pin) (0x8 << (_HPD_PIN_DDI(hpd_pin) * 4))
3112 #define SHOTPLUG_CTL_DDI_HPD_OUTPUT_DATA(hpd_pin) (0x4 << (_HPD_PIN_DDI(hpd_pin) * 4))
3113 #define SHOTPLUG_CTL_DDI_HPD_STATUS_MASK(hpd_pin) (0x3 << (_HPD_PIN_DDI(hpd_pin) * 4))
3114 #define SHOTPLUG_CTL_DDI_HPD_NO_DETECT(hpd_pin) (0x0 << (_HPD_PIN_DDI(hpd_pin) * 4))
3115 #define SHOTPLUG_CTL_DDI_HPD_SHORT_DETECT(hpd_pin) (0x1 << (_HPD_PIN_DDI(hpd_pin) * 4))
3116 #define SHOTPLUG_CTL_DDI_HPD_LONG_DETECT(hpd_pin) (0x2 << (_HPD_PIN_DDI(hpd_pin) * 4))
3117 #define SHOTPLUG_CTL_DDI_HPD_SHORT_LONG_DETECT(hpd_pin) (0x3 << (_HPD_PIN_DDI(hpd_pin) * 4))
3119 #define SHOTPLUG_CTL_TC _MMIO(0xc4034)
3124 #define SHPD_FILTER_CNT _MMIO(0xc4038)
3125 #define SHPD_FILTER_CNT_500_ADJ 0x001D9
3126 #define SHPD_FILTER_CNT_250 0x000F8
3128 #define _PCH_DPLL_A 0xc6014
3129 #define _PCH_DPLL_B 0xc6018
3130 #define PCH_DPLL(pll) _MMIO((pll) == 0 ? _PCH_DPLL_A : _PCH_DPLL_B)
3132 #define _PCH_FPA0 0xc6040
3133 #define _PCH_FPB0 0xc6048
3134 #define PCH_FP0(pll) _MMIO((pll) == 0 ? _PCH_FPA0 : _PCH_FPB0)
3135 #define FP_CB_TUNE (0x3 << 22)
3137 #define _PCH_FPA1 0xc6044
3138 #define _PCH_FPB1 0xc604c
3139 #define PCH_FP1(pll) _MMIO((pll) == 0 ? _PCH_FPA1 : _PCH_FPB1)
3141 #define PCH_DPLL_TEST _MMIO(0xc606c)
3143 #define PCH_DREF_CONTROL _MMIO(0xC6200)
3144 #define DREF_CONTROL_MASK 0x7fc3
3145 #define DREF_CPU_SOURCE_OUTPUT_DISABLE (0 << 13)
3149 #define DREF_SSC_SOURCE_DISABLE (0 << 11)
3152 #define DREF_NONSPREAD_SOURCE_DISABLE (0 << 9)
3156 #define DREF_SUPERSPREAD_SOURCE_DISABLE (0 << 7)
3159 #define DREF_SSC4_DOWNSPREAD (0 << 6)
3161 #define DREF_SSC1_DISABLE (0 << 1)
3163 #define DREF_SSC4_DISABLE (0)
3166 #define PCH_RAWCLK_FREQ _MMIO(0xc6204)
3171 #define RAWCLK_FREQ_MASK 0x3ff
3172 #define CNP_RAWCLK_DIV_MASK (0x3ff << 16)
3174 #define CNP_RAWCLK_FRAC_MASK (0xf << 26)
3178 #define PCH_DPLL_TMR_CFG _MMIO(0xc6208)
3180 #define PCH_SSC4_PARMS _MMIO(0xc6210)
3181 #define PCH_SSC4_AUX_PARMS _MMIO(0xc6214)
3183 #define PCH_DPLL_SEL _MMIO(0xc7000)
3185 #define TRANS_DPLLA_SEL(pipe) 0
3190 #define _PCH_TRANS_HTOTAL_A 0xe0000
3191 #define _PCH_TRANS_HTOTAL_B 0xe1000
3194 #define TRANS_HACTIVE_SHIFT 0
3196 #define _PCH_TRANS_HBLANK_A 0xe0004
3197 #define _PCH_TRANS_HBLANK_B 0xe1004
3200 #define TRANS_HBLANK_START_SHIFT 0
3202 #define _PCH_TRANS_HSYNC_A 0xe0008
3203 #define _PCH_TRANS_HSYNC_B 0xe1008
3206 #define TRANS_HSYNC_START_SHIFT 0
3208 #define _PCH_TRANS_VTOTAL_A 0xe000c
3209 #define _PCH_TRANS_VTOTAL_B 0xe100c
3212 #define TRANS_VACTIVE_SHIFT 0
3214 #define _PCH_TRANS_VBLANK_A 0xe0010
3215 #define _PCH_TRANS_VBLANK_B 0xe1010
3218 #define TRANS_VBLANK_START_SHIFT 0
3220 #define _PCH_TRANS_VSYNC_A 0xe0014
3221 #define _PCH_TRANS_VSYNC_B 0xe1014
3224 #define TRANS_VSYNC_START_SHIFT 0
3226 #define _PCH_TRANS_VSYNCSHIFT_A 0xe0028
3227 #define _PCH_TRANS_VSYNCSHIFT_B 0xe1028
3230 #define _PCH_TRANSA_DATA_M1 0xe0030
3231 #define _PCH_TRANSB_DATA_M1 0xe1030
3234 #define _PCH_TRANSA_DATA_N1 0xe0034
3235 #define _PCH_TRANSB_DATA_N1 0xe1034
3238 #define _PCH_TRANSA_DATA_M2 0xe0038
3239 #define _PCH_TRANSB_DATA_M2 0xe1038
3242 #define _PCH_TRANSA_DATA_N2 0xe003c
3243 #define _PCH_TRANSB_DATA_N2 0xe103c
3246 #define _PCH_TRANSA_LINK_M1 0xe0040
3247 #define _PCH_TRANSB_LINK_M1 0xe1040
3250 #define _PCH_TRANSA_LINK_N1 0xe0044
3251 #define _PCH_TRANSB_LINK_N1 0xe1044
3254 #define _PCH_TRANSA_LINK_M2 0xe0048
3255 #define _PCH_TRANSB_LINK_M2 0xe1048
3258 #define _PCH_TRANSA_LINK_N2 0xe004c
3259 #define _PCH_TRANSB_LINK_N2 0xe104c
3263 #define _VIDEO_DIP_CTL_A 0xe0200
3264 #define _VIDEO_DIP_CTL_B 0xe1200
3267 #define _VIDEO_DIP_DATA_A 0xe0208
3268 #define _VIDEO_DIP_DATA_B 0xe1208
3271 #define _VIDEO_DIP_GCP_A 0xe0210
3272 #define _VIDEO_DIP_GCP_B 0xe1210
3276 #define GCP_AV_MUTE (1 << 0)
3279 #define _VLV_VIDEO_DIP_CTL_A 0x60200
3280 #define _VLV_VIDEO_DIP_CTL_B 0x61170
3281 #define _CHV_VIDEO_DIP_CTL_C 0x611f0
3287 #define _VLV_VIDEO_DIP_DATA_A 0x60208
3288 #define _VLV_VIDEO_DIP_DATA_B 0x61174
3289 #define _CHV_VIDEO_DIP_DATA_C 0x611f4
3295 #define _VLV_VIDEO_DIP_GDCP_PAYLOAD_A 0x60210
3296 #define _VLV_VIDEO_DIP_GDCP_PAYLOAD_B 0x61178
3297 #define _CHV_VIDEO_DIP_GDCP_PAYLOAD_C 0x611f8
3304 #define _HSW_VIDEO_DIP_CTL_A 0x60200
3305 #define _HSW_VIDEO_DIP_CTL_B 0x61200
3308 #define _HSW_VIDEO_DIP_AVI_DATA_A 0x60220
3309 #define _HSW_VIDEO_DIP_AVI_DATA_B 0x61220
3312 #define _HSW_VIDEO_DIP_VS_DATA_A 0x60260
3313 #define _HSW_VIDEO_DIP_VS_DATA_B 0x61260
3316 #define _HSW_VIDEO_DIP_SPD_DATA_A 0x602A0
3317 #define _HSW_VIDEO_DIP_SPD_DATA_B 0x612A0
3320 #define _HSW_VIDEO_DIP_GMP_DATA_A 0x602E0
3321 #define _HSW_VIDEO_DIP_GMP_DATA_B 0x612E0
3324 #define _HSW_VIDEO_DIP_VSC_DATA_A 0x60320
3325 #define _HSW_VIDEO_DIP_VSC_DATA_B 0x61320
3329 #define _ADL_VIDEO_DIP_AS_DATA_A 0x60484
3330 #define _ADL_VIDEO_DIP_AS_DATA_B 0x61484
3334 #define _GLK_VIDEO_DIP_DRM_DATA_A 0x60440
3335 #define _GLK_VIDEO_DIP_DRM_DATA_B 0x61440
3338 #define _HSW_VIDEO_DIP_AVI_ECC_A 0x60240
3339 #define _HSW_VIDEO_DIP_BVI_ECC_B 0x61240
3340 #define _HSW_VIDEO_DIP_VS_ECC_A 0x60280
3341 #define _HSW_VIDEO_DIP_VS_ECC_B 0x61280
3342 #define _HSW_VIDEO_DIP_SPD_ECC_A 0x602C0
3343 #define _HSW_VIDEO_DIP_SPD_ECC_B 0x612C0
3344 #define _HSW_VIDEO_DIP_GMP_ECC_A 0x60300
3345 #define _HSW_VIDEO_DIP_GMP_ECC_B 0x61300
3346 #define _HSW_VIDEO_DIP_VSC_ECC_A 0x60344
3347 #define _HSW_VIDEO_DIP_VSC_ECC_B 0x61344
3349 #define _HSW_VIDEO_DIP_GCP_A 0x60210
3350 #define _HSW_VIDEO_DIP_GCP_B 0x61210
3359 #define _ICL_VIDEO_DIP_PPS_DATA_A 0x60350
3360 #define _ICL_VIDEO_DIP_PPS_DATA_B 0x61350
3363 #define _ICL_VIDEO_DIP_PPS_ECC_A 0x603D4
3364 #define _ICL_VIDEO_DIP_PPS_ECC_B 0x613D4
3367 #define _HSW_STEREO_3D_CTL_A 0x70020
3368 #define _HSW_STEREO_3D_CTL_B 0x71020
3372 #define _PCH_TRANSACONF 0xf0008
3373 #define _PCH_TRANSBCONF 0xf1008
3379 #define TRANS_FRAME_START_DELAY(x) REG_FIELD_PREP(TRANS_FRAME_START_DELAY_MASK, (x)) /* ibx: 0-3 */
3381 #define TRANS_INTERLACE_PROGRESSIVE REG_FIELD_PREP(TRANS_INTERLACE_MASK, 0)
3385 #define TRANS_BPC_8 REG_FIELD_PREP(TRANS_BPC_MASK, 0)
3390 #define _TRANSA_CHICKEN1 0xf0060
3391 #define _TRANSB_CHICKEN1 0xf1060
3396 #define _TRANSA_CHICKEN2 0xf0064
3397 #define _TRANSB_CHICKEN2 0xf1064
3402 …CHICKEN2_FRAME_START_DELAY(x) REG_FIELD_PREP(TRANS_CHICKEN2_FRAME_START_DELAY_MASK, (x)) /* 0-3 */
3406 #define SOUTH_CHICKEN1 _MMIO(0xc2000)
3422 #define CHASSIS_CLK_REQ_DURATION_MASK (0xf << 8)
3426 #define SPT_PWM_GRANULARITY (1 << 0)
3427 #define SOUTH_CHICKEN2 _MMIO(0xc2004)
3431 #define DPLS_EDP_PPS_FIX_DIS (1 << 0)
3433 #define SOUTH_DSPCLK_GATE_D _MMIO(0xc2020)
3442 #define PCH_DP_B _MMIO(0xe4100)
3443 #define PCH_DP_C _MMIO(0xe4200)
3444 #define PCH_DP_D _MMIO(0xe4300)
3447 #define _TRANS_DP_CTL_A 0xe0300
3448 #define _TRANS_DP_CTL_B 0xe1300
3449 #define _TRANS_DP_CTL_C 0xe2300
3458 #define TRANS_DP_BPC_8 REG_FIELD_PREP(TRANS_DP_BPC_MASK, 0)
3465 #define _TRANS_DP2_CTL_A 0x600a0
3466 #define _TRANS_DP2_CTL_B 0x610a0
3467 #define _TRANS_DP2_CTL_C 0x620a0
3468 #define _TRANS_DP2_CTL_D 0x630a0
3474 #define _TRANS_DP2_VFREQHIGH_A 0x600a4
3475 #define _TRANS_DP2_VFREQHIGH_B 0x610a4
3476 #define _TRANS_DP2_VFREQHIGH_C 0x620a4
3477 #define _TRANS_DP2_VFREQHIGH_D 0x630a4
3482 #define _TRANS_DP2_VFREQLOW_A 0x600a8
3483 #define _TRANS_DP2_VFREQLOW_B 0x610a8
3484 #define _TRANS_DP2_VFREQLOW_C 0x620a8
3485 #define _TRANS_DP2_VFREQLOW_D 0x630a8
3490 #define EDP_LINK_TRAIN_400MV_0DB_SNB_A (0x38 << 22)
3491 #define EDP_LINK_TRAIN_400MV_6DB_SNB_A (0x02 << 22)
3492 #define EDP_LINK_TRAIN_600MV_3_5DB_SNB_A (0x01 << 22)
3493 #define EDP_LINK_TRAIN_800MV_0DB_SNB_A (0x0 << 22)
3495 #define EDP_LINK_TRAIN_400_600MV_0DB_SNB_B (0x0 << 22)
3496 #define EDP_LINK_TRAIN_400MV_3_5DB_SNB_B (0x1 << 22)
3497 #define EDP_LINK_TRAIN_400_600MV_6DB_SNB_B (0x3a << 22)
3498 #define EDP_LINK_TRAIN_600_800MV_3_5DB_SNB_B (0x39 << 22)
3499 #define EDP_LINK_TRAIN_800_1200MV_0DB_SNB_B (0x38 << 22)
3500 #define EDP_LINK_TRAIN_VOL_EMP_MASK_SNB (0x3f << 22)
3503 #define EDP_LINK_TRAIN_400MV_0DB_IVB (0x24 << 22)
3504 #define EDP_LINK_TRAIN_400MV_3_5DB_IVB (0x2a << 22)
3505 #define EDP_LINK_TRAIN_400MV_6DB_IVB (0x2f << 22)
3506 #define EDP_LINK_TRAIN_600MV_0DB_IVB (0x30 << 22)
3507 #define EDP_LINK_TRAIN_600MV_3_5DB_IVB (0x36 << 22)
3508 #define EDP_LINK_TRAIN_800MV_0DB_IVB (0x38 << 22)
3509 #define EDP_LINK_TRAIN_800MV_3_5DB_IVB (0x3e << 22)
3512 #define EDP_LINK_TRAIN_500MV_0DB_IVB (0x00 << 22)
3513 #define EDP_LINK_TRAIN_1000MV_0DB_IVB (0x20 << 22)
3514 #define EDP_LINK_TRAIN_500MV_3_5DB_IVB (0x02 << 22)
3515 #define EDP_LINK_TRAIN_1000MV_3_5DB_IVB (0x22 << 22)
3516 #define EDP_LINK_TRAIN_1000MV_6DB_IVB (0x23 << 22)
3518 #define EDP_LINK_TRAIN_VOL_EMP_MASK_IVB (0x3f << 22)
3520 #define VLV_PMWGICZ _MMIO(0x1300a4)
3522 #define HSW_EDRAM_CAP _MMIO(0x120010)
3523 #define EDRAM_ENABLED 0x1
3524 #define EDRAM_NUM_BANKS(cap) (((cap) >> 1) & 0xf)
3525 #define EDRAM_WAYS_IDX(cap) (((cap) >> 5) & 0x7)
3526 #define EDRAM_SETS_IDX(cap) (((cap) >> 8) & 0x3)
3528 #define VLV_CHICKEN_3 _MMIO(VLV_DISPLAY_BASE + 0x7040C)
3532 #define GEN6_PCODE_MAILBOX _MMIO(0x138124)
3536 #define GEN6_PCODE_MB_COMMAND REG_GENMASK(7, 0)
3537 #define GEN6_PCODE_ERROR_MASK 0xFF
3538 #define GEN6_PCODE_SUCCESS 0x0
3539 #define GEN6_PCODE_ILLEGAL_CMD 0x1
3540 #define GEN6_PCODE_MIN_FREQ_TABLE_GT_RATIO_OUT_OF_RANGE 0x2
3541 #define GEN6_PCODE_TIMEOUT 0x3
3542 #define GEN6_PCODE_UNIMPLEMENTED_CMD 0xFF
3543 #define GEN7_PCODE_TIMEOUT 0x2
3544 #define GEN7_PCODE_ILLEGAL_DATA 0x3
3545 #define GEN11_PCODE_ILLEGAL_SUBCOMMAND 0x4
3546 #define GEN11_PCODE_LOCKED 0x6
3547 #define GEN11_PCODE_REJECTED 0x11
3548 #define GEN7_PCODE_MIN_FREQ_TABLE_GT_RATIO_OUT_OF_RANGE 0x10
3549 #define GEN6_PCODE_WRITE_RC6VIDS 0x4
3550 #define GEN6_PCODE_READ_RC6VIDS 0x5
3553 #define BDW_PCODE_DISPLAY_FREQ_CHANGE_REQ 0x18
3554 #define GEN9_PCODE_READ_MEM_LATENCY 0x6
3558 #define GEN9_MEM_LATENCY_LEVEL_0_4_MASK REG_GENMASK(7, 0)
3559 #define SKL_PCODE_LOAD_HDCP_KEYS 0x5
3560 #define SKL_PCODE_CDCLK_CONTROL 0x7
3561 #define SKL_CDCLK_PREPARE_FOR_CHANGE 0x3
3562 #define SKL_CDCLK_READY_FOR_CHANGE 0x1
3563 #define GEN6_PCODE_WRITE_MIN_FREQ_TABLE 0x8
3564 #define GEN6_PCODE_READ_MIN_FREQ_TABLE 0x9
3565 #define GEN6_READ_OC_PARAMS 0xc
3566 #define ICL_PCODE_MEM_SUBSYSYSTEM_INFO 0xd
3567 #define ICL_PCODE_MEM_SS_READ_GLOBAL_INFO (0x0 << 8)
3568 #define ICL_PCODE_MEM_SS_READ_QGV_POINT_INFO(point) (((point) << 16) | (0x1 << 8))
3569 #define ADL_PCODE_MEM_SS_READ_PSF_GV_INFO ((0) | (0x2 << 8))
3570 #define DISPLAY_TO_PCODE_CDCLK_MAX 0x28D
3571 #define DISPLAY_TO_PCODE_VOLTAGE_MASK REG_GENMASK(1, 0)
3584 #define ICL_PCODE_SAGV_DE_MEM_SS_CONFIG 0xe
3585 #define ICL_PCODE_REP_QGV_MASK REG_GENMASK(1, 0)
3586 #define ICL_PCODE_REP_QGV_SAFE REG_FIELD_PREP(ICL_PCODE_REP_QGV_MASK, 0)
3590 #define ADLS_PCODE_REP_PSF_SAFE REG_FIELD_PREP(ADLS_PCODE_REP_PSF_MASK, 0)
3593 #define ICL_PCODE_REQ_QGV_PT_MASK REG_GENMASK(7, 0)
3597 #define GEN6_PCODE_READ_D_COMP 0x10
3598 #define GEN6_PCODE_WRITE_D_COMP 0x11
3599 #define ICL_PCODE_EXIT_TCCOLD 0x12
3600 #define HSW_PCODE_DE_WRITE_FREQ_REQ 0x17
3601 #define DISPLAY_IPS_CONTROL 0x19
3602 #define TGL_PCODE_TCCOLD 0x26
3603 #define TGL_PCODE_EXIT_TCCOLD_DATA_L_EXIT_FAILED REG_BIT(0)
3604 #define TGL_PCODE_EXIT_TCCOLD_DATA_L_BLOCK_REQ 0
3605 #define TGL_PCODE_EXIT_TCCOLD_DATA_L_UNBLOCK_REQ REG_BIT(0)
3608 #define HSW_PCODE_DYNAMIC_DUTY_CYCLE_CONTROL 0x1A
3609 #define GEN9_PCODE_SAGV_CONTROL 0x21
3610 #define GEN9_SAGV_DISABLE 0x0
3611 #define GEN9_SAGV_IS_DISABLED 0x1
3612 #define GEN9_SAGV_ENABLE 0x3
3613 #define DG1_PCODE_STATUS 0x7E
3614 #define DG1_UNCORE_GET_INIT_STATUS 0x0
3615 #define DG1_UNCORE_INIT_STATUS_COMPLETE 0x1
3616 #define PCODE_POWER_SETUP 0x7C
3617 #define POWER_SETUP_SUBCOMMAND_READ_I1 0x4
3618 #define POWER_SETUP_SUBCOMMAND_WRITE_I1 0x5
3621 #define POWER_SETUP_I1_DATA_MASK REG_GENMASK(15, 0)
3622 #define GEN12_PCODE_READ_SAGV_BLOCK_TIME_US 0x23
3623 #define XEHP_PCODE_FREQUENCY_CONFIG 0x6e /* pvc */
3625 #define PCODE_MBOX_FC_SC_READ_FUSED_P0 0x0
3626 #define PCODE_MBOX_FC_SC_READ_FUSED_PN 0x1
3629 #define PCODE_MBOX_DOMAIN_NONE 0x0
3630 #define PCODE_MBOX_DOMAIN_MEDIAFF 0x3
3631 #define GEN6_PCODE_DATA _MMIO(0x138128)
3634 #define GEN6_PCODE_DATA1 _MMIO(0x13812C)
3636 #define MTL_PCODE_STOLEN_ACCESS _MMIO(0x138914)
3637 #define STOLEN_ACCESS_ALLOWED 0x1
3640 #define GEN7_L3CDERRST1(slice) _MMIO(0xB008 + (slice) * 0x200) /* L3CD Error Status 1 */
3641 #define GEN7_L3CDERRST1_ROW_MASK (0x7ff << 14)
3657 #define GEN7_SO_WRITE_OFFSET(n) _MMIO(0x5280 + (n) * 4)
3674 #define HSW_PWR_WELL_CTL1 _MMIO(0x45400)
3675 #define HSW_PWR_WELL_CTL2 _MMIO(0x45404)
3676 #define HSW_PWR_WELL_CTL3 _MMIO(0x45408)
3677 #define HSW_PWR_WELL_CTL4 _MMIO(0x4540C)
3678 #define HSW_PWR_WELL_CTL_REQ(pw_idx) (0x2 << ((pw_idx) * 2))
3679 #define HSW_PWR_WELL_CTL_STATE(pw_idx) (0x1 << ((pw_idx) * 2))
3695 #define SKL_PW_CTL_IDX_MISC_IO 0
3702 #define ICL_PW_CTL_IDX_PW_1 0
3710 #define ICL_PWR_WELL_CTL_AUX1 _MMIO(0x45440)
3711 #define ICL_PWR_WELL_CTL_AUX2 _MMIO(0x45444)
3712 #define ICL_PWR_WELL_CTL_AUX4 _MMIO(0x4544C)
3736 #define ICL_PW_CTL_IDX_AUX_A 0
3738 #define ICL_PWR_WELL_CTL_DDI1 _MMIO(0x45450)
3739 #define ICL_PWR_WELL_CTL_DDI2 _MMIO(0x45454)
3740 #define ICL_PWR_WELL_CTL_DDI4 _MMIO(0x4545C)
3754 #define ICL_PW_CTL_IDX_DDI_A 0
3757 #define HSW_PWR_WELL_CTL5 _MMIO(0x45410)
3761 #define HSW_PWR_WELL_CTL6 _MMIO(0x45414)
3772 #define SKL_FUSE_STATUS _MMIO(0x42000)
3789 #define _TRANS_DDI_FUNC_CTL_A 0x60400
3790 #define _TRANS_DDI_FUNC_CTL_B 0x61400
3791 #define _TRANS_DDI_FUNC_CTL_C 0x62400
3792 #define _TRANS_DDI_FUNC_CTL_D 0x63400
3793 #define _TRANS_DDI_FUNC_CTL_EDP 0x6F400
3794 #define _TRANS_DDI_FUNC_CTL_DSI0 0x6b400
3795 #define _TRANS_DDI_FUNC_CTL_DSI1 0x6bc00
3803 #define TGL_TRANS_DDI_PORT_MASK (0xf << TGL_TRANS_DDI_PORT_SHIFT)
3807 #define TRANS_DDI_MODE_SELECT_HDMI (0 << 24)
3813 #define TRANS_DDI_BPC_8 (0 << 20)
3823 #define TRANS_DDI_EDP_INPUT_A_ON (0 << 12)
3841 #define TRANS_DDI_HDMI_SCRAMBLING (1 << 0)
3846 #define _TRANS_DDI_FUNC_CTL2_A 0x60404
3847 #define _TRANS_DDI_FUNC_CTL2_B 0x61404
3848 #define _TRANS_DDI_FUNC_CTL2_C 0x62404
3849 #define _TRANS_DDI_FUNC_CTL2_EDP 0x6f404
3850 #define _TRANS_DDI_FUNC_CTL2_DSI0 0x6b404
3851 #define _TRANS_DDI_FUNC_CTL2_DSI1 0x6bc04
3854 #define PORT_SYNC_MODE_MASTER_SELECT_MASK REG_GENMASK(2, 0)
3857 #define TRANS_CMTG_CHICKEN _MMIO(0x6fa90)
3861 #define _DP_TP_CTL_A 0x64040
3862 #define _DP_TP_CTL_B 0x64140
3863 #define _TGL_DP_TP_CTL_A 0x60540
3868 #define DP_TP_CTL_MODE_SST (0 << 27)
3872 #define DP_TP_CTL_TRAIN_PAT4_SEL_TP4A (0 << 19)
3878 #define DP_TP_CTL_LINK_TRAIN_PAT1 (0 << 8)
3887 #define _DP_TP_STATUS_A 0x64044
3888 #define _DP_TP_STATUS_B 0x64144
3889 #define _TGL_DP_TP_STATUS_A 0x60544
3899 #define DP_TP_STATUS_PAYLOAD_MAPPING_VC0 (3 << 0)
3902 #define _DDI_BUF_CTL_A 0x64000
3903 #define _DDI_BUF_CTL_B 0x64100
3910 #define DDI_BUF_EMP_MASK (0xf << 24)
3913 #define DDI_BUF_PORT_DATA_10BIT REG_FIELD_PREP(DDI_BUF_PORT_DATA_MASK, 0)
3923 #define DDI_INIT_DISPLAY_DETECTED (1 << 0)
3926 #define _DDI_BUF_TRANS_A 0x64E00
3927 #define _DDI_BUF_TRANS_B 0x64E60
3933 #define _DDI_DP_COMP_CTL_A 0x605F0
3934 #define _DDI_DP_COMP_CTL_B 0x615F0
3937 #define DDI_DP_COMP_CTL_D10_2 (0 << 28)
3943 #define DDI_DP_COMP_CTL_HBR2_RESET (0xFC << 0)
3946 #define _DDI_DP_COMP_PAT_A 0x605F4
3947 #define _DDI_DP_COMP_PAT_B 0x615F4
3953 #define SBI_ADDR _MMIO(0xC6000)
3954 #define SBI_DATA _MMIO(0xC6004)
3955 #define SBI_CTL_STAT _MMIO(0xC6008)
3956 #define SBI_CTL_DEST_ICLK (0x0 << 16)
3957 #define SBI_CTL_DEST_MPHY (0x1 << 16)
3958 #define SBI_CTL_OP_IORD (0x2 << 8)
3959 #define SBI_CTL_OP_IOWR (0x3 << 8)
3960 #define SBI_CTL_OP_CRRD (0x6 << 8)
3961 #define SBI_CTL_OP_CRWR (0x7 << 8)
3962 #define SBI_RESPONSE_FAIL (0x1 << 1)
3963 #define SBI_RESPONSE_SUCCESS (0x0 << 1)
3964 #define SBI_BUSY (0x1 << 0)
3965 #define SBI_READY (0x0 << 0)
3968 #define SBI_SSCDIVINTPHASE 0x0200
3969 #define SBI_SSCDIVINTPHASE6 0x0600
3971 #define SBI_SSCDIVINTPHASE_DIVSEL_MASK (0x7f << 1)
3974 #define SBI_SSCDIVINTPHASE_INCVAL_MASK (0x7f << 8)
3977 #define SBI_SSCDIVINTPHASE_PROPAGATE (1 << 0)
3978 #define SBI_SSCDITHPHASE 0x0204
3979 #define SBI_SSCCTL 0x020c
3980 #define SBI_SSCCTL6 0x060C
3982 #define SBI_SSCCTL_DISABLE (1 << 0)
3983 #define SBI_SSCAUXDIV6 0x0610
3987 #define SBI_DBUFF0 0x2a00
3988 #define SBI_GEN0 0x1f00
3989 #define SBI_GEN0_CFG_BUFFENABLE_DISABLE (1 << 0)
3992 #define PIXCLK_GATE _MMIO(0xC6020)
3993 #define PIXCLK_GATE_UNGATE (1 << 0)
3994 #define PIXCLK_GATE_GATE (0 << 0)
3997 #define SPLL_CTL _MMIO(0x46020)
3999 #define SPLL_REF_BCLK (0 << 28)
4005 #define SPLL_FREQ_810MHz (0 << 26)
4011 #define _WRPLL_CTL1 0x46040
4012 #define _WRPLL_CTL2 0x46060
4015 #define WRPLL_REF_BCLK (0 << 28)
4022 #define WRPLL_DIVIDER_REFERENCE(x) ((x) << 0)
4023 #define WRPLL_DIVIDER_REF_MASK (0xff)
4025 #define WRPLL_DIVIDER_POST_MASK (0x3f << 8)
4029 #define WRPLL_DIVIDER_FB_MASK (0xff << 16)
4032 #define _PORT_CLK_SEL_A 0x46100
4033 #define _PORT_CLK_SEL_B 0x46104
4036 #define PORT_CLK_SEL_LCPLL_2700 REG_FIELD_PREP(PORT_CLK_SEL_MASK, 0)
4048 #define DDI_CLK_SEL_NONE REG_FIELD_PREP(DDI_CLK_SEL_MASK, 0x0)
4049 #define DDI_CLK_SEL_MG REG_FIELD_PREP(DDI_CLK_SEL_MASK, 0x8)
4050 #define DDI_CLK_SEL_TBT_162 REG_FIELD_PREP(DDI_CLK_SEL_MASK, 0xC)
4051 #define DDI_CLK_SEL_TBT_270 REG_FIELD_PREP(DDI_CLK_SEL_MASK, 0xD)
4052 #define DDI_CLK_SEL_TBT_540 REG_FIELD_PREP(DDI_CLK_SEL_MASK, 0xE)
4053 #define DDI_CLK_SEL_TBT_810 REG_FIELD_PREP(DDI_CLK_SEL_MASK, 0xF)
4056 #define _TRANS_CLK_SEL_A 0x46140
4057 #define _TRANS_CLK_SEL_B 0x46144
4060 #define TRANS_CLK_SEL_DISABLED (0x0 << 29)
4062 #define TGL_TRANS_CLK_SEL_DISABLED (0x0 << 28)
4066 #define CDCLK_FREQ _MMIO(0x46200)
4068 #define _TRANSA_MSA_MISC 0x60410
4069 #define _TRANSB_MSA_MISC 0x61410
4070 #define _TRANSC_MSA_MISC 0x62410
4071 #define _TRANS_EDP_MSA_MISC 0x6f410
4075 #define _TRANS_A_SET_CONTEXT_LATENCY 0x6007C
4076 #define _TRANS_B_SET_CONTEXT_LATENCY 0x6107C
4077 #define _TRANS_C_SET_CONTEXT_LATENCY 0x6207C
4078 #define _TRANS_D_SET_CONTEXT_LATENCY 0x6307C
4080 #define TRANS_SET_CONTEXT_LATENCY_MASK REG_GENMASK(15, 0)
4084 #define LCPLL_CTL _MMIO(0x130040)
4087 #define LCPLL_REF_NON_SSC (0 << 28)
4092 #define LCPLL_CLK_FREQ_450 (0 << 26)
4108 #define CDCLK_CTL _MMIO(0x46000)
4110 #define CDCLK_FREQ_450_432 REG_FIELD_PREP(CDCLK_FREQ_SEL_MASK, 0)
4115 #define MDCLK_SOURCE_SEL_CD2XCLK REG_FIELD_PREP(MDCLK_SOURCE_SEL_MASK, 0)
4118 #define BXT_CDCLK_CD2X_DIV_SEL_1 REG_FIELD_PREP(BXT_CDCLK_CD2X_DIV_SEL_MASK, 0)
4125 #define ICL_CDCLK_CD2X_PIPE(pipe) (_PICK(pipe, 0, 2, 6) << 19)
4130 #define CDCLK_FREQ_DECIMAL_MASK (0x7ff)
4133 #define CDCLK_SQUASH_CTL _MMIO(0x46008)
4137 #define CDCLK_SQUASH_WAVEFORM_MASK REG_GENMASK(15, 0)
4141 #define LCPLL1_CTL _MMIO(0x46010)
4142 #define LCPLL2_CTL _MMIO(0x46014)
4146 #define DPLL_CTRL1 _MMIO(0x6C058)
4153 #define DPLL_CTRL1_LINK_RATE_2700 0
4161 #define DPLL_CTRL2 _MMIO(0x6C05C)
4169 #define DPLL_STATUS _MMIO(0x6C060)
4173 #define _DPLL1_CFGCR1 0x6C040
4174 #define _DPLL2_CFGCR1 0x6C048
4175 #define _DPLL3_CFGCR1 0x6C050
4178 #define DPLL_CFGCR1_DCO_FRACTION_MASK (0x7fff << 9)
4180 #define DPLL_CFGCR1_DCO_INTEGER_MASK (0x1ff)
4182 #define _DPLL1_CFGCR2 0x6C044
4183 #define _DPLL2_CFGCR2 0x6C04C
4184 #define _DPLL3_CFGCR2 0x6C054
4186 #define DPLL_CFGCR2_QDIV_RATIO_MASK (0xff << 8)
4191 #define DPLL_CFGCR2_KDIV_5 (0 << 5)
4197 #define DPLL_CFGCR2_PDIV_1 (0 << 2)
4205 #define ICL_DPCLKA_CFGCR0 _MMIO(0x164280)
4214 #define RKL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy) _PICK(phy, 0, 2, 4, 27)
4226 #define _DG1_DPCLKA_CFGCR0 0x164280
4227 #define _DG1_DPCLKA1_CFGCR0 0x16C280
4236 #define DG1_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(phy) (0x3 << DG1_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))
4239 #define _ADLS_DPCLKA_CFGCR0 0x164280
4240 #define _ADLS_DPCLKA_CFGCR1 0x1642BC
4248 #define ADLS_DPCLKA_DDIA_SEL_MASK REG_GENMASK(1, 0)
4251 #define ADLS_DPCLKA_DDIJ_SEL_MASK REG_GENMASK(1, 0)
4260 #define _DPLL0_ENABLE 0x46010
4261 #define _DPLL1_ENABLE 0x46014
4262 #define _ADLS_DPLL2_ENABLE 0x46018
4263 #define _ADLS_DPLL3_ENABLE 0x46030
4272 #define _DG2_PLL3_ENABLE 0x4601C
4278 #define TBT_PLL_ENABLE _MMIO(0x46020)
4280 #define _MG_PLL1_ENABLE 0x46030
4281 #define _MG_PLL2_ENABLE 0x46034
4282 #define _MG_PLL3_ENABLE 0x46038
4283 #define _MG_PLL4_ENABLE 0x4603C
4294 #define PORTTC1_PLL_ENABLE 0x46038
4295 #define PORTTC2_PLL_ENABLE 0x46040
4300 #define _ICL_DPLL0_CFGCR0 0x164000
4301 #define _ICL_DPLL1_CFGCR0 0x164080
4307 #define DPLL_CFGCR0_LINK_RATE_MASK (0xf << 25)
4308 #define DPLL_CFGCR0_LINK_RATE_2700 (0 << 25)
4316 #define DPLL_CFGCR0_DCO_FRACTION_MASK (0x7fff << 10)
4319 #define DPLL_CFGCR0_DCO_INTEGER_MASK (0x3ff)
4321 #define _ICL_DPLL0_CFGCR1 0x164004
4322 #define _ICL_DPLL1_CFGCR1 0x164084
4325 #define DPLL_CFGCR1_QDIV_RATIO_MASK (0xff << 10)
4336 #define DPLL_CFGCR1_PDIV_MASK (0xf << 2)
4343 #define DPLL_CFGCR1_CENTRAL_FREQ (3 << 0)
4344 #define DPLL_CFGCR1_CENTRAL_FREQ_8400 (3 << 0)
4345 #define TGL_DPLL_CFGCR1_CFSELOVRD_NORMAL_XTAL (0 << 0)
4347 #define _TGL_DPLL0_CFGCR0 0x164284
4348 #define _TGL_DPLL1_CFGCR0 0x16428C
4349 #define _TGL_TBTPLL_CFGCR0 0x16429C
4356 #define _TGL_DPLL0_DIV0 0x164B00
4357 #define _TGL_DPLL1_DIV0 0x164C00
4362 #define _TGL_DPLL0_CFGCR1 0x164288
4363 #define _TGL_DPLL1_CFGCR1 0x164290
4364 #define _TGL_TBTPLL_CFGCR1 0x1642A0
4371 #define _DG1_DPLL2_CFGCR0 0x16C284
4372 #define _DG1_DPLL3_CFGCR0 0x16C28C
4377 #define _DG1_DPLL2_CFGCR1 0x16C288
4378 #define _DG1_DPLL3_CFGCR1 0x16C290
4384 #define _ADLS_DPLL4_CFGCR0 0x164294
4385 #define _ADLS_DPLL3_CFGCR0 0x1642C0
4390 #define _ADLS_DPLL4_CFGCR1 0x164298
4391 #define _ADLS_DPLL3_CFGCR1 0x1642C4
4397 #define BXT_DE_PLL_CTL _MMIO(0x6d000)
4399 #define BXT_DE_PLL_RATIO_MASK 0xff
4401 #define BXT_DE_PLL_ENABLE _MMIO(0x46070)
4407 #define ICL_CDCLK_PLL_RATIO_MASK 0xff
4410 #define DC_STATE_EN _MMIO(0x45504)
4411 #define DC_STATE_DISABLE 0
4416 #define DC_STATE_EN_UPTO_DC5 (1 << 0)
4418 #define DC_STATE_EN_UPTO_DC6 (2 << 0)
4419 #define DC_STATE_EN_UPTO_DC5_DC6_MASK 0x3
4421 #define DC_STATE_DEBUG _MMIO(0x45520)
4422 #define DC_STATE_DEBUG_MASK_CORES (1 << 0)
4425 #define D_COMP_BDW _MMIO(0x138144)
4428 #define _WM_LINETIME_A 0x45270
4429 #define _WM_LINETIME_B 0x45274
4431 #define HSW_LINETIME_MASK REG_GENMASK(8, 0)
4437 #define SFUSE_STRAP _MMIO(0xc2014)
4445 #define SFUSE_STRAP_DDID_DETECTED (1 << 0)
4447 #define WM_MISC _MMIO(0x45260)
4448 #define WM_MISC_DATA_PARTITION_5_6 (1 << 0)
4450 #define WM_DBG _MMIO(0x45280)
4451 #define WM_DBG_DISALLOW_MULTIPLE_LP (1 << 0)
4456 #define GEN4_TIMESTAMP _MMIO(0x2358)
4457 #define ILK_TIMESTAMP_HI _MMIO(0x70070)
4458 #define IVB_TIMESTAMP_CTR _MMIO(0x44070)
4460 #define GEN9_TIMESTAMP_OVERRIDE _MMIO(0x44074)
4461 #define GEN9_TIMESTAMP_OVERRIDE_US_COUNTER_DIVIDER_SHIFT 0
4462 #define GEN9_TIMESTAMP_OVERRIDE_US_COUNTER_DIVIDER_MASK 0x3ff
4464 #define GEN9_TIMESTAMP_OVERRIDE_US_COUNTER_DENOMINATOR_MASK (0xf << 12)
4467 #define _PIPE_FRMTMSTMP_A 0x70048
4468 #define _PIPE_FRMTMSTMP_B 0x71048
4473 #define _PIPE_FLIPTMSTMP_A 0x7004C
4474 #define _PIPE_FLIPTMSTMP_B 0x7104C
4479 #define _PIPE_FLIPDONETMSTMP_A 0x70054
4480 #define _PIPE_FLIPDONETMSTMP_B 0x71054
4484 #define _VLV_PIPE_MSA_MISC_A 0x70048
4488 #define VLV_MSA_MISC1_SW_S3D_MASK REG_GENMASK(2, 0) /* MSA MISC1 3:1 */
4490 #define GGC _MMIO(0x108040)
4494 #define GEN6_GSMBASE _MMIO(0x108100)
4495 #define GEN6_DSMBASE _MMIO(0x1080C0)
4499 #define XEHP_CLOCK_GATE_DIS _MMIO(0x101014)
4504 #define _ICL_PHY_MISC_A 0x64C00
4505 #define _ICL_PHY_MISC_B 0x64C04
4506 #define _DG2_PHY_MISC_TC1 0x64C14 /* TC1="PHY E" but offset as if "PHY F" */
4514 #define PORT_TX_DFLEXDPSP(fia) _MMIO_FIA((fia), 0x008A0)
4519 #define DP_LANE_ASSIGNMENT_MASK(idx) (0xf << ((idx) * 8))
4522 #define PORT_TX_DFLEXDPPMS(fia) _MMIO_FIA((fia), 0x00890)
4525 #define PORT_TX_DFLEXDPCSSS(fia) _MMIO_FIA((fia), 0x00894)
4528 #define PORT_TX_DFLEXPA1(fia) _MMIO_FIA((fia), 0x00880)
4530 #define DP_PIN_ASSIGNMENT_MASK(idx) (0xf << ((idx) * 4))
4533 #define _TCSS_DDI_STATUS_1 0x161500
4534 #define _TCSS_DDI_STATUS_2 0x161504
4541 #define TCSS_DDI_STATUS_HPD_LIVE_STATUS_ALT REG_BIT(0)
4543 #define PRIMARY_SPI_TRIGGER _MMIO(0x102040)
4544 #define PRIMARY_SPI_ADDRESS _MMIO(0x102080)
4545 #define PRIMARY_SPI_REGIONID _MMIO(0x102084)
4546 #define SPI_STATIC_REGIONS _MMIO(0x102090)
4547 #define OPTIONROM_SPI_REGIONID_MASK REG_GENMASK(7, 0)
4548 #define OROM_OFFSET _MMIO(0x1020c0)
4551 #define CLKREQ_POLICY _MMIO(0x101038)
4554 #define CLKGATE_DIS_MISC _MMIO(0x46534)
4557 #define _MTL_CLKGATE_DIS_TRANS_A 0x604E8
4558 #define _MTL_CLKGATE_DIS_TRANS_B 0x614E8
4562 #define MTL_MEM_SS_INFO_GLOBAL _MMIO(0x45700)
4565 #define MTL_DDR_TYPE_MASK REG_GENMASK(3, 0)
4567 #define MTL_MEM_SS_INFO_QGV_POINT_OFFSET 0x45710
4571 #define MTL_DCLK_MASK REG_GENMASK(15, 0)
4575 #define MTL_TRDPRE_MASK REG_GENMASK(7, 0)
4577 #define MTL_MEDIA_GSI_BASE 0x380000