The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Eric Anholt <eric@anholt.net>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.32 regression (bisected): Video tearing/glitching with T400 laptops
Date: Mon, 5 Oct 2009 13:47:26 -0700	[thread overview]
Message-ID: <20091005134726.58370f89@jbarnes-g45> (raw)
In-Reply-To: <E1Mtqnb-0002x7-TJ@closure.thunk.org>

On Fri, 02 Oct 2009 18:40:27 -0400
"Theodore Ts'o" <tytso@mit.edu> wrote:

> Hi, 
> 
> In recent kernels, my X display (running with a KMS-enabled X server)
> has been very jittery and with lots of glitching and tearing --- sorry
> if this isn't the correct technical term, not sure what it is --- on
> my T400 Lenovo laptop.   It seems related to what is on the desktop,
> and moving the mouse does seem to affect the rate and percentage of
> the screen which jitters --- which is enough to be very distracting,
> although I can still read the contents of the windows where the screen
> is tearing/glitching/flashing.
> 
> I bisected it down to this commit:
> 
> 74dff282237ea8c0a5df1afd8526eac4b6cee063 is the first bad commit
> commit 74dff282237ea8c0a5df1afd8526eac4b6cee063
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date:   Mon Sep 14 15:39:40 2009 -0700
> 
>     drm/i915: framebuffer compression for GM45+
>     
>     Add support for framebuffer compression on GM45 and above.
> Removes some unnecessary I915_HAS_FBC checks as well (this is now
> part of the FBC display function).
>     
>     Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>     Signed-off-by: Eric Anholt <eric@anholt.net>
> 
> ... and taking the latest git mainline, and I confirmed that the
> problem was still present, and then after reverting this commit, the
> problem went away.
> 
> I've included my Xorg.0.log file in case that's helpful.  Please let
> me know if there's anything else you need.

I still haven't seen this issue myself, so I'm not sure if this patch
will help.  I think it's a necessary one nonetheless though.

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 6035d3d..5dd5354 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -342,6 +342,7 @@ typedef struct drm_i915_private {
 	u32 savePFIT_CONTROL;
 	u32 save_palette_a[256];
 	u32 save_palette_b[256];
+	u32 saveDPFC_CB_BASE;
 	u32 saveFBC_CFB_BASE;
 	u32 saveFBC_LL_BASE;
 	u32 saveFBC_CONTROL;
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index bd6d8d9..660c5f3 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -437,10 +437,14 @@ void i915_save_display(struct drm_device *dev)
 	/* FIXME: save TV & SDVO state */
 
 	/* FBC state */
-	dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE);
-	dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE);
-	dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2);
-	dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL);
+	if (IS_GM45(dev)) {
+		dev_priv->saveDPFC_CB_BASE = I915_READ(DPFC_CB_BASE);
+	} else {
+		dev_priv->saveFBC_CFB_BASE = I915_READ(FBC_CFB_BASE);
+		dev_priv->saveFBC_LL_BASE = I915_READ(FBC_LL_BASE);
+		dev_priv->saveFBC_CONTROL2 = I915_READ(FBC_CONTROL2);
+		dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL);
+	}
 
 	/* VGA state */
 	dev_priv->saveVGA0 = I915_READ(VGA0);
@@ -511,10 +515,16 @@ void i915_restore_display(struct drm_device *dev)
 	/* FIXME: restore TV & SDVO state */
 
 	/* FBC info */
-	I915_WRITE(FBC_CFB_BASE, dev_priv->saveFBC_CFB_BASE);
-	I915_WRITE(FBC_LL_BASE, dev_priv->saveFBC_LL_BASE);
-	I915_WRITE(FBC_CONTROL2, dev_priv->saveFBC_CONTROL2);
-	I915_WRITE(FBC_CONTROL, dev_priv->saveFBC_CONTROL);
+	if (IS_GM45(dev)) {
+		g4x_disable_fbc(dev);
+		I915_WRITE(DPFC_CB_BASE, dev_priv->saveDPFC_CB_BASE);
+	} else {
+		i8xx_disable_fbc(dev);
+		I915_WRITE(FBC_CFB_BASE, dev_priv->saveFBC_CFB_BASE);
+		I915_WRITE(FBC_LL_BASE, dev_priv->saveFBC_LL_BASE);
+		I915_WRITE(FBC_CONTROL2, dev_priv->saveFBC_CONTROL2);
+		I915_WRITE(FBC_CONTROL, dev_priv->saveFBC_CONTROL);
+	}
 
 	/* VGA state */
 	I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL);

  parent reply	other threads:[~2009-10-05 20:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02 22:40 2.6.32 regression (bisected): Video tearing/glitching with T400 laptops Theodore Ts'o
2009-10-02 22:44 ` Jesse Barnes
2009-10-04 13:43 ` Arkadiusz Miskiewicz
2009-10-05 20:47 ` Jesse Barnes [this message]
2009-10-08 17:36 ` Jesse Barnes
2009-10-10 20:41   ` Theodore Tso
2009-10-12 16:54     ` Jesse Barnes
2009-10-12 18:46       ` Carlos R. Mafra
2009-10-12 19:05         ` Jesse Barnes
2009-10-13  2:31           ` Theodore Tso
2009-10-13 17:01             ` Jesse Barnes
2009-10-13 19:00               ` Theodore Tso
2009-10-13 19:14                 ` Jesse Barnes
2009-10-14 21:22                   ` Jesse Barnes
2009-10-15  2:26                     ` Theodore Tso
2009-10-15  4:02                       ` Theodore Tso
2009-10-19  1:04                         ` Jesse Barnes
2009-10-19  1:15                           ` Jesse Barnes
2009-10-21  4:48                             ` Theodore Tso
2009-10-26  7:25                             ` Paul Rolland
2009-10-27 16:37                             ` Johan Hovold
2009-10-15 15:30                       ` Jesse Barnes
2009-10-15  1:23               ` Theodore Tso
2009-10-13 19:19           ` Fabio Comolli
2009-10-13 19:25             ` Jesse Barnes
2009-10-13 20:03               ` Fabio Comolli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091005134726.58370f89@jbarnes-g45 \
    --to=jbarnes@virtuousgeek.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox