diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 40 |
2 files changed, 42 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index b4813586d92..cd0ffa015c2 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -2158,11 +2158,11 @@ | |||
2158 | #define DREF_CPU_SOURCE_OUTPUT_MASK (3<<13) | 2158 | #define DREF_CPU_SOURCE_OUTPUT_MASK (3<<13) |
2159 | #define DREF_SSC_SOURCE_DISABLE (0<<11) | 2159 | #define DREF_SSC_SOURCE_DISABLE (0<<11) |
2160 | #define DREF_SSC_SOURCE_ENABLE (2<<11) | 2160 | #define DREF_SSC_SOURCE_ENABLE (2<<11) |
2161 | #define DREF_SSC_SOURCE_MASK (2<<11) | 2161 | #define DREF_SSC_SOURCE_MASK (3<<11) |
2162 | #define DREF_NONSPREAD_SOURCE_DISABLE (0<<9) | 2162 | #define DREF_NONSPREAD_SOURCE_DISABLE (0<<9) |
2163 | #define DREF_NONSPREAD_CK505_ENABLE (1<<9) | 2163 | #define DREF_NONSPREAD_CK505_ENABLE (1<<9) |
2164 | #define DREF_NONSPREAD_SOURCE_ENABLE (2<<9) | 2164 | #define DREF_NONSPREAD_SOURCE_ENABLE (2<<9) |
2165 | #define DREF_NONSPREAD_SOURCE_MASK (2<<9) | 2165 | #define DREF_NONSPREAD_SOURCE_MASK (3<<9) |
2166 | #define DREF_SUPERSPREAD_SOURCE_DISABLE (0<<7) | 2166 | #define DREF_SUPERSPREAD_SOURCE_DISABLE (0<<7) |
2167 | #define DREF_SUPERSPREAD_SOURCE_ENABLE (2<<7) | 2167 | #define DREF_SUPERSPREAD_SOURCE_ENABLE (2<<7) |
2168 | #define DREF_SSC4_DOWNSPREAD (0<<6) | 2168 | #define DREF_SSC4_DOWNSPREAD (0<<6) |
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) |