diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-06-12 18:54:58 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-06-18 08:05:19 -0400 |
commit | 9f11a9e4e50006b615ba94722dfc33ced89664cf (patch) | |
tree | 98752be4a5ae1135b688b1f9a28f70083fe02a11 | |
parent | 78114071ff9e3c2f6c1715bfb01ac8c0b3618e72 (diff) |
drm/i915: set up PIPECONF explicitly for i9xx/vlv platforms
Same reasons as for the previous patch, just no bug report about
anything going wrong yet: We only support exactly the mode we program,
so don't leave any stale BIOS state behind.
Again this will be fun to properly track for fastboot.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3097fb164fd8..a6b4bee9034c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4736,7 +4736,7 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) | |||
4736 | struct drm_i915_private *dev_priv = dev->dev_private; | 4736 | struct drm_i915_private *dev_priv = dev->dev_private; |
4737 | uint32_t pipeconf; | 4737 | uint32_t pipeconf; |
4738 | 4738 | ||
4739 | pipeconf = I915_READ(PIPECONF(intel_crtc->pipe)); | 4739 | pipeconf = 0; |
4740 | 4740 | ||
4741 | if (intel_crtc->pipe == 0 && INTEL_INFO(dev)->gen < 4) { | 4741 | if (intel_crtc->pipe == 0 && INTEL_INFO(dev)->gen < 4) { |
4742 | /* Enable pixel doubling when the dot clock is > 90% of the (display) | 4742 | /* Enable pixel doubling when the dot clock is > 90% of the (display) |
@@ -4748,15 +4748,10 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) | |||
4748 | if (intel_crtc->config.requested_mode.clock > | 4748 | if (intel_crtc->config.requested_mode.clock > |
4749 | dev_priv->display.get_display_clock_speed(dev) * 9 / 10) | 4749 | dev_priv->display.get_display_clock_speed(dev) * 9 / 10) |
4750 | pipeconf |= PIPECONF_DOUBLE_WIDE; | 4750 | pipeconf |= PIPECONF_DOUBLE_WIDE; |
4751 | else | ||
4752 | pipeconf &= ~PIPECONF_DOUBLE_WIDE; | ||
4753 | } | 4751 | } |
4754 | 4752 | ||
4755 | /* only g4x and later have fancy bpc/dither controls */ | 4753 | /* only g4x and later have fancy bpc/dither controls */ |
4756 | if (IS_G4X(dev) || IS_VALLEYVIEW(dev)) { | 4754 | if (IS_G4X(dev) || IS_VALLEYVIEW(dev)) { |
4757 | pipeconf &= ~(PIPECONF_BPC_MASK | | ||
4758 | PIPECONF_DITHER_EN | PIPECONF_DITHER_TYPE_MASK); | ||
4759 | |||
4760 | /* Bspec claims that we can't use dithering for 30bpp pipes. */ | 4755 | /* Bspec claims that we can't use dithering for 30bpp pipes. */ |
4761 | if (intel_crtc->config.dither && intel_crtc->config.pipe_bpp != 30) | 4756 | if (intel_crtc->config.dither && intel_crtc->config.pipe_bpp != 30) |
4762 | pipeconf |= PIPECONF_DITHER_EN | | 4757 | pipeconf |= PIPECONF_DITHER_EN | |
@@ -4784,23 +4779,17 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) | |||
4784 | pipeconf |= PIPECONF_CXSR_DOWNCLOCK; | 4779 | pipeconf |= PIPECONF_CXSR_DOWNCLOCK; |
4785 | } else { | 4780 | } else { |
4786 | DRM_DEBUG_KMS("disabling CxSR downclocking\n"); | 4781 | DRM_DEBUG_KMS("disabling CxSR downclocking\n"); |
4787 | pipeconf &= ~PIPECONF_CXSR_DOWNCLOCK; | ||
4788 | } | 4782 | } |
4789 | } | 4783 | } |
4790 | 4784 | ||
4791 | pipeconf &= ~PIPECONF_INTERLACE_MASK; | ||
4792 | if (!IS_GEN2(dev) && | 4785 | if (!IS_GEN2(dev) && |
4793 | intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) | 4786 | intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) |
4794 | pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; | 4787 | pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; |
4795 | else | 4788 | else |
4796 | pipeconf |= PIPECONF_PROGRESSIVE; | 4789 | pipeconf |= PIPECONF_PROGRESSIVE; |
4797 | 4790 | ||
4798 | if (IS_VALLEYVIEW(dev)) { | 4791 | if (IS_VALLEYVIEW(dev) && intel_crtc->config.limited_color_range) |
4799 | if (intel_crtc->config.limited_color_range) | 4792 | pipeconf |= PIPECONF_COLOR_RANGE_SELECT; |
4800 | pipeconf |= PIPECONF_COLOR_RANGE_SELECT; | ||
4801 | else | ||
4802 | pipeconf &= ~PIPECONF_COLOR_RANGE_SELECT; | ||
4803 | } | ||
4804 | 4793 | ||
4805 | I915_WRITE(PIPECONF(intel_crtc->pipe), pipeconf); | 4794 | I915_WRITE(PIPECONF(intel_crtc->pipe), pipeconf); |
4806 | POSTING_READ(PIPECONF(intel_crtc->pipe)); | 4795 | POSTING_READ(PIPECONF(intel_crtc->pipe)); |