drm/i915/bdw: New source and header file for LRs, LRCs and Execlists
[deliverable/linux.git] / drivers / gpu / drm / i915 / i915_reg.h
index a87eb18b4c9096dd2e5a926c576e22acadcdcdd9..7a6cc69cdc2b6eb6a8e97b95f82d27130e1d51d2 100644 (file)
@@ -1697,12 +1697,9 @@ enum punit_power_well {
 #define DPIO_PHY_STATUS                        (VLV_DISPLAY_BASE + 0x6240)
 #define   DPLL_PORTD_READY_MASK                (0xf)
 #define DISPLAY_PHY_CONTROL (VLV_DISPLAY_BASE + 0x60100)
-#define   PHY_COM_LANE_RESET_DEASSERT(phy, val) \
-                               ((phy == DPIO_PHY0) ? (val | 1) : (val | 2))
-#define   PHY_COM_LANE_RESET_ASSERT(phy, val) \
-                               ((phy == DPIO_PHY0) ? (val & ~1) : (val & ~2))
+#define   PHY_COM_LANE_RESET_DEASSERT(phy) (1 << (phy))
 #define DISPLAY_PHY_STATUS (VLV_DISPLAY_BASE + 0x60104)
-#define   PHY_POWERGOOD(phy)   ((phy == DPIO_PHY0) ? (1<<31) : (1<<30))
+#define   PHY_POWERGOOD(phy)   (((phy) == DPIO_PHY0) ? (1<<31) : (1<<30))
 
 /*
  * The i830 generation, in LVDS mode, defines P1 as the bit number set within
@@ -3999,47 +3996,17 @@ enum punit_power_well {
 /* drain latency register values*/
 #define DRAIN_LATENCY_PRECISION_32     32
 #define DRAIN_LATENCY_PRECISION_64     64
-#define VLV_DDL1                       (VLV_DISPLAY_BASE + 0x70050)
-#define DDL_CURSORA_PRECISION_64       (1<<31)
-#define DDL_CURSORA_PRECISION_32       (0<<31)
-#define DDL_CURSORA_SHIFT              24
-#define DDL_SPRITEB_PRECISION_64       (1<<23)
-#define DDL_SPRITEB_PRECISION_32       (0<<23)
-#define DDL_SPRITEB_SHIFT              16
-#define DDL_SPRITEA_PRECISION_64       (1<<15)
-#define DDL_SPRITEA_PRECISION_32       (0<<15)
-#define DDL_SPRITEA_SHIFT              8
-#define DDL_PLANEA_PRECISION_64                (1<<7)
-#define DDL_PLANEA_PRECISION_32                (0<<7)
-#define DDL_PLANEA_SHIFT               0
-
-#define VLV_DDL2                       (VLV_DISPLAY_BASE + 0x70054)
-#define DDL_CURSORB_PRECISION_64       (1<<31)
-#define DDL_CURSORB_PRECISION_32       (0<<31)
-#define DDL_CURSORB_SHIFT              24
-#define DDL_SPRITED_PRECISION_64       (1<<23)
-#define DDL_SPRITED_PRECISION_32       (0<<23)
-#define DDL_SPRITED_SHIFT              16
-#define DDL_SPRITEC_PRECISION_64       (1<<15)
-#define DDL_SPRITEC_PRECISION_32       (0<<15)
-#define DDL_SPRITEC_SHIFT              8
-#define DDL_PLANEB_PRECISION_64                (1<<7)
-#define DDL_PLANEB_PRECISION_32                (0<<7)
-#define DDL_PLANEB_SHIFT               0
-
-#define VLV_DDL3                       (VLV_DISPLAY_BASE + 0x70058)
-#define DDL_CURSORC_PRECISION_64       (1<<31)
-#define DDL_CURSORC_PRECISION_32       (0<<31)
-#define DDL_CURSORC_SHIFT              24
-#define DDL_SPRITEF_PRECISION_64       (1<<23)
-#define DDL_SPRITEF_PRECISION_32       (0<<23)
-#define DDL_SPRITEF_SHIFT              16
-#define DDL_SPRITEE_PRECISION_64       (1<<15)
-#define DDL_SPRITEE_PRECISION_32       (0<<15)
-#define DDL_SPRITEE_SHIFT              8
-#define DDL_PLANEC_PRECISION_64                (1<<7)
-#define DDL_PLANEC_PRECISION_32                (0<<7)
-#define DDL_PLANEC_SHIFT               0
+#define VLV_DDL(pipe)                  (VLV_DISPLAY_BASE + 0x70050 + 4 * (pipe))
+#define DDL_CURSOR_PRECISION_64                (1<<31)
+#define DDL_CURSOR_PRECISION_32                (0<<31)
+#define DDL_CURSOR_SHIFT               24
+#define DDL_SPRITE_PRECISION_64(sprite)        (1<<(15+8*(sprite)))
+#define DDL_SPRITE_PRECISION_32(sprite)        (0<<(15+8*(sprite)))
+#define DDL_SPRITE_SHIFT(sprite)       (8+8*(sprite))
+#define DDL_PLANE_PRECISION_64         (1<<7)
+#define DDL_PLANE_PRECISION_32         (0<<7)
+#define DDL_PLANE_SHIFT                        0
+#define DRAIN_LATENCY_MASK             0x7f
 
 /* FIFO watermark sizes etc */
 #define G4X_FIFO_LINE_SIZE     64
This page took 0.032624 seconds and 5 git commands to generate.