diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-07-09 16:35:53 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-07-14 02:12:37 -0400 |
commit | 6b89cddee051945a83cc67436ad1680ba7d9f766 (patch) | |
tree | 360e439898781ab11dbdb42dc47d27db46e69cae | |
parent | 1795cd9b3a91d4b5473c97f491d63892442212ab (diff) |
Revert "drm/i915: Don't set the 8to6 dither flag when not scaling"
This reverts commit 773875bfb6737982903c42d1ee88cf60af80089c.
It is very much needed and the lack of dithering has been reported by
a large list of people with various gen2/3 hardware.
Also, the original patch was complete non-sense since the WARNING
backtraces in the references bugzilla are about
gmch_pfit.lvds_border_bits mismatch, not at all about the dither bit.
That one seems to work.
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Hans de Bruin <jmdebruin@xmsnet.nl>
Cc: stable@vger.kernel.org
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_panel.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 23126023aeba..5e5a72fca5fb 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -111,6 +111,13 @@ static void intel_lvds_get_config(struct intel_encoder *encoder, | |||
111 | 111 | ||
112 | pipe_config->adjusted_mode.flags |= flags; | 112 | pipe_config->adjusted_mode.flags |= flags; |
113 | 113 | ||
114 | /* gen2/3 store dither state in pfit control, needs to match */ | ||
115 | if (INTEL_INFO(dev)->gen < 4) { | ||
116 | tmp = I915_READ(PFIT_CONTROL); | ||
117 | |||
118 | pipe_config->gmch_pfit.control |= tmp & PANEL_8TO6_DITHER_ENABLE; | ||
119 | } | ||
120 | |||
114 | dotclock = pipe_config->port_clock; | 121 | dotclock = pipe_config->port_clock; |
115 | 122 | ||
116 | if (HAS_PCH_SPLIT(dev_priv->dev)) | 123 | if (HAS_PCH_SPLIT(dev_priv->dev)) |
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 628cd8938274..12b02fe1d0ae 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c | |||
@@ -361,16 +361,16 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc, | |||
361 | pfit_control |= ((intel_crtc->pipe << PFIT_PIPE_SHIFT) | | 361 | pfit_control |= ((intel_crtc->pipe << PFIT_PIPE_SHIFT) | |
362 | PFIT_FILTER_FUZZY); | 362 | PFIT_FILTER_FUZZY); |
363 | 363 | ||
364 | /* Make sure pre-965 set dither correctly for 18bpp panels. */ | ||
365 | if (INTEL_INFO(dev)->gen < 4 && pipe_config->pipe_bpp == 18) | ||
366 | pfit_control |= PANEL_8TO6_DITHER_ENABLE; | ||
367 | |||
368 | out: | 364 | out: |
369 | if ((pfit_control & PFIT_ENABLE) == 0) { | 365 | if ((pfit_control & PFIT_ENABLE) == 0) { |
370 | pfit_control = 0; | 366 | pfit_control = 0; |
371 | pfit_pgm_ratios = 0; | 367 | pfit_pgm_ratios = 0; |
372 | } | 368 | } |
373 | 369 | ||
370 | /* Make sure pre-965 set dither correctly for 18bpp panels. */ | ||
371 | if (INTEL_INFO(dev)->gen < 4 && pipe_config->pipe_bpp == 18) | ||
372 | pfit_control |= PANEL_8TO6_DITHER_ENABLE; | ||
373 | |||
374 | pipe_config->gmch_pfit.control = pfit_control; | 374 | pipe_config->gmch_pfit.control = pfit_control; |
375 | pipe_config->gmch_pfit.pgm_ratios = pfit_pgm_ratios; | 375 | pipe_config->gmch_pfit.pgm_ratios = pfit_pgm_ratios; |
376 | pipe_config->gmch_pfit.lvds_border_bits = border; | 376 | pipe_config->gmch_pfit.lvds_border_bits = border; |