Arch Linux x86_64 Thinkpad X220t (SNB) xf86-video-intel ffbe0aa (TearFree enabled) xorg-server 1.15.1 linux 3.14.5 Reproduced with Firefox 30.0b9 or 31.0a2. Does not happen in 29.0. 1. Navigate to a large image, like http://upload.wikimedia.org/wikipedia/commons/4/4b/Chicago_-_skyline.JPG 2. Wait for the image to load completely 3. Click the image to zoom 1:1 4. Hit Ctrl++ (Control Plus) to zoom in once 5. Hit Ctrl+0 to reset zoom 6. Scroll vertically, quickly 7. Observe the image corrupting Corruption does not happen if gfx.xrender.enabled is disabled. Might be related to bug #79516.
The first bad commit is 6530141 (sna: Discard active GPU buffers before uploading into them)
Hmm, that looked safe.
If you apply diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 2513b8b..fcf354e 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4556,7 +4556,7 @@ try_upload_tiled_x(PixmapPtr pixmap, RegionRec *region, return false; } - if (priv->gpu_damage && + if (priv->gpu_damage && 0 && region_subsumes_damage(region, priv->gpu_damage)) { if (UNDO) kgem_bo_undo(&sna->kgem, priv->gpu_bo); that will disable one chunk of that patch. Does the corruption still occur?
Idea: diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 2513b8b..18195d8 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4564,7 +4564,8 @@ try_upload_tiled_x(PixmapPtr pixmap, RegionRec *region, DBG(("%s: discarding dirty pixmap\n", __FUNCTION__)); sna_pixmap_free_gpu(sna, priv); } - replaces = true; /* Mark it all GPU damaged afterwards */ + replaces = (priv->cpu_damage == NULL || + region_subsumes_damage(region, priv->cpu_damage)); } if (priv->gpu_bo == NULL &&
The first patch removes the corruption, the second does not.
Although, with the second patch the corruption looks less severe. Just misplaced parts from other areas of the scrolled image and occasional large black regions. Unpatched, there are also noisy regions and parts from outside the scrolled area.
Created attachment 100342 [details] [review] Only promote an upload to the GPU if there is no CPU damage Can you test this one? Although it is starting to look like a revert is preferable.
Scratch that. Silly idea.
Created attachment 100345 [details] [review] Slight variation.
Nope, no luck yet.
Nothing concrete yet, I am trying to understand my fail before killing it. In the meantime, I've applied some slight tweaks to the neighbouring code paths. commit 8297c969ae749ef58d259b2ded2231b928efba43 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jun 3 09:47:27 2014 +0100 sna: Replace the bo for tiled uploads if not suitable and being replaced Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> commit 1c55d0447dba5bbde5be3903b273e04e3c9d084f Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jun 3 12:43:51 2014 +0100 sna: Allow replacements to cancel operations between both bo under a Pixmap Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> commit a82bfb033448eb61bf8cc7f5358be019f0cc28e6 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jun 3 09:28:24 2014 +0100 sna: Discard unwanted damage when promoting to a full CPU migration Signed-off-by: Chris Wilson <chris@chris-wilson.co.u
Have you had a chance to see if today's tree changed the frequency / pattern?
Also comparing drm-intel-nightly would be useful.
Ah. Should be fixed by: diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index f77b4c6..70211eb 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4602,6 +4602,10 @@ try_upload_tiled_x(PixmapPtr pixmap, RegionRec *region, kgem_bo_can_map__cpu(&sna->kgem, priv->gpu_bo, true))); sna_pixmap_free_gpu(sna, priv); ignore_cpu = priv->cpu_damage == NULL; + if (priv->ptr) + sna_damage_all(&priv->cpu_damage, + pixmap->drawable.width, + pixmap->drawable.height); } }
As this patch does do something, https://bugs.freedesktop.org/show_bug.cgi?id=79529#c7 I have gone ahead and pushed it under the assumption that it is indeed the correct fix! Please double check. :)
Fixed indeed. Thank you.
(In reply to comment #15) > Please double check. :) Unfortunately, I can still reproduce this bug in git master. Sample image: http://download.tuxfamily.org/glxdock/mediacolor/album3/1403352600_48bf3dcde4.jpg Screenshot: http://i.imgur.com/cbnRP3r.png Screencast: http://youtu.be/SJCja1bfeNw
Probably not the same bug then...
Darn, bisection pointed at 65301412ecf2d55ab55a2d7faeaa048d4ee8b1d0, then I found this bug report. What's interesting, it's fine with a image mentioned by Jan, or with Raleigh gtk theme.
Just want add that this commit... From 25776547bb7d76010f948769c8c08a7f418b15fd Mon Sep 17 00:00:00 2001 From: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon, 23 Jun 2014 13:02:51 +0000 Subject: sna: Prefer rendering on the CPU to avoid damage migration made this corruptions much more subtle. screenshot: http://i.imgur.com/kJfKzf1.png Please let me know, if it's indeed a different bug, and I should fill new bug report for better tracking.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.