All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "drm/i915: Don't set the 8to6 dither flag when not scaling"
@ 2014-07-09 20:35 Daniel Vetter
  2014-07-09 21:57 ` Pavel Machek
  2014-07-10 19:57 ` Hans de Bruin
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-07-09 20:35 UTC (permalink / raw)
  To: Intel Graphics Development
  Cc: Daniel Vetter, stable, Hans de Bruin, Pavel Machek, Jiri Kosina

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
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_lvds.c  | 7 +++++++
 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 4d29a83fd163..7c71a8f3147c 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,
 
 	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))
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,
 		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;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Revert "drm/i915: Don't set the 8to6 dither flag when not scaling"
  2014-07-09 20:35 [PATCH] Revert "drm/i915: Don't set the 8to6 dither flag when not scaling" Daniel Vetter
@ 2014-07-09 21:57 ` Pavel Machek
  2014-07-10 19:57 ` Hans de Bruin
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2014-07-09 21:57 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Intel Graphics Development, Jiri Kosina, Hans de Bruin, stable

On Wed 2014-07-09 22:35:53, Daniel Vetter wrote:
> 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>

Acked-by: Pavel Machek <pavel@ucw.cz>
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Revert "drm/i915: Don't set the 8to6 dither flag when not scaling"
  2014-07-09 20:35 [PATCH] Revert "drm/i915: Don't set the 8to6 dither flag when not scaling" Daniel Vetter
  2014-07-09 21:57 ` Pavel Machek
@ 2014-07-10 19:57 ` Hans de Bruin
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Bruin @ 2014-07-10 19:57 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Jiri Kosina, Intel Graphics Development, stable, Pavel Machek

On 07/09/2014 10:35 PM, Daniel Vetter wrote:
> 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
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I have applied the patches and al looks well again.

-- 
Hans

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-10 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-09 20:35 [PATCH] Revert "drm/i915: Don't set the 8to6 dither flag when not scaling" Daniel Vetter
2014-07-09 21:57 ` Pavel Machek
2014-07-10 19:57 ` Hans de Bruin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.