Skip to contentSkip to conversation

Revert "drm/i915: Don't set the 8to6 dither flag when not scaling"

PATCH In review Daniel Vetter 3 participants 3 messages Jul 9, 2014 – Jul 10, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Hans de Bruin <[email protected]>
---
 drivers/gpu/drm/i915/intel_lvds.c  | 7 +++++++
 drivers/gpu/drm/i915/intel_panel.c | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +7 -0
index 4d29a83fd163..7c71a8f3147c 100644
@@ -111,6 +111,13 @@ static void intel_lvds_get_config(struct intel_encoder *encoder,
 
 	pipe_config->adjusted_mode.flags |= flags;
 
+	/* gen2/3 store dither state in pfit control, needs to match */
+	if (INTEL_INFO(dev)->gen < 4) {
+		tmp = I915_READ(PFIT_CONTROL);
+
+		pipe_config->gmch_pfit.control |= tmp & PANEL_8TO6_DITHER_ENABLE;
+	}
+
 	dotclock = pipe_config->port_clock;
 
 	if (HAS_PCH_SPLIT(dev_priv->dev))
drivers/gpu/drm/i915/intel_panel.c +4 -4
index 628cd8938274..12b02fe1d0ae 100644
@@ -361,16 +361,16 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
 		pfit_control |= ((intel_crtc->pipe << PFIT_PIPE_SHIFT) |
 				 PFIT_FILTER_FUZZY);
 
-	/* Make sure pre-965 set dither correctly for 18bpp panels. */
-	if (INTEL_INFO(dev)->gen < 4 && pipe_config->pipe_bpp == 18)
-		pfit_control |= PANEL_8TO6_DITHER_ENABLE;
-
 out:
 	if ((pfit_control & PFIT_ENABLE) == 0) {
 		pfit_control = 0;
 		pfit_pgm_ratios = 0;
 	}
 
+	/* Make sure pre-965 set dither correctly for 18bpp panels. */
+	if (INTEL_INFO(dev)->gen < 4 && pipe_config->pipe_bpp == 18)
+		pfit_control |= PANEL_8TO6_DITHER_ENABLE;
+
 	pipe_config->gmch_pfit.control = pfit_control;
 	pipe_config->gmch_pfit.pgm_ratios = pfit_pgm_ratios;
 	pipe_config->gmch_pfit.lvds_border_bits = border;
Signature · 1 line
1.9.3
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Daniel Vetter

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 <[email protected]>

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
In reply to Daniel Vetter
Quoted 10 lines · Daniel Vetter

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.

Quoted 5 lines
Cc Jiri Kosina <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Hans de Bruin <[email protected]>

I have applied the patches and al looks well again.

Signature · 1 line
Hans