Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Clifton <pcjc2@cam.ac.uk>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: Corruption in glxgears with Compiz
Date: Sat, 23 Oct 2010 04:35:46 +0100	[thread overview]
Message-ID: <1287804946.9701.3.camel@pcjc2lap> (raw)
In-Reply-To: <5b55a1$ien4q1@fmsmga002.fm.intel.com>

On Fri, 2010-10-22 at 20:29 +0100, Chris Wilson wrote:
> On Fri, 22 Oct 2010 20:10:44 +0100, Peter Clifton <pcjc2@cam.ac.uk> wrote:
> > As an additional data-point, with the bug manifesting, if you go to
> > "expose" mode, (Win+E for default config), you find the corruption is
> > absent. It only appears to be present when the glxgears window is not
> > scaled by the window manager.
> 
> My guess is that it is a double application of the drawable offset when
> doing a CopyRegion swapbuffers. Does the corruption move in relation to
> the window as it moves?
> 
> This suggests that [my] recent changes to the ddx are to blame, and
> certainly a bisection on -intel might help - though it's probably just as
> easy to test before the shadow+dri changes to confirm.
> -Chris

Lost of bisecting and backporting later.. and I've identified the bad
commit:

9220434a8768902cd9cf248709972678b74aa8c1 drm/i915: Only emit a flush
request on the active ring.

I'm not sure what the correct fix is, but a workaround is this:

Actually, I've not tested that yet.. oops. It certainly works with the
if(1) and if (obj->write_domain) bypassing the test for ... &
I915_GEM_GPU_DOMAIN. That wasn't enough alone though, it didn't work
until I changed:

-               if (flush_rings & RING_RENDER)
+               if (1)

Presumably some object is not getting the RENDER_RING added to the
flush_rings field correctly.



git diff HEAD^
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index cf27655..a9d528e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1901,7 +1901,9 @@ i915_gem_flush(struct drm_device *dev,
                drm_agp_chipset_flush(dev);
 
        if ((flush_domains | invalidate_domains) & I915_GEM_GPU_DOMAINS) {
-               if (flush_rings & RING_RENDER)
+//        if (1) {
+//             if (flush_rings & RING_RENDER)
+               if (1)
                        i915_gem_flush_ring(dev,
                                            &dev_priv->render_ring,
                                            invalidate_domains, flush_domains);
@@ -4197,6 +4199,7 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
                 * flush earlier is beneficial.
                 */
                if (obj->write_domain & I915_GEM_GPU_DOMAINS) {
+//             if (obj->write_domain) {
                        i915_gem_flush_ring(dev,
                                            obj_priv->ring,
                                            0, obj->write_domain);



-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)

  parent reply	other threads:[~2010-10-23  3:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 12:53 Corruption in glxgears with Compiz Peter Clifton
2010-10-22 13:39 ` Chris Wilson
2010-10-22 14:04   ` Alexey Fisher
2010-10-22 19:10   ` Peter Clifton
2010-10-22 19:29     ` Chris Wilson
2010-10-22 19:38       ` Peter Clifton
2010-10-22 20:41       ` Peter Clifton
2010-10-23  3:35       ` Peter Clifton [this message]
2010-10-23  4:07         ` Peter Clifton
2010-10-23  8:23           ` Alexey Fisher
2010-10-23  9:10           ` Chris Wilson
2010-10-23  9:43             ` Alexey Fisher
2010-10-23 10:07               ` Chris Wilson
2010-10-23 11:42             ` Peter Clifton
2010-10-23 17:48               ` Chris Wilson
2010-10-23 18:33                 ` Peter Clifton
2010-10-24 23:06                 ` Peter Clifton
2010-10-22 19:13   ` Peter Clifton

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=1287804946.9701.3.camel@pcjc2lap \
    --to=pcjc2@cam.ac.uk \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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