Bug 4294

Summary: Colour corruption with ATI/Radeon driver
Product: xorg Reporter: Roger Leigh <rleigh>
Component: Driver/RadeonAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: high CC: alexdeucher, daronin, michel
Version: 6.8.2   
Hardware: PowerPC   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
screenshot1.png none

Description Roger Leigh 2005-08-29 14:14:52 UTC
Under certain circumstances, the Radeon driver corrupts colours on the screen. 
This is with a Radeon 9200 on an Apple Mac Mini (Freescale 7447A PowerPC G4),
under Linux 2.6.12 (with the radeon framebuffer also in use on the virtual
consoles, but not for X).  The platform is powerpc-unknown-linux-gnu (Debian
unstable)

A full description (and xorg.conf) is here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=318812

And another screenshot demonstrating the problem is here:
http://people.debian.org/~rleigh/Screenshot.png
(notice the yellowed text and icons, and the yellow lines surrounding GTK+
button and line borders, and the blue cursor streaks on the area around the
focussed window).

It looks like this gets triggered only for certain types of drawing operation,
or when a certain grab is in effect.  This might be an endianness issue?  So
far, I've only seen GTK+ applications misbehave, but that might not be relevant.

I'll be happy to do any further testing.

Regards,
Roger
Comment 1 Alex Deucher 2005-08-30 07:02:15 UTC
There are swapper problems with some accel routines.  do the following options help?

XaaNoScanlineImageWriteRect
XaaNoScanlineCPUToScreenColorExpandFill
Comment 2 Roger Leigh 2005-08-30 11:09:19 UTC
XaaNoScanlineImageWriteRect+XaaNoScanlineCPUToScreenColorExpandFill

Together: interesting yellowness on rectangle redraws under menus and all GTK+
menus are yellowed as you pass the pointer down them (when the prelight is
removed), but some smaller menus are already completely ywllow.  Text is still blue.

XaaNoScanlineCPUToScreenColorExpandFill
Only: Yellow lines + blue text.  This is the same as without the option.

XaaNoScanlineImageWriteRect:
Same as XaaNoScanlineImageWriteRect+XaaNoScanlineCPUToScreenColorExpandFill,
with excessive amounts of yellow.

It looks like XaaNoScanlineImageWriteRect makes things worse, and
XaaNoScanlineCPUToScreenColorExpandFill has no effect.
Comment 3 Roger Leigh 2005-08-30 11:10:03 UTC
Created attachment 3124 [details]
screenshot1.png
Comment 4 Michel Dänzer 2005-09-10 10:09:58 UTC
(In reply to comment #0)
> 
> And another screenshot demonstrating the problem is here:
> http://people.debian.org/~rleigh/Screenshot.png
> (notice the yellowed text and icons, and the yellow lines surrounding GTK+
> button and line borders, and the blue cursor streaks on the area around the
> focussed window).

What happens:

* without Option "SWcursor"
* with a value for the second port for Option "MonitorLayout", such as "TMDS,NONE"
* with working radeonfb in console, such that Option "UseFBDev" is actually
effective, or alternatively, without that option
* with depth 16 instead of 24
* without Option "DDCMode" "off"
* without Option "PanelSize"
* with Option "RenderAccel" "off"


(In reply to comment #1)
> There are swapper problems with some accel routines.

Only known ones with R300 class cards.
Comment 5 Roger Leigh 2005-09-14 10:28:21 UTC
This is fixed if I add

  Option "XaaNoOffscreenPixmaps"

to xorg.conf.  I had a dig in the source, but unlike other acceleration options,
this seemed to be scattered throughout the modules in the radeon directory
(xc/programs/Xserver/hw/xfree86/drivers/ati).  If anyone could explain which
files are relevant, I can take a look (though I know very little about X drivers).


Regards,
Roger
Comment 6 Roger Leigh 2005-09-14 11:03:44 UTC
The bug is not GTK+-specific.  I've also seen yellow text in an xterm after an
(I assume) expose event.
Comment 7 Michel Dänzer 2005-09-14 12:55:33 UTC
(In reply to comment #5)
> This is fixed if I add
> 
>   Option "XaaNoOffscreenPixmaps"
> 
> to xorg.conf.

I suspect that's a red herring. This option will probably just prevent a lot of
optimizations.

Have you tried any of the other experiments I asked for?

Does the card work fine in Mac OS?
Comment 8 Roger Leigh 2005-09-17 05:44:06 UTC
Here is the information as you requested:

* without Option "SWcursor"

- setting to "false" does remove corruption under the cursor;
  yellow/brown squares no longer appear.

* with a value for the second port for Option "MonitorLayout", such as "TMDS,NONE"

- No effect.

* with working radeonfb in console, such that Option "UseFBDev" is
  actually effective, or alternatively, without that option

- No effect.

* with depth 16 instead of 24

- Fixes corruption.

* without Option "DDCMode" "off"

- No effect.

* without Option "PanelSize"

- Fixes corruption.

* with Option "RenderAccel" "off"

- Fixes corruption.

Looking at the screenshot with the GIMP, the yellow and other colours are due to
the blue channel being 0.

Regards,
Roger
Comment 9 Michel Dänzer 2005-09-17 09:36:08 UTC
So, would not specifying Option "PanelSize" be an acceptable solution?
Comment 10 Roger Leigh 2005-09-17 10:01:51 UTC
That should be an acceptable workaround.

Thanks,
Roger
Comment 11 T. Hood 2005-09-25 04:30:56 UTC

*** This bug has been marked as a duplicate of 2164 ***
Comment 12 T. Hood 2005-09-26 03:53:10 UTC
*** Bug 3032 has been marked as a duplicate of this bug. ***

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.