drm/i915: add DDI registers
authorEugeni Dodonov <eugeni.dodonov@intel.com>
Thu, 29 Mar 2012 15:32:23 +0000 (12:32 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 9 Apr 2012 16:03:59 +0000 (18:03 +0200)
There is one set of such registers for each pipe (A/B/C/EDP).

v2: update to use DDI PORTS enum

v1 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h

index bca37b3082c594154ff462d34cc3f637d3fbb87d..61eca8b9679f81f85a2969a396e4a990dd5554ee 100644 (file)
 #define   HSW_PWR_WELL_FORCE_ON                                (1<<19)
 #define HSW_PWR_WELL_CTL6              0x45414
 
+/* Per-pipe DDI Function Control */
+#define PIPE_DDI_FUNC_CTL_A                    0x60400
+#define PIPE_DDI_FUNC_CTL_B                    0x61400
+#define PIPE_DDI_FUNC_CTL_C                    0x62400
+#define PIPE_DDI_FUNC_CTL_EDP          0x6F400
+#define DDI_FUNC_CTL(pipe) _PIPE(pipe, \
+                                       PIPE_DDI_FUNC_CTL_A, \
+                                       PIPE_DDI_FUNC_CTL_B)
+#define  PIPE_DDI_FUNC_ENABLE          (1<<31)
+/* Those bits are ignored by pipe EDP since it can only connect to DDI A */
+#define  PIPE_DDI_PORT_MASK                            (0xf<<28)
+#define  PIPE_DDI_SELECT_PORT(x)               ((x)<<28)
+#define  PIPE_DDI_MODE_SELECT_HDMI             (0<<24)
+#define  PIPE_DDI_MODE_SELECT_DVI              (1<<24)
+#define  PIPE_DDI_MODE_SELECT_DP_SST   (2<<24)
+#define  PIPE_DDI_MODE_SELECT_DP_MST   (3<<24)
+#define  PIPE_DDI_MODE_SELECT_FDI              (4<<24)
+#define  PIPE_DDI_BPC_8                                        (0<<20)
+#define  PIPE_DDI_BPC_10                               (1<<20)
+#define  PIPE_DDI_BPC_6                                        (2<<20)
+#define  PIPE_DDI_BPC_12                               (3<<20)
+#define  PIPE_DDI_BFI_ENABLE                   (1<<4)
+#define  PIPE_DDI_PORT_WIDTH_X1                        (0<<1)
+#define  PIPE_DDI_PORT_WIDTH_X2                        (1<<1)
+#define  PIPE_DDI_PORT_WIDTH_X4                        (3<<1)
+
 #endif /* _I915_REG_H_ */