aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2010-01-04 03:29:31 -0500
committerEric Anholt <eric@anholt.net>2010-01-06 12:40:12 -0500
commit8faf3b317471179c02db339aa80955a2e88c036d (patch)
tree1ad82a037f024429d91c6e4fe091dcf08f1400a0 /drivers
parent898822ce9561ab9b58a7eb60580a162a83dadecd (diff)
drm/i915: Make the BPC in FDI rx/transcoder be consistent with that in pipeconf on Ironlake
Make the BPC in FDI rx/transcoder be consistent with that in pipeconf on Ironlake. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0c9b79f2ab31..63e8e9fd6793 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1493,6 +1493,10 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
1493 int trans_vsync_reg = (pipe == 0) ? TRANS_VSYNC_A : TRANS_VSYNC_B; 1493 int trans_vsync_reg = (pipe == 0) ? TRANS_VSYNC_A : TRANS_VSYNC_B;
1494 u32 temp; 1494 u32 temp;
1495 int tries = 5, j, n; 1495 int tries = 5, j, n;
1496 u32 pipe_bpc;
1497
1498 temp = I915_READ(pipeconf_reg);
1499 pipe_bpc = temp & PIPE_BPC_MASK;
1496 1500
1497 /* XXX: When our outputs are all unaware of DPMS modes other than off 1501 /* XXX: When our outputs are all unaware of DPMS modes other than off
1498 * and on, we should map those modes to DRM_MODE_DPMS_OFF in the CRTC. 1502 * and on, we should map those modes to DRM_MODE_DPMS_OFF in the CRTC.
@@ -1524,6 +1528,12 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
1524 1528
1525 /* enable PCH FDI RX PLL, wait warmup plus DMI latency */ 1529 /* enable PCH FDI RX PLL, wait warmup plus DMI latency */
1526 temp = I915_READ(fdi_rx_reg); 1530 temp = I915_READ(fdi_rx_reg);
1531 /*
1532 * make the BPC in FDI Rx be consistent with that in
1533 * pipeconf reg.
1534 */
1535 temp &= ~(0x7 << 16);
1536 temp |= (pipe_bpc << 11);
1527 I915_WRITE(fdi_rx_reg, temp | FDI_RX_PLL_ENABLE | 1537 I915_WRITE(fdi_rx_reg, temp | FDI_RX_PLL_ENABLE |
1528 FDI_SEL_PCDCLK | 1538 FDI_SEL_PCDCLK |
1529 FDI_DP_PORT_WIDTH_X4); /* default 4 lanes */ 1539 FDI_DP_PORT_WIDTH_X4); /* default 4 lanes */
@@ -1666,6 +1676,12 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
1666 1676
1667 /* enable PCH transcoder */ 1677 /* enable PCH transcoder */
1668 temp = I915_READ(transconf_reg); 1678 temp = I915_READ(transconf_reg);
1679 /*
1680 * make the BPC in transcoder be consistent with
1681 * that in pipeconf reg.
1682 */
1683 temp &= ~PIPE_BPC_MASK;
1684 temp |= pipe_bpc;
1669 I915_WRITE(transconf_reg, temp | TRANS_ENABLE); 1685 I915_WRITE(transconf_reg, temp | TRANS_ENABLE);
1670 I915_READ(transconf_reg); 1686 I915_READ(transconf_reg);
1671 1687
@@ -1745,6 +1761,9 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
1745 I915_READ(fdi_tx_reg); 1761 I915_READ(fdi_tx_reg);
1746 1762
1747 temp = I915_READ(fdi_rx_reg); 1763 temp = I915_READ(fdi_rx_reg);
1764 /* BPC in FDI rx is consistent with that in pipeconf */
1765 temp &= ~(0x07 << 16);
1766 temp |= (pipe_bpc << 11);
1748 I915_WRITE(fdi_rx_reg, temp & ~FDI_RX_ENABLE); 1767 I915_WRITE(fdi_rx_reg, temp & ~FDI_RX_ENABLE);
1749 I915_READ(fdi_rx_reg); 1768 I915_READ(fdi_rx_reg);
1750 1769
@@ -1789,7 +1808,12 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
1789 } 1808 }
1790 } 1809 }
1791 } 1810 }
1792 1811 temp = I915_READ(transconf_reg);
1812 /* BPC in transcoder is consistent with that in pipeconf */
1813 temp &= ~PIPE_BPC_MASK;
1814 temp |= pipe_bpc;
1815 I915_WRITE(transconf_reg, temp);
1816 I915_READ(transconf_reg);
1793 udelay(100); 1817 udelay(100);
1794 1818
1795 /* disable PCH DPLL */ 1819 /* disable PCH DPLL */