The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Theodore Tso <tytso@mit.edu>
Cc: "Carlos R. Mafra" <crmafra2@gmail.com>,
	Eric Anholt <eric@anholt.net>,
	linux-kernel@vger.kernel.org, Keith Packard <keithp@keithp.com>
Subject: Re: 2.6.32 regression (bisected): Video tearing/glitching with T400 laptops
Date: Tue, 13 Oct 2009 10:01:35 -0700	[thread overview]
Message-ID: <20091013100135.2b3d914f@jbarnes-g45> (raw)
In-Reply-To: <20091013023146.GA8414@mit.edu>

On Mon, 12 Oct 2009 22:31:46 -0400
Theodore Tso <tytso@mit.edu> wrote:

> On Mon, Oct 12, 2009 at 12:05:10PM -0700, Jesse Barnes wrote:
> > On Mon, 12 Oct 2009 20:46:51 +0200
> > "Carlos R. Mafra" <crmafra2@gmail.com> wrote:
> > 
> > > On Mon 12.Oct'09 at  9:54:38 -0700, Jesse Barnes wrote:
> > > > > 
> > > > > Nope, unfortunately, it's not helping on my T400 laptop.  I'm
> > > > > still getting huge amounts of glitching and tearing with this
> > > > > patch applied against -rc3.
> > > > > 
> > > > > What I'm using for now to fix up my system is this patch.
> > > > > 
> > > > 
> > > > How about this one?  I have one more idea to try out if this
> > > > doesn't work (hacking on it now).
> > > 
> > > I was also experiencing something very similar to Theodore's bug 
> > > report and, at least for me, the patch below fixed the issue (the
> > > previous one also had no effect).
> > 
> > Cool, good to hear.  Hopefully Ted and Keith will confirm too.
> 
> Hmm, the amount of tearing seems to be a bit less frequent, but it's
> definitely still happening with this patch applied.  Sorry....

Arg, I'm running out of ideas...  How about this hack?  I'll chat with
the chipset guys to see if we can figure out what's going on here...

-- 
Jesse Barnes, Intel Open Source Technology Center

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 0466ddb..d5ec112 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -352,13 +352,24 @@
 
 #define FBC_LL_SIZE		(1536)
 
-/* Framebuffer compression for GM45+ */
+/*
+ * Framebuffer compression for GM45+
+ *
+ * GM45+ support tracking of a back buffer for use with page flipping.
+ * In this case, the "persistent" bit should be set and both nuke disable
+ * bits should be set as well.  The back buffer is tracked by setting the
+ * HT fence bit in the chicken bit reg and pointing the CPU fence at the
+ * back buffer for tracking.
+ */
 #define DPFC_CB_BASE		0x3200
 #define DPFC_CONTROL		0x3208
 #define   DPFC_CTL_EN		(1<<31)
 #define   DPFC_CTL_PLANEA	(0<<30)
 #define   DPFC_CTL_PLANEB	(1<<30)
 #define   DPFC_CTL_FENCE_EN	(1<<29)
+#define   DPFC_CTL_CSNUKE_DIS	(1<<27)
+#define   DPFC_CTL_MMIONUKE_DIS	(1<<26)
+#define   DPFC_CTL_PERSISTENT	(1<<25)
 #define   DPFC_SR_EN		(1<<10)
 #define   DPFC_CTL_LIMIT_1X	(0<<6)
 #define   DPFC_CTL_LIMIT_2X	(1<<6)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7a5fb79..ea808a9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2441,6 +2441,8 @@ static void g4x_update_wm(struct drm_device *dev, int unused, int unused2,
 	else
 		fw_blc_self &= ~FW_BLC_SELF_EN;
 	I915_WRITE(FW_BLC_SELF, fw_blc_self);
+	I915_WRITE(DSPFW1, (8 << 23) | (8 << 16) | (8 << 8) | (8 << 0));
+	I915_WRITE(DSPFW2, (1 << 31) | (8 << 28) | (8 << 8) | (8 << 0));
 }
 
 static void i965_update_wm(struct drm_device *dev, int unused, int unused2,

  reply	other threads:[~2009-10-13 17:02 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
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 [this message]
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=20091013100135.2b3d914f@jbarnes-g45 \
    --to=jbarnes@virtuousgeek.org \
    --cc=crmafra2@gmail.com \
    --cc=eric@anholt.net \
    --cc=keithp@keithp.com \
    --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