diff options
author | Jani Nikula <jani.nikula@intel.com> | 2012-09-26 11:43:10 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-09-27 02:42:10 -0400 |
commit | 0c96c65b48fba3ffe9822a554cbc0cd610765cd5 (patch) | |
tree | bcbc9e7dda4b56b4f886b27865fc6a9c684ea73d /drivers/gpu | |
parent | f531dcb23f9a5c6ad77e451459df965dc9a0c0c8 (diff) |
drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
The dithering introduced in
commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
Author: Adam Jackson <ajax@redhat.com>
Date: Tue Dec 13 15:41:00 2011 -0800
drm/i915/dp: Dither down to 6bpc if it makes the mode fit
stores the INTEL_MODE_DP_FORCE_6BPC flag in the private_flags of the
adjusted mode, while i9xx_crtc_mode_set() and ironlake_crtc_mode_set() use
the original mode, without the flag, so it would never have any
effect. However, the BPC was clamped by VBT settings, making things work by
coincidence, until that part was removed in
commit 4344b813f105a19f793f1fd93ad775b784648b95
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Fri Aug 10 11:10:20 2012 +0200
Use adjusted_mode instead of mode when checking for
INTEL_MODE_DP_FORCE_6BPC to make the flag have effect.
v2: Don't forget to fix this in i9xx_crtc_mode_set() also, pointed out by
Daniel both before and after sending the first patch.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47621
CC: Adam Jackson <ajax@redhat.com>
CC: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 6f5aafa1b633..f6e274c5db62 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4370,7 +4370,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
4370 | /* default to 8bpc */ | 4370 | /* default to 8bpc */ |
4371 | pipeconf &= ~(PIPECONF_BPP_MASK | PIPECONF_DITHER_EN); | 4371 | pipeconf &= ~(PIPECONF_BPP_MASK | PIPECONF_DITHER_EN); |
4372 | if (is_dp) { | 4372 | if (is_dp) { |
4373 | if (mode->private_flags & INTEL_MODE_DP_FORCE_6BPC) { | 4373 | if (adjusted_mode->private_flags & INTEL_MODE_DP_FORCE_6BPC) { |
4374 | pipeconf |= PIPECONF_BPP_6 | | 4374 | pipeconf |= PIPECONF_BPP_6 | |
4375 | PIPECONF_DITHER_EN | | 4375 | PIPECONF_DITHER_EN | |
4376 | PIPECONF_DITHER_TYPE_SP; | 4376 | PIPECONF_DITHER_TYPE_SP; |
@@ -4802,7 +4802,8 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, | |||
4802 | target_clock = adjusted_mode->clock; | 4802 | target_clock = adjusted_mode->clock; |
4803 | 4803 | ||
4804 | /* determine panel color depth */ | 4804 | /* determine panel color depth */ |
4805 | dither = intel_choose_pipe_bpp_dither(crtc, fb, &pipe_bpp, mode); | 4805 | dither = intel_choose_pipe_bpp_dither(crtc, fb, &pipe_bpp, |
4806 | adjusted_mode); | ||
4806 | if (is_lvds && dev_priv->lvds_dither) | 4807 | if (is_lvds && dev_priv->lvds_dither) |
4807 | dither = true; | 4808 | dither = true; |
4808 | 4809 | ||