stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6.32+drm33-longterm] Patch "drm/i915: Attempt to fix watermark setup on 85x (v2)" has been added to staging queue
@ 2012-06-25 11:50 Stefan Bader
  2012-06-26  4:14 ` [2.6.32.y] drm/i915: Attempt to fix watermark setup on 85x (v2) Jonathan Nieder
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Bader @ 2012-06-25 11:50 UTC (permalink / raw)
  To: Adam Jackson
  Cc: Eric Anholt, Jonathan Nieder, Stefan Bader, linux-kernel, stable

This is a note to let you know that I have just added a patch titled

    drm/i915: Attempt to fix watermark setup on 85x (v2)

to the drm-next branch of the 2.6.32+drm33-longterm tree which can be found at

  http://git.kernel.org/?p=linux/kernel/git/smb/linux-2.6.32.y-drm33.z.git;a=shortlog;h=refs/heads/drm-next
  or
  http://kernel.ubuntu.com/git?p=smb/linux-2.6.32.y-drm33.z.git;a=shortlog;h=refs/heads/drm-next

If you, or anyone else, feels it should not be added to the drm33-longterm tree,
please reply to this email not later than 8 days after this email was sent.

Thanks.
-Stefan

------

>From 8f4695ed1c9e068772bcce4cd4ff03f88d57a008 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 16 Apr 2010 18:20:57 -0400
Subject: [PATCH] drm/i915: Attempt to fix watermark setup on 85x (v2)

IS_MOBILE() catches 85x, so we'd always try to use the 9xx FIFO sizing;
since there's an explicit 85x version, this seems wrong.

v2: Handle 830m correctly too.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>

BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661696
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
(cherry-picked from commit 8f4695ed1c9e068772bcce4cd4ff03f88d57a008 upstream)
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 drivers/gpu/drm/i915/intel_display.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e7356fb..c7502b6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4853,17 +4853,18 @@ static void intel_init_display(struct drm_device *dev)
 		dev_priv->display.update_wm = g4x_update_wm;
 	else if (IS_I965G(dev))
 		dev_priv->display.update_wm = i965_update_wm;
-	else if (IS_I9XX(dev) || IS_MOBILE(dev)) {
+	else if (IS_I9XX(dev)) {
 		dev_priv->display.update_wm = i9xx_update_wm;
 		dev_priv->display.get_fifo_size = i9xx_get_fifo_size;
+	} else if (IS_I85X(dev)) {
+		dev_priv->display.update_wm = i9xx_update_wm;
+		dev_priv->display.get_fifo_size = i85x_get_fifo_size;
 	} else {
-		if (IS_I85X(dev))
-			dev_priv->display.get_fifo_size = i85x_get_fifo_size;
-		else if (IS_845G(dev))
+		dev_priv->display.update_wm = i830_update_wm;
+		if (IS_845G(dev))
 			dev_priv->display.get_fifo_size = i845_get_fifo_size;
 		else
 			dev_priv->display.get_fifo_size = i830_get_fifo_size;
-		dev_priv->display.update_wm = i830_update_wm;
 	}
 }

--
1.7.9.5


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

* [2.6.32.y] drm/i915: Attempt to fix watermark setup on 85x (v2)
  2012-06-25 11:50 [2.6.32+drm33-longterm] Patch "drm/i915: Attempt to fix watermark setup on 85x (v2)" has been added to staging queue Stefan Bader
@ 2012-06-26  4:14 ` Jonathan Nieder
  2012-06-26 16:21   ` Willy Tarreau
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2012-06-26  4:14 UTC (permalink / raw)
  To: Willy Tarreau
  Cc: Stefan Bader, Lukas Anzinger, Adam Jackson, Eric Anholt,
	Chris Wilson, linux-kernel, stable

From: Adam Jackson <ajax@redhat.com>
Date: Fri, 16 Apr 2010 18:20:57 -0400

commit 8f4695ed1c9e068772bcce4cd4ff03f88d57a008 upstream.

IS_MOBILE() catches 85x, so we'd always try to use the 9xx FIFO sizing;
since there's an explicit 85x version, this seems wrong.

v2: Handle 830m correctly too.

[jn: backport to 2.6.32.y to address
 https://bugzilla.kernel.org/show_bug.cgi?id=42839]

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Hi Willy,

Lukas Anzinger wrote[1]:

> I've encountered a nasty bug in the drm/i915 part of Debian's stable kernel.
> The code is also present in 2.6.33.20, which is the latest stable upstream
> release of 2.6.33.y at the time of writing.
>
> During a refactoring of the i915 driver a regression has been introduced
> (commit e70236a8d3d0a4c100a0b9f7d394d9bda9c56aca): For some chipsets the wrong
> fifo size is determined which results in lot's of pixel errors when starting
> the xserver and choosing 800x600 as a resolution. If another resolution is used
> (eg. 1024x768 or 1280x1024), I don't encounter this problem.

Linux 2.6.32.y is presumably also affected because the problematic
commit was applied during the 2.6.32 merge window.

 e70236a8d3d0 "drm/i915: split display functions by chip type",
              2009-09-21

Lukas tested the fix against a kernel with 2.6.33.y-based drm
subsystem and found it to work:

 8f4695ed1c9e drm/i915: Attempt to fix watermark setup on 85x (v2),
              2010-04-16

and therefore Stefan is staging this fix for 2.6.32.y+drm33.z
(thanks!).  Newer stable lines work fine already because the fix hit
mainline in v2.6.34-rc6.

The patch applies cleanly to v2.6.32.59 and is included below for
reference.  I don't know if anyone has tested it there, though.  All I
can say for now is that it is tested against 2.6.33-based kernels and
looks obviously correct.  What do you think?

Hope that helps,
Jonathan

[1] https://bugzilla.kernel.org/show_bug.cgi?id=42839

 drivers/gpu/drm/i915/intel_display.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 79cc437af3b8..25b3e903c67c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4355,17 +4355,18 @@ static void intel_init_display(struct drm_device *dev)
 		dev_priv->display.update_wm = g4x_update_wm;
 	else if (IS_I965G(dev))
 		dev_priv->display.update_wm = i965_update_wm;
-	else if (IS_I9XX(dev) || IS_MOBILE(dev)) {
+	else if (IS_I9XX(dev)) {
 		dev_priv->display.update_wm = i9xx_update_wm;
 		dev_priv->display.get_fifo_size = i9xx_get_fifo_size;
+	} else if (IS_I85X(dev)) {
+		dev_priv->display.update_wm = i9xx_update_wm;
+		dev_priv->display.get_fifo_size = i85x_get_fifo_size;
 	} else {
-		if (IS_I85X(dev))
-			dev_priv->display.get_fifo_size = i85x_get_fifo_size;
-		else if (IS_845G(dev))
+		dev_priv->display.update_wm = i830_update_wm;
+		if (IS_845G(dev))
 			dev_priv->display.get_fifo_size = i845_get_fifo_size;
 		else
 			dev_priv->display.get_fifo_size = i830_get_fifo_size;
-		dev_priv->display.update_wm = i830_update_wm;
 	}
 }
 
-- 
1.7.11.rc3


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

* Re: [2.6.32.y] drm/i915: Attempt to fix watermark setup on 85x (v2)
  2012-06-26  4:14 ` [2.6.32.y] drm/i915: Attempt to fix watermark setup on 85x (v2) Jonathan Nieder
@ 2012-06-26 16:21   ` Willy Tarreau
  0 siblings, 0 replies; 3+ messages in thread
From: Willy Tarreau @ 2012-06-26 16:21 UTC (permalink / raw)
  To: Jonathan Nieder
  Cc: Stefan Bader, Lukas Anzinger, Adam Jackson, Eric Anholt,
	Chris Wilson, linux-kernel, stable

Hi Jonathan,

On Mon, Jun 25, 2012 at 11:14:58PM -0500, Jonathan Nieder wrote:
> From: Adam Jackson <ajax@redhat.com>
> Date: Fri, 16 Apr 2010 18:20:57 -0400
> 
> commit 8f4695ed1c9e068772bcce4cd4ff03f88d57a008 upstream.
> 
> IS_MOBILE() catches 85x, so we'd always try to use the 9xx FIFO sizing;
> since there's an explicit 85x version, this seems wrong.
> 
> v2: Handle 830m correctly too.
> 
> [jn: backport to 2.6.32.y to address
>  https://bugzilla.kernel.org/show_bug.cgi?id=42839]

(...)

Thank you, I've queued it for 2.6.32.60.

Best regards,
Willy


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

end of thread, other threads:[~2012-06-26 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 11:50 [2.6.32+drm33-longterm] Patch "drm/i915: Attempt to fix watermark setup on 85x (v2)" has been added to staging queue Stefan Bader
2012-06-26  4:14 ` [2.6.32.y] drm/i915: Attempt to fix watermark setup on 85x (v2) Jonathan Nieder
2012-06-26 16:21   ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).