]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - drivers/gpu/drm/i915/i915_reg.h
drm/i915: print Gen5+ CPU/PCH poison interrupts
[linux-imx.git] / drivers / gpu / drm / i915 / i915_reg.h
index 17cb78f5760a7d6f100aca443b5bdecd3ced41b6..9093d6669560a1d601d2c6a3b3fe422701dcaf56 100644 (file)
@@ -91,6 +91,7 @@
 #define  GRDOM_FULL    (0<<2)
 #define  GRDOM_RENDER  (1<<2)
 #define  GRDOM_MEDIA   (3<<2)
+#define  GRDOM_MASK    (3<<2)
 #define  GRDOM_RESET_ENABLE (1<<0)
 
 #define GEN6_MBCUNIT_SNPCR     0x900c /* for LLC config */
 
 #define GAM_ECOCHK                     0x4090
 #define   ECOCHK_SNB_BIT               (1<<10)
+#define   HSW_ECOCHK_ARB_PRIO_SOL      (1<<6)
 #define   ECOCHK_PPGTT_CACHE64B                (0x3<<3)
 #define   ECOCHK_PPGTT_CACHE4B         (0x0<<3)
+#define   ECOCHK_PPGTT_GFDT_IVB                (0x1<<4)
+#define   ECOCHK_PPGTT_LLC_IVB         (0x1<<3)
+#define   ECOCHK_PPGTT_UC_HSW          (0x1<<3)
+#define   ECOCHK_PPGTT_WT_HSW          (0x2<<3)
+#define   ECOCHK_PPGTT_WB_HSW          (0x3<<3)
 
 #define GAC_ECO_BITS                   0x14090
+#define   ECOBITS_SNB_BIT              (1<<13)
 #define   ECOBITS_PPGTT_CACHE64B       (3<<8)
 #define   ECOBITS_PPGTT_CACHE4B                (0<<8)
 
  *  0x8100: fast clock controls
  *
  * DPIO is VLV only.
+ *
+ * Note: digital port B is DDI0, digital pot C is DDI1
  */
 #define DPIO_PKT                       (VLV_DISPLAY_BASE + 0x2100)
 #define  DPIO_RID                      (0<<24)
 #define  DPIO_SFR_BYPASS               (1<<1)
 #define  DPIO_RESET                    (1<<0)
 
+#define _DPIO_TX3_SWING_CTL4_A         0x690
+#define _DPIO_TX3_SWING_CTL4_B         0x2a90
+#define DPIO_TX3_SWING_CTL4(pipe) _PIPE(pipe, _DPIO_TX_SWING_CTL4_A, \
+                                       _DPIO_TX3_SWING_CTL4_B)
+
+/*
+ * Per pipe/PLL DPIO regs
+ */
 #define _DPIO_DIV_A                    0x800c
 #define   DPIO_POST_DIV_SHIFT          (28) /* 3 bits */
+#define   DPIO_POST_DIV_DAC            0
+#define   DPIO_POST_DIV_HDMIDP         1 /* DAC 225-400M rate */
+#define   DPIO_POST_DIV_LVDS1          2
+#define   DPIO_POST_DIV_LVDS2          3
 #define   DPIO_K_SHIFT                 (24) /* 4 bits */
 #define   DPIO_P1_SHIFT                        (21) /* 3 bits */
 #define   DPIO_P2_SHIFT                        (16) /* 5 bits */
 #define _DPIO_CORE_CLK_B               0x803c
 #define DPIO_CORE_CLK(pipe) _PIPE(pipe, _DPIO_CORE_CLK_A, _DPIO_CORE_CLK_B)
 
+#define _DPIO_IREF_CTL_A               0x8040
+#define _DPIO_IREF_CTL_B               0x8060
+#define DPIO_IREF_CTL(pipe) _PIPE(pipe, _DPIO_IREF_CTL_A, _DPIO_IREF_CTL_B)
+
+#define DPIO_IREF_BCAST                        0xc044
+#define _DPIO_IREF_A                   0x8044
+#define _DPIO_IREF_B                   0x8064
+#define DPIO_IREF(pipe) _PIPE(pipe, _DPIO_IREF_A, _DPIO_IREF_B)
+
+#define _DPIO_PLL_CML_A                        0x804c
+#define _DPIO_PLL_CML_B                        0x806c
+#define DPIO_PLL_CML(pipe) _PIPE(pipe, _DPIO_PLL_CML_A, _DPIO_PLL_CML_B)
+
 #define _DPIO_LFP_COEFF_A              0x8048
 #define _DPIO_LFP_COEFF_B              0x8068
 #define DPIO_LFP_COEFF(pipe) _PIPE(pipe, _DPIO_LFP_COEFF_A, _DPIO_LFP_COEFF_B)
 
+#define DPIO_CALIBRATION               0x80ac
+
 #define DPIO_FASTCLK_DISABLE           0x8100
 
-#define DPIO_DATA_CHANNEL1             0x8220
-#define DPIO_DATA_CHANNEL2             0x8420
+/*
+ * Per DDI channel DPIO regs
+ */
+
+#define _DPIO_PCS_TX_0                 0x8200
+#define _DPIO_PCS_TX_1                 0x8400
+#define   DPIO_PCS_TX_LANE2_RESET      (1<<16)
+#define   DPIO_PCS_TX_LANE1_RESET      (1<<7)
+#define DPIO_PCS_TX(port) _PORT(port, _DPIO_PCS_TX_0, _DPIO_PCS_TX_1)
+
+#define _DPIO_PCS_CLK_0                        0x8204
+#define _DPIO_PCS_CLK_1                        0x8404
+#define   DPIO_PCS_CLK_CRI_RXEB_EIOS_EN        (1<<22)
+#define   DPIO_PCS_CLK_CRI_RXDIGFILTSG_EN (1<<21)
+#define   DPIO_PCS_CLK_DATAWIDTH_SHIFT (6)
+#define   DPIO_PCS_CLK_SOFT_RESET      (1<<5)
+#define DPIO_PCS_CLK(port) _PORT(port, _DPIO_PCS_CLK_0, _DPIO_PCS_CLK_1)
+
+#define _DPIO_PCS_CTL_OVR1_A           0x8224
+#define _DPIO_PCS_CTL_OVR1_B           0x8424
+#define DPIO_PCS_CTL_OVER1(port) _PORT(port, _DPIO_PCS_CTL_OVR1_A, \
+                                      _DPIO_PCS_CTL_OVR1_B)
+
+#define _DPIO_PCS_STAGGER0_A           0x822c
+#define _DPIO_PCS_STAGGER0_B           0x842c
+#define DPIO_PCS_STAGGER0(port) _PORT(port, _DPIO_PCS_STAGGER0_A, \
+                                     _DPIO_PCS_STAGGER0_B)
+
+#define _DPIO_PCS_STAGGER1_A           0x8230
+#define _DPIO_PCS_STAGGER1_B           0x8430
+#define DPIO_PCS_STAGGER1(port) _PORT(port, _DPIO_PCS_STAGGER1_A, \
+                                     _DPIO_PCS_STAGGER1_B)
+
+#define _DPIO_PCS_CLOCKBUF0_A          0x8238
+#define _DPIO_PCS_CLOCKBUF0_B          0x8438
+#define DPIO_PCS_CLOCKBUF0(port) _PORT(port, _DPIO_PCS_CLOCKBUF0_A, \
+                                      _DPIO_PCS_CLOCKBUF0_B)
+
+#define _DPIO_PCS_CLOCKBUF8_A          0x825c
+#define _DPIO_PCS_CLOCKBUF8_B          0x845c
+#define DPIO_PCS_CLOCKBUF8(port) _PORT(port, _DPIO_PCS_CLOCKBUF8_A, \
+                                      _DPIO_PCS_CLOCKBUF8_B)
+
+#define _DPIO_TX_SWING_CTL2_A          0x8288
+#define _DPIO_TX_SWING_CTL2_B          0x8488
+#define DPIO_TX_SWING_CTL2(port) _PORT(port, _DPIO_TX_SWING_CTL2_A, \
+                                      _DPIO_TX_SWING_CTL2_B)
+
+#define _DPIO_TX_SWING_CTL3_A          0x828c
+#define _DPIO_TX_SWING_CTL3_B          0x848c
+#define DPIO_TX_SWING_CTL3(port) _PORT(port, _DPIO_TX_SWING_CTL3_A, \
+                                      _DPIO_TX_SWING_CTL3_B)
+
+#define _DPIO_TX_SWING_CTL4_A          0x8290
+#define _DPIO_TX_SWING_CTL4_B          0x8490
+#define DPIO_TX_SWING_CTL4(port) _PORT(port, _DPIO_TX_SWING_CTL4_A, \
+                                      _DPIO_TX_SWING_CTL4_B)
+
+#define _DPIO_TX_OCALINIT_0            0x8294
+#define _DPIO_TX_OCALINIT_1            0x8494
+#define   DPIO_TX_OCALINIT_EN          (1<<31)
+#define DPIO_TX_OCALINIT(port) _PORT(port, _DPIO_TX_OCALINIT_0, \
+                                    _DPIO_TX_OCALINIT_1)
+
+#define _DPIO_TX_CTL_0                 0x82ac
+#define _DPIO_TX_CTL_1                 0x84ac
+#define DPIO_TX_CTL(port) _PORT(port, _DPIO_TX_CTL_0, _DPIO_TX_CTL_1)
+
+#define _DPIO_TX_LANE_0                        0x82b8
+#define _DPIO_TX_LANE_1                        0x84b8
+#define DPIO_TX_LANE(port) _PORT(port, _DPIO_TX_LANE_0, _DPIO_TX_LANE_1)
+
+#define _DPIO_DATA_CHANNEL1            0x8220
+#define _DPIO_DATA_CHANNEL2            0x8420
+#define DPIO_DATA_CHANNEL(port) _PORT(port, _DPIO_DATA_CHANNEL1, _DPIO_DATA_CHANNEL2)
+
+#define _DPIO_PORT0_PCS0               0x0220
+#define _DPIO_PORT0_PCS1               0x0420
+#define _DPIO_PORT1_PCS2               0x2620
+#define _DPIO_PORT1_PCS3               0x2820
+#define DPIO_DATA_LANE_A(port) _PORT(port, _DPIO_PORT0_PCS0, _DPIO_PORT1_PCS2)
+#define DPIO_DATA_LANE_B(port) _PORT(port, _DPIO_PORT0_PCS1, _DPIO_PORT1_PCS3)
+#define DPIO_DATA_CHANNEL1              0x8220
+#define DPIO_DATA_CHANNEL2              0x8420
 
 /*
  * Fence registers
 
 #define FENCE_REG_SANDYBRIDGE_0                0x100000
 #define   SANDYBRIDGE_FENCE_PITCH_SHIFT        32
+#define   GEN7_FENCE_MAX_PITCH_VAL     0x0800
 
 /* control register for cpu gtt access */
 #define TILECTL                                0x101000
 
 #define ERROR_GEN6     0x040a0
 #define GEN7_ERR_INT   0x44040
-#define   ERR_INT_MMIO_UNCLAIMED (1<<13)
+#define   ERR_INT_POISON               (1<<31)
+#define   ERR_INT_MMIO_UNCLAIMED       (1<<13)
+#define   ERR_INT_FIFO_UNDERRUN_C      (1<<6)
+#define   ERR_INT_FIFO_UNDERRUN_B      (1<<3)
+#define   ERR_INT_FIFO_UNDERRUN_A      (1<<0)
 
 #define FPGA_DBG               0x42300
 #define   FPGA_DBG_RM_NOCLAIM  (1<<31)
 #define   DPLL_FPA01_P1_POST_DIV_MASK  0x00ff0000 /* i915 */
 #define   DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW 0x00ff8000 /* Pineview */
 #define   DPLL_LOCK_VLV                        (1<<15)
+#define   DPLL_INTEGRATED_CRI_CLK_VLV  (1<<14)
 #define   DPLL_INTEGRATED_CLOCK_VLV    (1<<13)
+#define   DPLL_PORTC_READY_MASK                (0xf << 4)
+#define   DPLL_PORTB_READY_MASK                (0xf)
 
 #define   DPLL_FPA01_P1_POST_DIV_MASK_I830     0x001f0000
 /*
 
 #define MCHBAR_MIRROR_BASE_SNB 0x140000
 
+/* Memory controller frequency in MCHBAR for Haswell (possible SNB+) */
+#define DCLK 0x5e04
+
 /** 915-945 and GM965 MCH register controlling DRAM channel access */
 #define DCC                    0x10200
 #define DCC_ADDRESSING_MODE_SINGLE_CHANNEL             (0 << 0)
 #define   SDVOC_HOTPLUG_INT_EN                 (1 << 25)
 #define   TV_HOTPLUG_INT_EN                    (1 << 18)
 #define   CRT_HOTPLUG_INT_EN                   (1 << 9)
+#define HOTPLUG_INT_EN_MASK                    (PORTB_HOTPLUG_INT_EN | \
+                                                PORTC_HOTPLUG_INT_EN | \
+                                                PORTD_HOTPLUG_INT_EN | \
+                                                SDVOC_HOTPLUG_INT_EN | \
+                                                SDVOB_HOTPLUG_INT_EN | \
+                                                CRT_HOTPLUG_INT_EN)
 #define   CRT_HOTPLUG_FORCE_DETECT             (1 << 3)
 #define CRT_HOTPLUG_ACTIVATION_PERIOD_32       (0 << 8)
 /* must use period 64 on GM45 according to docs */
 #define   SDVOB_HOTPLUG_INT_STATUS_I965                (3 << 2)
 #define   SDVOC_HOTPLUG_INT_STATUS_I915                (1 << 7)
 #define   SDVOB_HOTPLUG_INT_STATUS_I915                (1 << 6)
+#define   HOTPLUG_INT_STATUS_G4X               (CRT_HOTPLUG_INT_STATUS | \
+                                                SDVOB_HOTPLUG_INT_STATUS_G4X | \
+                                                SDVOC_HOTPLUG_INT_STATUS_G4X | \
+                                                PORTB_HOTPLUG_INT_STATUS | \
+                                                PORTC_HOTPLUG_INT_STATUS | \
+                                                PORTD_HOTPLUG_INT_STATUS)
+
+#define HOTPLUG_INT_STATUS_I965                        (CRT_HOTPLUG_INT_STATUS | \
+                                                SDVOB_HOTPLUG_INT_STATUS_I965 | \
+                                                SDVOC_HOTPLUG_INT_STATUS_I965 | \
+                                                PORTB_HOTPLUG_INT_STATUS | \
+                                                PORTC_HOTPLUG_INT_STATUS | \
+                                                PORTD_HOTPLUG_INT_STATUS)
+
+#define HOTPLUG_INT_STATUS_I915                        (CRT_HOTPLUG_INT_STATUS | \
+                                                SDVOB_HOTPLUG_INT_STATUS_I915 | \
+                                                SDVOC_HOTPLUG_INT_STATUS_I915 | \
+                                                PORTB_HOTPLUG_INT_STATUS | \
+                                                PORTC_HOTPLUG_INT_STATUS | \
+                                                PORTD_HOTPLUG_INT_STATUS)
 
 /* SDVO and HDMI port control.
  * The same register may be used for SDVO or HDMI */
 #define PFIT_AUTO_RATIOS (dev_priv->info->display_mmio_offset + 0x61238)
 
 /* Backlight control */
-#define BLC_PWM_CTL2           0x61250 /* 965+ only */
+#define BLC_PWM_CTL2   (dev_priv->info->display_mmio_offset + 0x61250) /* 965+ only */
 #define   BLM_PWM_ENABLE               (1 << 31)
 #define   BLM_COMBINATION_MODE         (1 << 30) /* gen4 only */
 #define   BLM_PIPE_SELECT              (1 << 29)
 #define   BLM_PHASE_IN_COUNT_MASK      (0xff << 8)
 #define   BLM_PHASE_IN_INCR_SHIFT      (0)
 #define   BLM_PHASE_IN_INCR_MASK       (0xff << 0)
-#define BLC_PWM_CTL            0x61254
+#define BLC_PWM_CTL    (dev_priv->info->display_mmio_offset + 0x61254)
 /*
  * This is the most significant 15 bits of the number of backlight cycles in a
  * complete cycle of the modulated backlight control.
 #define   BACKLIGHT_DUTY_CYCLE_MASK_PNV                (0xfffe)
 #define   BLM_POLARITY_PNV                     (1 << 0) /* pnv only */
 
-#define BLC_HIST_CTL           0x61260
+#define BLC_HIST_CTL   (dev_priv->info->display_mmio_offset + 0x61260)
 
 /* New registers for PCH-split platforms. Safe where new bits show up, the
  * register layout machtes with gen4 BLC_PWM_CTL[12]. */
 #define   DSPFW_HPLL_CURSOR_SHIFT      16
 #define   DSPFW_HPLL_CURSOR_MASK       (0x3f<<16)
 #define   DSPFW_HPLL_SR_MASK           (0x1ff)
+#define DSPFW4                 (dev_priv->info->display_mmio_offset + 0x70070)
+#define DSPFW7                 (dev_priv->info->display_mmio_offset + 0x7007c)
 
 /* drain latency register values*/
 #define DRAIN_LATENCY_PRECISION_32     32
 #define SPRGAMC(pipe) _PIPE(pipe, _SPRA_GAMC, _SPRB_GAMC)
 #define SPRSURFLIVE(pipe) _PIPE(pipe, _SPRA_SURFLIVE, _SPRB_SURFLIVE)
 
+#define _SPACNTR               0x72180
+#define   SP_ENABLE                    (1<<31)
+#define   SP_GEAMMA_ENABLE             (1<<30)
+#define   SP_PIXFORMAT_MASK            (0xf<<26)
+#define   SP_FORMAT_YUV422             (0<<26)
+#define   SP_FORMAT_BGR565             (5<<26)
+#define   SP_FORMAT_BGRX8888           (6<<26)
+#define   SP_FORMAT_BGRA8888           (7<<26)
+#define   SP_FORMAT_RGBX1010102                (8<<26)
+#define   SP_FORMAT_RGBA1010102                (9<<26)
+#define   SP_FORMAT_RGBX8888           (0xe<<26)
+#define   SP_FORMAT_RGBA8888           (0xf<<26)
+#define   SP_SOURCE_KEY                        (1<<22)
+#define   SP_YUV_BYTE_ORDER_MASK       (3<<16)
+#define   SP_YUV_ORDER_YUYV            (0<<16)
+#define   SP_YUV_ORDER_UYVY            (1<<16)
+#define   SP_YUV_ORDER_YVYU            (2<<16)
+#define   SP_YUV_ORDER_VYUY            (3<<16)
+#define   SP_TILED                     (1<<10)
+#define _SPALINOFF             0x72184
+#define _SPASTRIDE             0x72188
+#define _SPAPOS                        0x7218c
+#define _SPASIZE               0x72190
+#define _SPAKEYMINVAL          0x72194
+#define _SPAKEYMSK             0x72198
+#define _SPASURF               0x7219c
+#define _SPAKEYMAXVAL          0x721a0
+#define _SPATILEOFF            0x721a4
+#define _SPACONSTALPHA         0x721a8
+#define _SPAGAMC               0x721f4
+
+#define _SPBCNTR               0x72280
+#define _SPBLINOFF             0x72284
+#define _SPBSTRIDE             0x72288
+#define _SPBPOS                        0x7228c
+#define _SPBSIZE               0x72290
+#define _SPBKEYMINVAL          0x72294
+#define _SPBKEYMSK             0x72298
+#define _SPBSURF               0x7229c
+#define _SPBKEYMAXVAL          0x722a0
+#define _SPBTILEOFF            0x722a4
+#define _SPBCONSTALPHA         0x722a8
+#define _SPBGAMC               0x722f4
+
+#define SPCNTR(pipe, plane) _PIPE(pipe * 2 + plane, _SPACNTR, _SPBCNTR)
+#define SPLINOFF(pipe, plane) _PIPE(pipe * 2 + plane, _SPALINOFF, _SPBLINOFF)
+#define SPSTRIDE(pipe, plane) _PIPE(pipe * 2 + plane, _SPASTRIDE, _SPBSTRIDE)
+#define SPPOS(pipe, plane) _PIPE(pipe * 2 + plane, _SPAPOS, _SPBPOS)
+#define SPSIZE(pipe, plane) _PIPE(pipe * 2 + plane, _SPASIZE, _SPBSIZE)
+#define SPKEYMINVAL(pipe, plane) _PIPE(pipe * 2 + plane, _SPAKEYMINVAL, _SPBKEYMINVAL)
+#define SPKEYMSK(pipe, plane) _PIPE(pipe * 2 + plane, _SPAKEYMSK, _SPBKEYMSK)
+#define SPSURF(pipe, plane) _PIPE(pipe * 2 + plane, _SPASURF, _SPBSURF)
+#define SPKEYMAXVAL(pipe, plane) _PIPE(pipe * 2 + plane, _SPAKEYMAXVAL, _SPBKEYMAXVAL)
+#define SPTILEOFF(pipe, plane) _PIPE(pipe * 2 + plane, _SPATILEOFF, _SPBTILEOFF)
+#define SPCONSTALPHA(pipe, plane) _PIPE(pipe * 2 + plane, _SPACONSTALPHA, _SPBCONSTALPHA)
+#define SPGAMC(pipe, plane) _PIPE(pipe * 2 + plane, _SPAGAMC, _SPBGAMC)
+
 /* VBIOS regs */
 #define VGACNTRL               0x71400
 # define VGA_DISP_DISABLE                      (1 << 31)
 #define DE_PIPEA_FIFO_UNDERRUN  (1 << 0)
 
 /* More Ivybridge lolz */
-#define DE_ERR_DEBUG_IVB               (1<<30)
+#define DE_ERR_INT_IVB                 (1<<30)
 #define DE_GSE_IVB                     (1<<29)
 #define DE_PCH_EVENT_IVB               (1<<28)
 #define DE_DP_A_HOTPLUG_IVB            (1<<27)
 #define DISP_ARB_CTL   0x45000
 #define  DISP_TILE_SURFACE_SWIZZLING   (1<<13)
 #define  DISP_FBC_WM_DIS               (1<<15)
+#define GEN7_MSG_CTL   0x45010
+#define  WAIT_FOR_PCH_RESET_ACK                (1<<1)
+#define  WAIT_FOR_PCH_FLR_ACK          (1<<0)
 
 /* GEN7 chicken */
 #define GEN7_COMMON_SLICE_CHICKEN1             0x7010
 #define SDE_PORTC_HOTPLUG       (1 << 9)
 #define SDE_PORTB_HOTPLUG       (1 << 8)
 #define SDE_SDVOB_HOTPLUG       (1 << 6)
-#define SDE_HOTPLUG_MASK       (0xf << 8)
+#define SDE_HOTPLUG_MASK        (SDE_CRT_HOTPLUG | \
+                                SDE_SDVOB_HOTPLUG |    \
+                                SDE_PORTB_HOTPLUG |    \
+                                SDE_PORTC_HOTPLUG |    \
+                                SDE_PORTD_HOTPLUG)
 #define SDE_TRANSB_CRC_DONE    (1 << 5)
 #define SDE_TRANSB_CRC_ERR     (1 << 4)
 #define SDE_TRANSB_FIFO_UNDER  (1 << 3)
 #define SDE_PORTC_HOTPLUG_CPT  (1 << 22)
 #define SDE_PORTB_HOTPLUG_CPT  (1 << 21)
 #define SDE_CRT_HOTPLUG_CPT    (1 << 19)
+#define SDE_SDVOB_HOTPLUG_CPT  (1 << 18)
 #define SDE_HOTPLUG_MASK_CPT   (SDE_CRT_HOTPLUG_CPT |          \
+                                SDE_SDVOB_HOTPLUG_CPT |        \
                                 SDE_PORTD_HOTPLUG_CPT |        \
                                 SDE_PORTC_HOTPLUG_CPT |        \
                                 SDE_PORTB_HOTPLUG_CPT)
 #define SDE_GMBUS_CPT          (1 << 17)
+#define SDE_ERROR_CPT          (1 << 16)
 #define SDE_AUDIO_CP_REQ_C_CPT (1 << 10)
 #define SDE_AUDIO_CP_CHG_C_CPT (1 << 9)
 #define SDE_FDI_RXC_CPT                (1 << 8)
 #define SDEIIR  0xc4008
 #define SDEIER  0xc400c
 
+#define SERR_INT                       0xc4040
+#define  SERR_INT_POISON               (1<<31)
+#define  SERR_INT_TRANS_C_FIFO_UNDERRUN        (1<<6)
+#define  SERR_INT_TRANS_B_FIFO_UNDERRUN        (1<<3)
+#define  SERR_INT_TRANS_A_FIFO_UNDERRUN        (1<<0)
+
 /* digital port hotplug */
 #define PCH_PORT_HOTPLUG        0xc4030                /* SHOTPLUG_CTL */
 #define PORTD_HOTPLUG_ENABLE            (1 << 20)
 #define _TRANSA_CHICKEN2        0xf0064
 #define _TRANSB_CHICKEN2        0xf1064
 #define TRANS_CHICKEN2(pipe) _PIPE(pipe, _TRANSA_CHICKEN2, _TRANSB_CHICKEN2)
-#define  TRANS_CHICKEN2_TIMING_OVERRIDE                (1<<31)
-
+#define  TRANS_CHICKEN2_TIMING_OVERRIDE                        (1<<31)
+#define  TRANS_CHICKEN2_FDI_POLARITY_REVERSED          (1<<29)
+#define  TRANS_CHICKEN2_FRAME_START_DELAY_MASK         (3<<27)
+#define  TRANS_CHICKEN2_DISABLE_DEEP_COLOR_COUNTER     (1<<26)
+#define  TRANS_CHICKEN2_DISABLE_DEEP_COLOR_MODESWITCH  (1<<25)
 
 #define SOUTH_CHICKEN1         0xc2000
 #define  FDIA_PHASE_SYNC_SHIFT_OVR     19
 #define PIPEB_PP_OFF_DELAYS     (VLV_DISPLAY_BASE + 0x6130c)
 #define PIPEB_PP_DIVISOR        (VLV_DISPLAY_BASE + 0x61310)
 
+#define VLV_PIPE_PP_STATUS(pipe) _PIPE(pipe, PIPEA_PP_STATUS, PIPEB_PP_STATUS)
+#define VLV_PIPE_PP_CONTROL(pipe) _PIPE(pipe, PIPEA_PP_CONTROL, PIPEB_PP_CONTROL)
+#define VLV_PIPE_PP_ON_DELAYS(pipe) \
+               _PIPE(pipe, PIPEA_PP_ON_DELAYS, PIPEB_PP_ON_DELAYS)
+#define VLV_PIPE_PP_OFF_DELAYS(pipe) \
+               _PIPE(pipe, PIPEA_PP_OFF_DELAYS, PIPEB_PP_OFF_DELAYS)
+#define VLV_PIPE_PP_DIVISOR(pipe) \
+               _PIPE(pipe, PIPEA_PP_DIVISOR, PIPEB_PP_DIVISOR)
+
 #define PCH_PP_STATUS          0xc7200
 #define PCH_PP_CONTROL         0xc7204
 #define  PANEL_UNLOCK_REGS     (0xabcd << 16)
 #define GEN6_RPNSWREQ                          0xA008
 #define   GEN6_TURBO_DISABLE                   (1<<31)
 #define   GEN6_FREQUENCY(x)                    ((x)<<25)
+#define   HSW_FREQUENCY(x)                     ((x)<<24)
 #define   GEN6_OFFSET(x)                       ((x)<<19)
 #define   GEN6_AGGRESSIVE_TURBO                        (0<<15)
 #define GEN6_RC_VIDEO_FREQ                     0xA00C
 #define   GEN6_RC_CTL_RC6_ENABLE               (1<<18)
 #define   GEN6_RC_CTL_RC1e_ENABLE              (1<<20)
 #define   GEN6_RC_CTL_RC7_ENABLE               (1<<22)
+#define   GEN7_RC_CTL_TO_MODE                  (1<<28)
 #define   GEN6_RC_CTL_EI_MODE(x)               ((x)<<27)
 #define   GEN6_RC_CTL_HW_ENABLE                        (1<<31)
 #define GEN6_RP_DOWN_TIMEOUT                   0xA010
 #define   GEN6_DECODE_RC6_VID(vids)            (((vids) * 5) + 245)
 #define GEN6_PCODE_DATA                                0x138128
 #define   GEN6_PCODE_FREQ_IA_RATIO_SHIFT       8
+#define   GEN6_PCODE_FREQ_RING_RATIO_SHIFT     16
+
+#define VLV_IOSF_DOORBELL_REQ                  0x182100
+#define   IOSF_DEVFN_SHIFT                     24
+#define   IOSF_OPCODE_SHIFT                    16
+#define   IOSF_PORT_SHIFT                      8
+#define   IOSF_BYTE_ENABLES_SHIFT              4
+#define   IOSF_BAR_SHIFT                       1
+#define   IOSF_SB_BUSY                         (1<<0)
+#define   IOSF_PORT_PUNIT                      0x4
+#define   IOSF_PORT_NC                         0x11
+#define VLV_IOSF_DATA                          0x182104
+#define VLV_IOSF_ADDR                          0x182108
+
+#define PUNIT_OPCODE_REG_READ                  6
+#define PUNIT_OPCODE_REG_WRITE                 7
+
+#define PUNIT_REG_GPU_LFM                      0xd3
+#define PUNIT_REG_GPU_FREQ_REQ                 0xd4
+#define PUNIT_REG_GPU_FREQ_STS                 0xd8
+#define PUNIT_REG_MEDIA_TURBO_FREQ_REQ         0xdc
+
+#define PUNIT_FUSE_BUS2                                0xf6 /* bits 47:40 */
+#define PUNIT_FUSE_BUS1                                0xf5 /* bits 55:48 */
+
+#define IOSF_NC_FB_GFX_FREQ_FUSE               0x1c
+#define   FB_GFX_MAX_FREQ_FUSE_SHIFT           3
+#define   FB_GFX_MAX_FREQ_FUSE_MASK            0x000007f8
+#define   FB_GFX_FGUARANTEED_FREQ_FUSE_SHIFT   11
+#define   FB_GFX_FGUARANTEED_FREQ_FUSE_MASK    0x0007f800
+#define IOSF_NC_FB_GFX_FMAX_FUSE_HI            0x34
+#define   FB_FMAX_VMIN_FREQ_HI_MASK            0x00000007
+#define IOSF_NC_FB_GFX_FMAX_FUSE_LO            0x30
+#define   FB_FMAX_VMIN_FREQ_LO_SHIFT           27
+#define   FB_FMAX_VMIN_FREQ_LO_MASK            0xf8000000
 
 #define GEN6_GT_CORE_STATUS            0x138060
 #define   GEN6_CORE_CPD_STATE_MASK     (7<<4)