diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2009-06-05 03:38:44 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-06-05 07:35:49 -0400 |
commit | 541998a18b72d2cac48b3369fa4540116ff3f0a8 (patch) | |
tree | 0173c46d2a51118583aa46f2854509076ef90ada /drivers/gpu/drm/i915/intel_display.c | |
parent | 30ad48b7334a2eb2edf22f6c91f7b3f22a22a837 (diff) |
drm/i915: Add LVDS support for IGDNG
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 53cf6efa67b6..05bd97e3e3e0 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -1542,6 +1542,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
1542 | int pch_fp_reg = (pipe == 0) ? PCH_FPA0 : PCH_FPB0; | 1542 | int pch_fp_reg = (pipe == 0) ? PCH_FPA0 : PCH_FPB0; |
1543 | int pch_dpll_reg = (pipe == 0) ? PCH_DPLL_A : PCH_DPLL_B; | 1543 | int pch_dpll_reg = (pipe == 0) ? PCH_DPLL_A : PCH_DPLL_B; |
1544 | int fdi_rx_reg = (pipe == 0) ? FDI_RXA_CTL : FDI_RXB_CTL; | 1544 | int fdi_rx_reg = (pipe == 0) ? FDI_RXA_CTL : FDI_RXB_CTL; |
1545 | int lvds_reg = LVDS; | ||
1545 | u32 temp; | 1546 | u32 temp; |
1546 | int sdvo_pixel_multiply; | 1547 | int sdvo_pixel_multiply; |
1547 | 1548 | ||
@@ -1772,8 +1773,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
1772 | * things on. | 1773 | * things on. |
1773 | */ | 1774 | */ |
1774 | if (is_lvds) { | 1775 | if (is_lvds) { |
1775 | u32 lvds = I915_READ(LVDS); | 1776 | u32 lvds; |
1776 | 1777 | ||
1778 | if (IS_IGDNG(dev)) | ||
1779 | lvds_reg = PCH_LVDS; | ||
1780 | |||
1781 | lvds = I915_READ(lvds_reg); | ||
1777 | lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP | LVDS_PIPEB_SELECT; | 1782 | lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP | LVDS_PIPEB_SELECT; |
1778 | /* Set the B0-B3 data pairs corresponding to whether we're going to | 1783 | /* Set the B0-B3 data pairs corresponding to whether we're going to |
1779 | * set the DPLLs for dual-channel mode or not. | 1784 | * set the DPLLs for dual-channel mode or not. |
@@ -1788,8 +1793,8 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
1788 | * panels behave in the two modes. | 1793 | * panels behave in the two modes. |
1789 | */ | 1794 | */ |
1790 | 1795 | ||
1791 | I915_WRITE(LVDS, lvds); | 1796 | I915_WRITE(lvds_reg, lvds); |
1792 | I915_READ(LVDS); | 1797 | I915_READ(lvds_reg); |
1793 | } | 1798 | } |
1794 | 1799 | ||
1795 | I915_WRITE(fp_reg, fp); | 1800 | I915_WRITE(fp_reg, fp); |
@@ -2428,7 +2433,7 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
2428 | intel_crt_init(dev); | 2433 | intel_crt_init(dev); |
2429 | 2434 | ||
2430 | /* Set up integrated LVDS */ | 2435 | /* Set up integrated LVDS */ |
2431 | if (IS_MOBILE(dev) && !IS_I830(dev) && !IS_IGDNG(dev)) | 2436 | if (IS_MOBILE(dev) && !IS_I830(dev)) |
2432 | intel_lvds_init(dev); | 2437 | intel_lvds_init(dev); |
2433 | 2438 | ||
2434 | if (IS_IGDNG(dev)) { | 2439 | if (IS_IGDNG(dev)) { |