Bug 26076

Summary: Transparent GNOME panel corruption with EXA
Product: xorg Reporter: matty <pseudomatty>
Component: Server/Acceleration/EXAAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: minor    
Priority: medium CC: kai.kasurinen, madman2003, mschmidt
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg log none

Description matty 2010-01-16 06:26:05 UTC
R600, using today's git HEAD of x.org, DRI, radeon etc on kernel 2.6.33rc4-git2 with KMS enabled.

The areas of my GNOME panel which are normally transparent are drawn mostly black, with small amounts of apparently random garbage in them.
Comment 1 matty 2010-01-16 06:30:49 UTC
Created attachment 32667 [details]
Xorg log

X.org log with KMS enabled that leads to corruption of transparent objects.
Comment 2 Maarten Maathuis 2010-01-16 09:27:19 UTC
This is probably a xserver bug, an exa bug to specific.
Comment 3 matty 2010-01-16 15:46:58 UTC
Correction: the panel is semi-transparent when it works - not fully transparent. Ie it's alpha blending, rather than just not drawing parts of the panel.

Semi-transparent (alpha blended) GNOME Terminal windows are drawn correctly both with and without KMS.
I expected they would work or fail identically to the transparent panel.
Is there some interesting difference between these two cases?

Sorry, I'm still not sure which component to select here. Perhaps someone else could re-assign?

I've built everything correctly from git. I'm a C programmer, but I've little experience with X development.
If someone gave me some guidance as to the structure of the relevant code, I might be able to debug this myself.
In the meantime I'm going to go study the EXA source and try and figure it out for myself.
Comment 4 Maarten Maathuis 2010-01-16 16:24:45 UTC
I'll attempt to reassign :-)
Comment 5 Maarten Maathuis 2010-01-16 16:28:00 UTC
As far as i know the problem originates here: http://cgit.freedesktop.org/xorg/xserver/tree/exa/exa_accel.c#n475

This srcregion is used for migration optimization and is somehow incorrect or triggering a bug elsewhere. This happens to be the only case where a src region is passed. You can try setting to NULL to confirm it's the same bug.

I've looked at it, but i'm puzzled what exactly is wrong. I just wanted to say this isn't really a dri bug.
Comment 6 Maarten Maathuis 2010-01-16 16:28:42 UTC
Forgot to reassign to default.
Comment 7 matty 2010-01-17 01:59:56 UTC
Firstly, I've switched from 2.6.33-rc4-git2 to airlied's drm-radeon-testing, so I can git pull it in future.

That hasn't made any visible difference either to this behaviour or anything else. Logs all look the same apart from kernel version.

You mean:
pixmaps[1].pReg = NULL;
right?

I'll give that a go now and post results.
Comment 8 matty 2010-01-17 03:12:53 UTC
Ok, I stupidly made two changes at once.
Making that change and updating everything using git pull has resulted in this behaviour going away.

So now I'll revert that change, omit git pull this time, rebuild, and confirm that that re-introduces the broken transparency.
Comment 9 matty 2010-01-17 03:45:23 UTC
Yep, garbage is back. So I can confirm that change fixes this behaviour.
Comment 10 Michal Schmidt 2010-01-21 01:36:41 UTC
Removing "R600 KMS" from Summary. Users of Fedora 12 are seeing this bug with other Radeons and with nouveau too:

https://bugzilla.redhat.com/show_bug.cgi?id=552741
https://bugzilla.redhat.com/show_bug.cgi?id=555734
https://bugzilla.redhat.com/show_bug.cgi?id=555316
http://forums.fedoraforum.org/showthread.php?p=1318167

I applied the change Maarten suggested and I can confirm it works. I have an RS690.
Here's a Fedora RPM scratch build with the change applied:
http://kojipkgs.fedoraproject.org/scratch/michich/task_1934138/
Comment 11 Maarten Maathuis 2010-01-21 01:40:12 UTC
I should point out the real issue needs to be found, this is merely a workaround for identifying the issue.
Comment 12 Michal Schmidt 2010-02-22 00:53:21 UTC
An upcoming Fedora 12 X server update (https://admin.fedoraproject.org/updates/xorg-x11-server-1.7.5-2.fc12) which contains Maarten Maathuis's patch "exa/mixed: fix gnome-panel corruption" (Message-Id: <1266357336-18965-1-git-send-email-madman2003@gmail.com>) fixes the bug for me.
Comment 13 Michel Dänzer 2010-02-23 04:53:48 UTC
Maarten's fix has finally landed in xserver Git.

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.