diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2009-10-19 03:43:48 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-10-19 14:03:37 -0400 |
commit | c038e51e841581cc3fb9a76e5e16331331e9c85c (patch) | |
tree | 4bdf6e3aa2eb8f3b97c99c906ec14804b92f90bb /drivers/gpu/drm/i915/intel_display.c | |
parent | 0d9c778978ff268228c095ae737c282c03a5986d (diff) |
drm/i915: fix to setup display reference clock control on Ironlake
For new stepping of PCH, the display reference clock
is fully under driver's control. This one trys to setup
all needed reference clock for different outputs. Older
stepping of PCH chipset should be ignoring this.
This fixes output failure issue on newer PCH which requires
driver to take control of reference clock enabling.
Cc: Stable Team <stable@kernel.org>
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 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 123cce1ae47..db4c3870095 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2814,6 +2814,46 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
2814 | link_bw, &m_n); | 2814 | link_bw, &m_n); |
2815 | } | 2815 | } |
2816 | 2816 | ||
2817 | /* Ironlake: try to setup display ref clock before DPLL | ||
2818 | * enabling. This is only under driver's control after | ||
2819 | * PCH B stepping, previous chipset stepping should be | ||
2820 | * ignoring this setting. | ||
2821 | */ | ||
2822 | if (IS_IGDNG(dev)) { | ||
2823 | temp = I915_READ(PCH_DREF_CONTROL); | ||
2824 | /* Always enable nonspread source */ | ||
2825 | temp &= ~DREF_NONSPREAD_SOURCE_MASK; | ||
2826 | temp |= DREF_NONSPREAD_SOURCE_ENABLE; | ||
2827 | I915_WRITE(PCH_DREF_CONTROL, temp); | ||
2828 | POSTING_READ(PCH_DREF_CONTROL); | ||
2829 | |||
2830 | temp &= ~DREF_SSC_SOURCE_MASK; | ||
2831 | temp |= DREF_SSC_SOURCE_ENABLE; | ||
2832 | I915_WRITE(PCH_DREF_CONTROL, temp); | ||
2833 | POSTING_READ(PCH_DREF_CONTROL); | ||
2834 | |||
2835 | udelay(200); | ||
2836 | |||
2837 | if (is_edp) { | ||
2838 | if (dev_priv->lvds_use_ssc) { | ||
2839 | temp |= DREF_SSC1_ENABLE; | ||
2840 | I915_WRITE(PCH_DREF_CONTROL, temp); | ||
2841 | POSTING_READ(PCH_DREF_CONTROL); | ||
2842 | |||
2843 | udelay(200); | ||
2844 | |||
2845 | temp &= ~DREF_CPU_SOURCE_OUTPUT_MASK; | ||
2846 | temp |= DREF_CPU_SOURCE_OUTPUT_DOWNSPREAD; | ||
2847 | I915_WRITE(PCH_DREF_CONTROL, temp); | ||
2848 | POSTING_READ(PCH_DREF_CONTROL); | ||
2849 | } else { | ||
2850 | temp |= DREF_CPU_SOURCE_OUTPUT_NONSPREAD; | ||
2851 | I915_WRITE(PCH_DREF_CONTROL, temp); | ||
2852 | POSTING_READ(PCH_DREF_CONTROL); | ||
2853 | } | ||
2854 | } | ||
2855 | } | ||
2856 | |||
2817 | if (IS_IGD(dev)) { | 2857 | if (IS_IGD(dev)) { |
2818 | fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2; | 2858 | fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2; |
2819 | if (has_reduced_clock) | 2859 | if (has_reduced_clock) |