Merge drm/drm-next into drm-intel-next-queued
[sfrench/cifs-2.6.git] / drivers / gpu / drm / i915 / i915_reg.h
index 2aa69d347ec4070de9fd27aaf1e138d8a305dcd5..5898f59e3dd7aa35799bdc51ec981e1e913855ab 100644 (file)
  */
 #define REG_BIT(__n)                                                   \
        ((u32)(BIT(__n) +                                               \
-              BUILD_BUG_ON_ZERO(__builtin_constant_p(__n) &&           \
+              BUILD_BUG_ON_ZERO(__is_constexpr(__n) &&         \
                                 ((__n) < 0 || (__n) > 31))))
 
 /**
  */
 #define REG_GENMASK(__high, __low)                                     \
        ((u32)(GENMASK(__high, __low) +                                 \
-              BUILD_BUG_ON_ZERO(__builtin_constant_p(__high) &&        \
-                                __builtin_constant_p(__low) &&         \
+              BUILD_BUG_ON_ZERO(__is_constexpr(__high) &&      \
+                                __is_constexpr(__low) &&               \
                                 ((__low) < 0 || (__high) > 31 || (__low) > (__high)))))
 
 /*
  * REG_FIELD_PREP() - Prepare a u32 bitfield value
  * @__mask: shifted mask defining the field's length and position
  * @__val: value to put in the field
-
+ *
  * Local copy of FIELD_PREP() to generate an integer constant expression, force
  * u32 and for consistency with REG_FIELD_GET(), REG_BIT() and REG_GENMASK().
  *
@@ -290,6 +290,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
 #define OTHER_CLASS            4
 #define MAX_ENGINE_CLASS       4
 
+#define OTHER_GUC_INSTANCE     0
 #define OTHER_GTPM_INSTANCE    1
 #define MAX_ENGINE_INSTANCE    3
 
@@ -1062,6 +1063,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
 
 #define NOA_DATA           _MMIO(0x986C)
 #define NOA_WRITE          _MMIO(0x9888)
+#define GEN10_NOA_WRITE_HIGH _MMIO(0x9884)
 
 #define _GEN7_PIPEA_DE_LOAD_SL 0x70068
 #define _GEN7_PIPEB_DE_LOAD_SL 0x71068
@@ -1791,8 +1793,10 @@ enum i915_power_well_id {
  */
 #define _ICL_COMBOPHY_A                        0x162000
 #define _ICL_COMBOPHY_B                        0x6C000
+#define _EHL_COMBOPHY_C                        0x160000
 #define _ICL_COMBOPHY(port)            _PICK(port, _ICL_COMBOPHY_A, \
-                                             _ICL_COMBOPHY_B)
+                                             _ICL_COMBOPHY_B, \
+                                             _EHL_COMBOPHY_C)
 
 /* CNL/ICL Port CL_DW registers */
 #define _ICL_PORT_CL_DW(dw, port)      (_ICL_COMBOPHY(port) + \
@@ -1813,7 +1817,6 @@ enum i915_power_well_id {
 #define  PWR_DOWN_LN_3                 (0x8 << 4)
 #define  PWR_DOWN_LN_2_1_0             (0x7 << 4)
 #define  PWR_DOWN_LN_1_0               (0x3 << 4)
-#define  PWR_DOWN_LN_1                 (0x2 << 4)
 #define  PWR_DOWN_LN_3_1               (0xa << 4)
 #define  PWR_DOWN_LN_3_1_0             (0xb << 4)
 #define  PWR_DOWN_LN_MASK              (0xf << 4)
@@ -1847,6 +1850,9 @@ enum i915_power_well_id {
 #define   VOLTAGE_INFO_MASK            (3 << 24)
 #define   VOLTAGE_INFO_SHIFT           24
 
+#define ICL_PORT_COMP_DW8(port)                _MMIO(_ICL_PORT_COMP_DW(8, port))
+#define   IREFGEN                      (1 << 24)
+
 #define CNL_PORT_COMP_DW9              _MMIO(0x162124)
 #define ICL_PORT_COMP_DW9(port)                _MMIO(_ICL_PORT_COMP_DW(9, port))
 
@@ -1892,6 +1898,8 @@ enum i915_power_well_id {
 #define ICL_PORT_PCS_DW1_GRP(port)     _MMIO(_ICL_PORT_PCS_DW_GRP(1, port))
 #define ICL_PORT_PCS_DW1_LN0(port)     _MMIO(_ICL_PORT_PCS_DW_LN(1, 0, port))
 #define   COMMON_KEEPER_EN             (1 << 26)
+#define   LATENCY_OPTIM_MASK           (0x3 << 2)
+#define   LATENCY_OPTIM_VAL(x)         ((x) << 2)
 
 /* CNL/ICL Port TX registers */
 #define _CNL_PORT_TX_AE_GRP_OFFSET             0x162340
@@ -1987,6 +1995,10 @@ enum i915_power_well_id {
 #define   N_SCALAR(x)                  ((x) << 24)
 #define   N_SCALAR_MASK                        (0x7F << 24)
 
+#define _ICL_DPHY_CHKN_REG                     0x194
+#define ICL_DPHY_CHKN(port)                    _MMIO(_ICL_COMBOPHY(port) + _ICL_DPHY_CHKN_REG)
+#define   ICL_DPHY_CHKN_AFE_OVER_PPI_STRAP     REG_BIT(7)
+
 #define MG_PHY_PORT_LN(ln, port, ln0p1, ln0p2, ln1p1) \
        _MMIO(_PORT((port) - PORT_C, ln0p1, ln0p2) + (ln) * ((ln1p1) - (ln0p1)))
 
@@ -2509,6 +2521,13 @@ enum i915_power_well_id {
 #define   RING_WAIT_SEMAPHORE  (1 << 10) /* gen6+ */
 
 #define RING_FORCE_TO_NONPRIV(base, i) _MMIO(((base) + 0x4D0) + (i) * 4)
+#define   RING_FORCE_TO_NONPRIV_RW             (0 << 28)    /* CFL+ & Gen11+ */
+#define   RING_FORCE_TO_NONPRIV_RD             (1 << 28)
+#define   RING_FORCE_TO_NONPRIV_WR             (2 << 28)
+#define   RING_FORCE_TO_NONPRIV_RANGE_1                (0 << 0)     /* CFL+ & Gen11+ */
+#define   RING_FORCE_TO_NONPRIV_RANGE_4                (1 << 0)
+#define   RING_FORCE_TO_NONPRIV_RANGE_16       (2 << 0)
+#define   RING_FORCE_TO_NONPRIV_RANGE_64       (3 << 0)
 #define   RING_MAX_NONPRIV_SLOTS  12
 
 #define GEN7_TLB_RD_ADDR       _MMIO(0x4700)
@@ -2695,7 +2714,7 @@ enum i915_power_well_id {
 
 #define GFX_MODE       _MMIO(0x2520)
 #define GFX_MODE_GEN7  _MMIO(0x229c)
-#define RING_MODE_GEN7(engine) _MMIO((engine)->mmio_base + 0x29c)
+#define RING_MODE_GEN7(base)   _MMIO((base) + 0x29c)
 #define   GFX_RUN_LIST_ENABLE          (1 << 15)
 #define   GFX_INTERRUPT_STEERING       (1 << 14)
 #define   GFX_TLB_INVALIDATE_EXPLICIT  (1 << 13)
@@ -2870,6 +2889,7 @@ enum i915_power_well_id {
 #define GFX_FLSH_CNTL_GEN6     _MMIO(0x101008)
 #define   GFX_FLSH_CNTL_EN     (1 << 0)
 #define ECOSKPD                _MMIO(0x21d0)
+#define   ECO_CONSTANT_BUFFER_SR_DISABLE REG_BIT(4)
 #define   ECO_GATING_CX_ONLY   (1 << 3)
 #define   ECO_FLIP_DONE                (1 << 0)
 
@@ -3158,6 +3178,7 @@ enum i915_power_well_id {
 #define ILK_DPFC_FENCE_YOFF    _MMIO(0x43218)
 #define ILK_DPFC_CHICKEN       _MMIO(0x43224)
 #define   ILK_DPFC_DISABLE_DUMMY0 (1 << 8)
+#define   ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL    (1 << 14)
 #define   ILK_DPFC_NUKE_ON_ANY_MODIFICATION    (1 << 23)
 #define ILK_FBC_RT_BASE                _MMIO(0x2128)
 #define   ILK_FBC_RT_VALID     (1 << 0)
@@ -4553,7 +4574,7 @@ enum {
 #define   HDMI_MODE_SELECT_HDMI                        (1 << 9) /* HDMI only */
 #define   HDMI_MODE_SELECT_DVI                 (0 << 9) /* HDMI only */
 #define   HDMI_COLOR_RANGE_16_235              (1 << 8) /* HDMI only */
-#define   SDVO_AUDIO_ENABLE                    (1 << 6)
+#define   HDMI_AUDIO_ENABLE                    (1 << 6) /* HDMI only */
 /* VSYNC/HSYNC bits new with 965, default is to be set */
 #define   SDVO_VSYNC_ACTIVE_HIGH               (1 << 4)
 #define   SDVO_HSYNC_ACTIVE_HIGH               (1 << 3)
@@ -4693,7 +4714,7 @@ enum {
 #define   VIDEO_DIP_FREQ_2VSYNC                (2 << 16)
 #define   VIDEO_DIP_FREQ_MASK          (3 << 16)
 /* HSW and later: */
-#define   DRM_DIP_ENABLE               (1 << 28)
+#define   VIDEO_DIP_ENABLE_DRM_GLK     (1 << 28)
 #define   PSR_VSC_BIT_7_SET            (1 << 27)
 #define   VSC_SELECT_MASK              (0x3 << 25)
 #define   VSC_SELECT_SHIFT             25
@@ -5769,6 +5790,7 @@ enum {
 #define _PIPE_MISC_B                   0x71030
 #define   PIPEMISC_YUV420_ENABLE       (1 << 27)
 #define   PIPEMISC_YUV420_MODE_FULL_BLEND (1 << 26)
+#define   PIPEMISC_HDR_MODE_PRECISION  (1 << 23) /* icl+ */
 #define   PIPEMISC_OUTPUT_COLORSPACE_YUV  (1 << 11)
 #define   PIPEMISC_DITHER_BPC_MASK     (7 << 5)
 #define   PIPEMISC_DITHER_8_BPC                (0 << 5)
@@ -6270,6 +6292,7 @@ enum {
 #define _DSPATILEOFF                           0x701A4 /* 965+ only */
 #define _DSPAOFFSET                            0x701A4 /* HSW */
 #define _DSPASURFLIVE                          0x701AC
+#define _DSPAGAMC                              0x701E0
 
 #define DSPCNTR(plane)         _MMIO_PIPE2(plane, _DSPACNTR)
 #define DSPADDR(plane)         _MMIO_PIPE2(plane, _DSPAADDR)
@@ -6281,6 +6304,7 @@ enum {
 #define DSPLINOFF(plane)       DSPADDR(plane)
 #define DSPOFFSET(plane)       _MMIO_PIPE2(plane, _DSPAOFFSET)
 #define DSPSURFLIVE(plane)     _MMIO_PIPE2(plane, _DSPASURFLIVE)
+#define DSPGAMC(plane, i)      _MMIO(_PIPE2(plane, _DSPAGAMC) + (5 - (i)) * 4) /* plane C only, 6 x u0.8 */
 
 /* CHV pipe B blender and primary plane */
 #define _CHV_BLEND_A           0x60a00
@@ -6383,6 +6407,7 @@ enum {
 #define _DVSAKEYMAXVAL         0x721a0
 #define _DVSATILEOFF           0x721a4
 #define _DVSASURFLIVE          0x721ac
+#define _DVSAGAMC_G4X          0x721e0 /* g4x */
 #define _DVSASCALE             0x72204
 #define   DVS_SCALE_ENABLE     (1 << 31)
 #define   DVS_FILTER_MASK      (3 << 29)
@@ -6391,7 +6416,8 @@ enum {
 #define   DVS_FILTER_SOFTENING (2 << 29)
 #define   DVS_VERTICAL_OFFSET_HALF (1 << 28) /* must be enabled below */
 #define   DVS_VERTICAL_OFFSET_ENABLE (1 << 27)
-#define _DVSAGAMC              0x72300
+#define _DVSAGAMC_ILK          0x72300 /* ilk/snb */
+#define _DVSAGAMCMAX_ILK       0x72340 /* ilk/snb */
 
 #define _DVSBCNTR              0x73180
 #define _DVSBLINOFF            0x73184
@@ -6404,8 +6430,10 @@ enum {
 #define _DVSBKEYMAXVAL         0x731a0
 #define _DVSBTILEOFF           0x731a4
 #define _DVSBSURFLIVE          0x731ac
+#define _DVSBGAMC_G4X          0x731e0 /* g4x */
 #define _DVSBSCALE             0x73204
-#define _DVSBGAMC              0x73300
+#define _DVSBGAMC_ILK          0x73300 /* ilk/snb */
+#define _DVSBGAMCMAX_ILK       0x73340 /* ilk/snb */
 
 #define DVSCNTR(pipe) _MMIO_PIPE(pipe, _DVSACNTR, _DVSBCNTR)
 #define DVSLINOFF(pipe) _MMIO_PIPE(pipe, _DVSALINOFF, _DVSBLINOFF)
@@ -6419,6 +6447,9 @@ enum {
 #define DVSKEYVAL(pipe) _MMIO_PIPE(pipe, _DVSAKEYVAL, _DVSBKEYVAL)
 #define DVSKEYMSK(pipe) _MMIO_PIPE(pipe, _DVSAKEYMSK, _DVSBKEYMSK)
 #define DVSSURFLIVE(pipe) _MMIO_PIPE(pipe, _DVSASURFLIVE, _DVSBSURFLIVE)
+#define DVSGAMC_G4X(pipe, i) _MMIO(_PIPE(pipe, _DVSAGAMC_G4X, _DVSBGAMC_G4X) + (5 - (i)) * 4) /* 6 x u0.8 */
+#define DVSGAMC_ILK(pipe, i) _MMIO(_PIPE(pipe, _DVSAGAMC_ILK, _DVSBGAMC_ILK) + (i) * 4) /* 16 x u0.10 */
+#define DVSGAMCMAX_ILK(pipe, i) _MMIO(_PIPE(pipe, _DVSAGAMCMAX_ILK, _DVSBGAMCMAX_ILK) + (i) * 4) /* 3 x u1.10 */
 
 #define _SPRA_CTL              0x70280
 #define   SPRITE_ENABLE                        (1 << 31)
@@ -6443,7 +6474,7 @@ enum {
 #define   SPRITE_YUV_ORDER_VYUY                (3 << 16)
 #define   SPRITE_ROTATE_180            (1 << 15)
 #define   SPRITE_TRICKLE_FEED_DISABLE  (1 << 14)
-#define   SPRITE_INT_GAMMA_ENABLE      (1 << 13)
+#define   SPRITE_INT_GAMMA_DISABLE     (1 << 13)
 #define   SPRITE_TILED                 (1 << 10)
 #define   SPRITE_DEST_KEY              (1 << 2)
 #define _SPRA_LINOFF           0x70284
@@ -6466,6 +6497,8 @@ enum {
 #define   SPRITE_VERTICAL_OFFSET_HALF  (1 << 28) /* must be enabled below */
 #define   SPRITE_VERTICAL_OFFSET_ENABLE        (1 << 27)
 #define _SPRA_GAMC             0x70400
+#define _SPRA_GAMC16           0x70440
+#define _SPRA_GAMC17           0x7044c
 
 #define _SPRB_CTL              0x71280
 #define _SPRB_LINOFF           0x71284
@@ -6481,6 +6514,8 @@ enum {
 #define _SPRB_SURFLIVE         0x712ac
 #define _SPRB_SCALE            0x71304
 #define _SPRB_GAMC             0x71400
+#define _SPRB_GAMC16           0x71440
+#define _SPRB_GAMC17           0x7144c
 
 #define SPRCTL(pipe) _MMIO_PIPE(pipe, _SPRA_CTL, _SPRB_CTL)
 #define SPRLINOFF(pipe) _MMIO_PIPE(pipe, _SPRA_LINOFF, _SPRB_LINOFF)
@@ -6494,7 +6529,9 @@ enum {
 #define SPRTILEOFF(pipe) _MMIO_PIPE(pipe, _SPRA_TILEOFF, _SPRB_TILEOFF)
 #define SPROFFSET(pipe) _MMIO_PIPE(pipe, _SPRA_OFFSET, _SPRB_OFFSET)
 #define SPRSCALE(pipe) _MMIO_PIPE(pipe, _SPRA_SCALE, _SPRB_SCALE)
-#define SPRGAMC(pipe) _MMIO_PIPE(pipe, _SPRA_GAMC, _SPRB_GAMC)
+#define SPRGAMC(pipe, i) _MMIO(_PIPE(pipe, _SPRA_GAMC, _SPRB_GAMC) + (i) * 4) /* 16 x u0.10 */
+#define SPRGAMC16(pipe, i) _MMIO(_PIPE(pipe, _SPRA_GAMC16, _SPRB_GAMC16) + (i) * 4) /* 3 x u1.10 */
+#define SPRGAMC17(pipe, i) _MMIO(_PIPE(pipe, _SPRA_GAMC17, _SPRB_GAMC17) + (i) * 4) /* 3 x u2.10 */
 #define SPRSURFLIVE(pipe) _MMIO_PIPE(pipe, _SPRA_SURFLIVE, _SPRB_SURFLIVE)
 
 #define _SPACNTR               (VLV_DISPLAY_BASE + 0x72180)
@@ -6537,7 +6574,7 @@ enum {
 #define _SPACLRC1              (VLV_DISPLAY_BASE + 0x721d4)
 #define   SP_SH_SIN(x)                 (((x) & 0x7ff) << 16) /* s4.7 */
 #define   SP_SH_COS(x)                 (x) /* u3.7 */
-#define _SPAGAMC               (VLV_DISPLAY_BASE + 0x721f4)
+#define _SPAGAMC               (VLV_DISPLAY_BASE + 0x721e0)
 
 #define _SPBCNTR               (VLV_DISPLAY_BASE + 0x72280)
 #define _SPBLINOFF             (VLV_DISPLAY_BASE + 0x72284)
@@ -6552,10 +6589,12 @@ enum {
 #define _SPBCONSTALPHA         (VLV_DISPLAY_BASE + 0x722a8)
 #define _SPBCLRC0              (VLV_DISPLAY_BASE + 0x722d0)
 #define _SPBCLRC1              (VLV_DISPLAY_BASE + 0x722d4)
-#define _SPBGAMC               (VLV_DISPLAY_BASE + 0x722f4)
+#define _SPBGAMC               (VLV_DISPLAY_BASE + 0x722e0)
 
+#define _VLV_SPR(pipe, plane_id, reg_a, reg_b) \
+       _PIPE((pipe) * 2 + (plane_id) - PLANE_SPRITE0, (reg_a), (reg_b))
 #define _MMIO_VLV_SPR(pipe, plane_id, reg_a, reg_b) \
-       _MMIO_PIPE((pipe) * 2 + (plane_id) - PLANE_SPRITE0, (reg_a), (reg_b))
+       _MMIO(_VLV_SPR((pipe), (plane_id), (reg_a), (reg_b)))
 
 #define SPCNTR(pipe, plane_id)         _MMIO_VLV_SPR((pipe), (plane_id), _SPACNTR, _SPBCNTR)
 #define SPLINOFF(pipe, plane_id)       _MMIO_VLV_SPR((pipe), (plane_id), _SPALINOFF, _SPBLINOFF)
@@ -6570,7 +6609,7 @@ enum {
 #define SPCONSTALPHA(pipe, plane_id)   _MMIO_VLV_SPR((pipe), (plane_id), _SPACONSTALPHA, _SPBCONSTALPHA)
 #define SPCLRC0(pipe, plane_id)                _MMIO_VLV_SPR((pipe), (plane_id), _SPACLRC0, _SPBCLRC0)
 #define SPCLRC1(pipe, plane_id)                _MMIO_VLV_SPR((pipe), (plane_id), _SPACLRC1, _SPBCLRC1)
-#define SPGAMC(pipe, plane_id)         _MMIO_VLV_SPR((pipe), (plane_id), _SPAGAMC, _SPBGAMC)
+#define SPGAMC(pipe, plane_id, i)      _MMIO(_VLV_SPR((pipe), (plane_id), _SPAGAMC, _SPBGAMC) + (5 - (i)) * 4) /* 6 x u0.10 */
 
 /*
  * CHV pipe B sprite CSC
@@ -7197,7 +7236,8 @@ enum {
 #define  GAMMA_MODE_MODE_8BIT  (0 << 0)
 #define  GAMMA_MODE_MODE_10BIT (1 << 0)
 #define  GAMMA_MODE_MODE_12BIT (2 << 0)
-#define  GAMMA_MODE_MODE_SPLIT (3 << 0)
+#define  GAMMA_MODE_MODE_SPLIT (3 << 0) /* ivb-bdw */
+#define  GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED (3 << 0) /* icl + */
 
 /* DMC/CSR */
 #define CSR_PROGRAM(i)         _MMIO(0x80000 + (i) * 4)
@@ -7489,6 +7529,9 @@ enum {
 #define GEN11_CRYPTO_RSVD_INTR_MASK    _MMIO(0x1900f0)
 #define GEN11_GUNIT_CSME_INTR_MASK     _MMIO(0x1900f4)
 
+#define   ENGINE1_MASK                 REG_GENMASK(31, 16)
+#define   ENGINE0_MASK                 REG_GENMASK(15, 0)
+
 #define ILK_DISPLAY_CHICKEN2   _MMIO(0x42004)
 /* Required on all Ironlake and Sandybridge according to the B-Spec. */
 #define  ILK_ELPIN_409_SELECT  (1 << 25)
@@ -7503,6 +7546,10 @@ enum {
 #define  ILK_eDP_A_DISABLE             (1 << 24)
 #define  HSW_CDCLK_LIMIT               (1 << 24)
 #define  ILK_DESKTOP                   (1 << 23)
+#define  HSW_CPU_SSC_ENABLE            (1 << 21)
+
+#define FUSE_STRAP3                    _MMIO(0x42020)
+#define  HSW_REF_CLK_SELECT            (1 << 1)
 
 #define ILK_DSPCLK_GATE_D                      _MMIO(0x42020)
 #define   ILK_VRHUNIT_CLOCK_GATE_DISABLE       (1 << 28)
@@ -8148,6 +8195,7 @@ enum {
 #define _HSW_VIDEO_DIP_SPD_DATA_A      0x602A0
 #define _HSW_VIDEO_DIP_GMP_DATA_A      0x602E0
 #define _HSW_VIDEO_DIP_VSC_DATA_A      0x60320
+#define _GLK_VIDEO_DIP_DRM_DATA_A      0x60440
 #define _HSW_VIDEO_DIP_AVI_ECC_A       0x60240
 #define _HSW_VIDEO_DIP_VS_ECC_A                0x60280
 #define _HSW_VIDEO_DIP_SPD_ECC_A       0x602C0
@@ -8161,6 +8209,7 @@ enum {
 #define _HSW_VIDEO_DIP_SPD_DATA_B      0x612A0
 #define _HSW_VIDEO_DIP_GMP_DATA_B      0x612E0
 #define _HSW_VIDEO_DIP_VSC_DATA_B      0x61320
+#define _GLK_VIDEO_DIP_DRM_DATA_B      0x61440
 #define _HSW_VIDEO_DIP_BVI_ECC_B       0x61240
 #define _HSW_VIDEO_DIP_VS_ECC_B                0x61280
 #define _HSW_VIDEO_DIP_SPD_ECC_B       0x612C0
@@ -8186,6 +8235,7 @@ enum {
 #define HSW_TVIDEO_DIP_SPD_DATA(trans, i)      _MMIO_TRANS2(trans, _HSW_VIDEO_DIP_SPD_DATA_A + (i) * 4)
 #define HSW_TVIDEO_DIP_GMP_DATA(trans, i)      _MMIO_TRANS2(trans, _HSW_VIDEO_DIP_GMP_DATA_A + (i) * 4)
 #define HSW_TVIDEO_DIP_VSC_DATA(trans, i)      _MMIO_TRANS2(trans, _HSW_VIDEO_DIP_VSC_DATA_A + (i) * 4)
+#define GLK_TVIDEO_DIP_DRM_DATA(trans, i)      _MMIO_TRANS2(trans, _GLK_VIDEO_DIP_DRM_DATA_A + (i) * 4)
 #define ICL_VIDEO_DIP_PPS_DATA(trans, i)       _MMIO_TRANS2(trans, _ICL_VIDEO_DIP_PPS_DATA_A + (i) * 4)
 #define ICL_VIDEO_DIP_PPS_ECC(trans, i)                _MMIO_TRANS2(trans, _ICL_VIDEO_DIP_PPS_ECC_A + (i) * 4)
 
@@ -8776,6 +8826,9 @@ enum {
 #define   GEN6_PCODE_WRITE_MIN_FREQ_TABLE      0x8
 #define   GEN6_PCODE_READ_MIN_FREQ_TABLE       0x9
 #define   GEN6_READ_OC_PARAMS                  0xc
+#define   ICL_PCODE_MEM_SUBSYSYSTEM_INFO       0xd
+#define     ICL_PCODE_MEM_SS_READ_GLOBAL_INFO  (0x0 << 8)
+#define     ICL_PCODE_MEM_SS_READ_QGV_POINT_INFO(point)        (((point) << 16) | (0x1 << 8))
 #define   GEN6_PCODE_READ_D_COMP               0x10
 #define   GEN6_PCODE_WRITE_D_COMP              0x11
 #define   HSW_PCODE_DE_WRITE_FREQ_REQ          0x17
@@ -8865,6 +8918,7 @@ enum {
 #define   GEN11_LSN_UNSLCVC_GAFS_HALF_SF_MAXALLOC      (1 << 7)
 
 #define GEN10_SAMPLER_MODE             _MMIO(0xE18C)
+#define   GEN11_SAMPLER_ENABLE_HEADLESS_MSG    REG_BIT(5)
 
 /* IVYBRIDGE DPF */
 #define GEN7_L3CDERRST1(slice)         _MMIO(0xB008 + (slice) * 0x200) /* L3CD Error Status 1 */
@@ -9012,32 +9066,32 @@ enum {
 /* HSW Audio */
 #define _HSW_AUD_CONFIG_A              0x65000
 #define _HSW_AUD_CONFIG_B              0x65100
-#define HSW_AUD_CFG(pipe)              _MMIO_PIPE(pipe, _HSW_AUD_CONFIG_A, _HSW_AUD_CONFIG_B)
+#define HSW_AUD_CFG(trans)             _MMIO_TRANS(trans, _HSW_AUD_CONFIG_A, _HSW_AUD_CONFIG_B)
 
 #define _HSW_AUD_MISC_CTRL_A           0x65010
 #define _HSW_AUD_MISC_CTRL_B           0x65110
-#define HSW_AUD_MISC_CTRL(pipe)                _MMIO_PIPE(pipe, _HSW_AUD_MISC_CTRL_A, _HSW_AUD_MISC_CTRL_B)
+#define HSW_AUD_MISC_CTRL(trans)       _MMIO_TRANS(trans, _HSW_AUD_MISC_CTRL_A, _HSW_AUD_MISC_CTRL_B)
 
 #define _HSW_AUD_M_CTS_ENABLE_A                0x65028
 #define _HSW_AUD_M_CTS_ENABLE_B                0x65128
-#define HSW_AUD_M_CTS_ENABLE(pipe)     _MMIO_PIPE(pipe, _HSW_AUD_M_CTS_ENABLE_A, _HSW_AUD_M_CTS_ENABLE_B)
+#define HSW_AUD_M_CTS_ENABLE(trans)    _MMIO_TRANS(trans, _HSW_AUD_M_CTS_ENABLE_A, _HSW_AUD_M_CTS_ENABLE_B)
 #define   AUD_M_CTS_M_VALUE_INDEX      (1 << 21)
 #define   AUD_M_CTS_M_PROG_ENABLE      (1 << 20)
 #define   AUD_CONFIG_M_MASK            0xfffff
 
 #define _HSW_AUD_DIP_ELD_CTRL_ST_A     0x650b4
 #define _HSW_AUD_DIP_ELD_CTRL_ST_B     0x651b4
-#define HSW_AUD_DIP_ELD_CTRL(pipe)     _MMIO_PIPE(pipe, _HSW_AUD_DIP_ELD_CTRL_ST_A, _HSW_AUD_DIP_ELD_CTRL_ST_B)
+#define HSW_AUD_DIP_ELD_CTRL(trans)    _MMIO_TRANS(trans, _HSW_AUD_DIP_ELD_CTRL_ST_A, _HSW_AUD_DIP_ELD_CTRL_ST_B)
 
 /* Audio Digital Converter */
 #define _HSW_AUD_DIG_CNVT_1            0x65080
 #define _HSW_AUD_DIG_CNVT_2            0x65180
-#define AUD_DIG_CNVT(pipe)             _MMIO_PIPE(pipe, _HSW_AUD_DIG_CNVT_1, _HSW_AUD_DIG_CNVT_2)
+#define AUD_DIG_CNVT(trans)            _MMIO_TRANS(trans, _HSW_AUD_DIG_CNVT_1, _HSW_AUD_DIG_CNVT_2)
 #define DIP_PORT_SEL_MASK              0x3
 
 #define _HSW_AUD_EDID_DATA_A           0x65050
 #define _HSW_AUD_EDID_DATA_B           0x65150
-#define HSW_AUD_EDID_DATA(pipe)                _MMIO_PIPE(pipe, _HSW_AUD_EDID_DATA_A, _HSW_AUD_EDID_DATA_B)
+#define HSW_AUD_EDID_DATA(trans)       _MMIO_TRANS(trans, _HSW_AUD_EDID_DATA_A, _HSW_AUD_EDID_DATA_B)
 
 #define HSW_AUD_PIPE_CONV_CFG          _MMIO(0x6507c)
 #define HSW_AUD_PIN_ELD_CP_VLD         _MMIO(0x650c0)
@@ -9449,24 +9503,28 @@ enum skl_power_gate {
 /* SPLL */
 #define SPLL_CTL                       _MMIO(0x46020)
 #define  SPLL_PLL_ENABLE               (1 << 31)
-#define  SPLL_PLL_SSC                  (1 << 28)
-#define  SPLL_PLL_NON_SSC              (2 << 28)
-#define  SPLL_PLL_LCPLL                        (3 << 28)
-#define  SPLL_PLL_REF_MASK             (3 << 28)
-#define  SPLL_PLL_FREQ_810MHz          (0 << 26)
-#define  SPLL_PLL_FREQ_1350MHz         (1 << 26)
-#define  SPLL_PLL_FREQ_2700MHz         (2 << 26)
-#define  SPLL_PLL_FREQ_MASK            (3 << 26)
+#define  SPLL_REF_BCLK                 (0 << 28)
+#define  SPLL_REF_MUXED_SSC            (1 << 28) /* CPU SSC if fused enabled, PCH SSC otherwise */
+#define  SPLL_REF_NON_SSC_HSW          (2 << 28)
+#define  SPLL_REF_PCH_SSC_BDW          (2 << 28)
+#define  SPLL_REF_LCPLL                        (3 << 28)
+#define  SPLL_REF_MASK                 (3 << 28)
+#define  SPLL_FREQ_810MHz              (0 << 26)
+#define  SPLL_FREQ_1350MHz             (1 << 26)
+#define  SPLL_FREQ_2700MHz             (2 << 26)
+#define  SPLL_FREQ_MASK                        (3 << 26)
 
 /* WRPLL */
 #define _WRPLL_CTL1                    0x46040
 #define _WRPLL_CTL2                    0x46060
 #define WRPLL_CTL(pll)                 _MMIO_PIPE(pll, _WRPLL_CTL1, _WRPLL_CTL2)
 #define  WRPLL_PLL_ENABLE              (1 << 31)
-#define  WRPLL_PLL_SSC                 (1 << 28)
-#define  WRPLL_PLL_NON_SSC             (2 << 28)
-#define  WRPLL_PLL_LCPLL               (3 << 28)
-#define  WRPLL_PLL_REF_MASK            (3 << 28)
+#define  WRPLL_REF_BCLK                        (0 << 28)
+#define  WRPLL_REF_PCH_SSC             (1 << 28)
+#define  WRPLL_REF_MUXED_SSC_BDW       (2 << 28) /* CPU SSC if fused enabled, PCH SSC otherwise */
+#define  WRPLL_REF_SPECIAL_HSW         (2 << 28) /* muxed SSC (ULT), non-SSC (non-ULT) */
+#define  WRPLL_REF_LCPLL               (3 << 28)
+#define  WRPLL_REF_MASK                        (3 << 28)
 /* WRPLL divider programming */
 #define  WRPLL_DIVIDER_REFERENCE(x)    ((x) << 0)
 #define  WRPLL_DIVIDER_REF_MASK                (0xff)
@@ -9526,11 +9584,16 @@ enum skl_power_gate {
 #define  TRANS_MSA_12_BPC              (3 << 5)
 #define  TRANS_MSA_16_BPC              (4 << 5)
 #define  TRANS_MSA_CEA_RANGE           (1 << 3)
+#define  TRANS_MSA_USE_VSC_SDP         (1 << 14)
 
 /* LCPLL Control */
 #define LCPLL_CTL                      _MMIO(0x130040)
 #define  LCPLL_PLL_DISABLE             (1 << 31)
 #define  LCPLL_PLL_LOCK                        (1 << 30)
+#define  LCPLL_REF_NON_SSC             (0 << 28)
+#define  LCPLL_REF_BCLK                        (2 << 28)
+#define  LCPLL_REF_PCH_SSC             (3 << 28)
+#define  LCPLL_REF_MASK                        (3 << 28)
 #define  LCPLL_CLK_FREQ_MASK           (3 << 26)
 #define  LCPLL_CLK_FREQ_450            (0 << 26)
 #define  LCPLL_CLK_FREQ_54O_BDW                (1 << 26)
@@ -10147,6 +10210,22 @@ enum skl_power_gate {
 #define PRE_CSC_GAMC_INDEX(pipe)       _MMIO_PIPE(pipe, _PRE_CSC_GAMC_INDEX_A, _PRE_CSC_GAMC_INDEX_B)
 #define PRE_CSC_GAMC_DATA(pipe)                _MMIO_PIPE(pipe, _PRE_CSC_GAMC_DATA_A, _PRE_CSC_GAMC_DATA_B)
 
+/* ICL Multi segmented gamma */
+#define _PAL_PREC_MULTI_SEG_INDEX_A    0x4A408
+#define _PAL_PREC_MULTI_SEG_INDEX_B    0x4AC08
+#define  PAL_PREC_MULTI_SEGMENT_AUTO_INCREMENT         REG_BIT(15)
+#define  PAL_PREC_MULTI_SEGMENT_INDEX_VALUE_MASK       REG_GENMASK(4, 0)
+
+#define _PAL_PREC_MULTI_SEG_DATA_A     0x4A40C
+#define _PAL_PREC_MULTI_SEG_DATA_B     0x4AC0C
+
+#define PREC_PAL_MULTI_SEG_INDEX(pipe) _MMIO_PIPE(pipe, \
+                                       _PAL_PREC_MULTI_SEG_INDEX_A, \
+                                       _PAL_PREC_MULTI_SEG_INDEX_B)
+#define PREC_PAL_MULTI_SEG_DATA(pipe)  _MMIO_PIPE(pipe, \
+                                       _PAL_PREC_MULTI_SEG_DATA_A, \
+                                       _PAL_PREC_MULTI_SEG_DATA_B)
+
 /* pipe CSC & degamma/gamma LUTs on CHV */
 #define _CGM_PIPE_A_CSC_COEFF01        (VLV_DISPLAY_BASE + 0x67900)
 #define _CGM_PIPE_A_CSC_COEFF23        (VLV_DISPLAY_BASE + 0x67904)
@@ -11091,6 +11170,7 @@ enum skl_power_gate {
 #define _ICL_PHY_MISC_B                0x64C04
 #define ICL_PHY_MISC(port)     _MMIO_PORT(port, _ICL_PHY_MISC_A, \
                                                 _ICL_PHY_MISC_B)
+#define  ICL_PHY_MISC_MUX_DDID                 (1 << 28)
 #define  ICL_PHY_MISC_DE_IO_COMP_PWR_DOWN      (1 << 23)
 
 /* Icelake Display Stream Compression Registers */