Bug 55508 - [SNA] Ivybridge Mobile (GT2) Rendering corruption in Gimp
Summary: [SNA] Ivybridge Mobile (GT2) Rendering corruption in Gimp
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
Depends on:
Reported: 2012-10-01 18:43 UTC by Roman Jarosz
Modified: 2012-10-02 10:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Gimp corruption (68.07 KB, image/png)
2012-10-01 18:44 UTC, Roman Jarosz
no flags Details
Xorg log (37.26 KB, text/plain)
2012-10-01 18:46 UTC, Roman Jarosz
no flags Details

Description Roman Jarosz 2012-10-01 18:43:32 UTC

using latest git source 51202798862c79ad417936cfe2d1847b1da4ab87 I see rendering corruption in Gimp's Change foreground color dialog with SNA acceleration.
Steps to reproduce:
1. Start Gimp
2. Click on the foreground color in menu (1)
3. Press mouse button on the color box and move with it (2)
4. The gray background is flickering instead of color palette.

Using KDE without composition.

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
Linux kedgelenovo 3.5.4 #2 SMP Sun Sep 30 11:26:29 CEST 2012 x86_64 Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz GenuineIntel GNU/Linux
Comment 1 Roman Jarosz 2012-10-01 18:44:06 UTC
Created attachment 67939 [details]
Gimp corruption
Comment 2 Roman Jarosz 2012-10-01 18:46:12 UTC
Created attachment 67940 [details]
Xorg log
Comment 3 Chris Wilson 2012-10-01 19:53:22 UTC
Hmm, quick test on the Arrandale machine I'm currently on and it works, with check IVB in two ticks...
Comment 4 Chris Wilson 2012-10-01 20:25:28 UTC
Not seeing on IVB either yet. What version of cairo are you using?
Comment 5 Roman Jarosz 2012-10-01 20:26:55 UTC
hm .... x11-libs/cairo-1.12.2-r4
Comment 6 Chris Wilson 2012-10-01 20:30:51 UTC
The critical element is the antiquated cairo-1.10. Ah for the multiple layers of unnecessary rendering ;-)
Comment 7 Chris Wilson 2012-10-01 20:31:59 UTC
1.12.2 how old! I was meant to make a new bugfix release many, many months ago. Anyway if 1.12.2 also shows the bug, that means that it isn't the bug I'm thinking of... Back to the drawing board and debug logs.
Comment 8 Chris Wilson 2012-10-01 20:48:17 UTC
So it is the new SHM upload paths that hides the issue here:

commit 0bfd2acd35547fc2bd0de99cc67d153f0170697d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Aug 13 01:34:12 2012 +0100

    xlib: Implement SHM fallbacks and fast upload paths
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

So presumably damage tracking in PutImage goes awry.
Comment 9 Roman Jarosz 2012-10-01 20:57:56 UTC
FYI I also saw some black window background instead of normal white in rdesktop (using Flex Builder)
Comment 10 Chris Wilson 2012-10-01 21:10:44 UTC
(In reply to comment #9)
> FYI I also saw some black window background instead of normal white in
> rdesktop (using Flex Builder)

Quite possibly related, this looks to be a nasty bug involving the CPU bo. Let me fix this first and we can see what remains.
Comment 11 Chris Wilson 2012-10-01 21:17:15 UTC
d4f7c58186849374cd929e20fa49ea2e93939a69 is the first bad commit
commit d4f7c58186849374cd929e20fa49ea2e93939a69
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Aug 26 17:01:55 2012 +0100

    sna/gen5+: Use the common methods for choosing the render targets
    This should afford us much more flexibility in where we render.
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 12 Chris Wilson 2012-10-02 10:46:50 UTC
Wowser, that should hopefully fix a few of the more mysterious bugs, thanks!

commit 0ae6c2ccb006a99e8d7bbfff77f98cc58f62ce2f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Oct 2 11:44:16 2012 +0100

    sna: Actually upload the damage when replacing a busy CPU bo for PutImage
    Reported-by: Roman Jarosz <kedgedev@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55508
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

As always, if you have any other sightings please keep on filing bugs.

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.