Commit 78114071 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: set up PIPECONF explicitly on ilk-ivb

Dragging random garbage along from the BIOS isn't a good idea, since
we really only support exactly what we've set up.

In the specific case for the bug reporter the BIOS used the 10bit
gamma table, but since we only support an 8bit table the dark colors
ended up all wrong and the light ones all unadjusted.

Note that this has a nice implication for fastboot, it essentially
means that we have quite a bit more state to check and compare before
we can decide whether fastboot is possible.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65593Reported-and-Tested-by: default avatarThomas Hebb <tommyhebb@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent aa60c664
...@@ -5342,9 +5342,8 @@ static void ironlake_set_pipeconf(struct drm_crtc *crtc) ...@@ -5342,9 +5342,8 @@ static void ironlake_set_pipeconf(struct drm_crtc *crtc)
int pipe = intel_crtc->pipe; int pipe = intel_crtc->pipe;
uint32_t val; uint32_t val;
val = I915_READ(PIPECONF(pipe)); val = 0;
val &= ~PIPECONF_BPC_MASK;
switch (intel_crtc->config.pipe_bpp) { switch (intel_crtc->config.pipe_bpp) {
case 18: case 18:
val |= PIPECONF_6BPC; val |= PIPECONF_6BPC;
...@@ -5363,11 +5362,9 @@ static void ironlake_set_pipeconf(struct drm_crtc *crtc) ...@@ -5363,11 +5362,9 @@ static void ironlake_set_pipeconf(struct drm_crtc *crtc)
BUG(); BUG();
} }
val &= ~(PIPECONF_DITHER_EN | PIPECONF_DITHER_TYPE_MASK);
if (intel_crtc->config.dither) if (intel_crtc->config.dither)
val |= (PIPECONF_DITHER_EN | PIPECONF_DITHER_TYPE_SP); val |= (PIPECONF_DITHER_EN | PIPECONF_DITHER_TYPE_SP);
val &= ~PIPECONF_INTERLACE_MASK;
if (intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) if (intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE)
val |= PIPECONF_INTERLACED_ILK; val |= PIPECONF_INTERLACED_ILK;
else else
...@@ -5375,8 +5372,6 @@ static void ironlake_set_pipeconf(struct drm_crtc *crtc) ...@@ -5375,8 +5372,6 @@ static void ironlake_set_pipeconf(struct drm_crtc *crtc)
if (intel_crtc->config.limited_color_range) if (intel_crtc->config.limited_color_range)
val |= PIPECONF_COLOR_RANGE_SELECT; val |= PIPECONF_COLOR_RANGE_SELECT;
else
val &= ~PIPECONF_COLOR_RANGE_SELECT;
I915_WRITE(PIPECONF(pipe), val); I915_WRITE(PIPECONF(pipe), val);
POSTING_READ(PIPECONF(pipe)); POSTING_READ(PIPECONF(pipe));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment