Bug 18398

Summary: Form check-box corruption in Firefox [Human GTK-theme, EXA enabled]
Product: xorg Reporter: Bryce Harrington <bryce>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high CC: oyvind
Version: 7.4 (2008.09)   
Hardware: All   
OS: Linux (All)   
URL: https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/291045
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log none

Description Bryce Harrington 2008-11-05 14:27:48 UTC
Created attachment 20090 [details]
Xorg.0.log

Forwarding this EXA bug from a Ubuntu tester:
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/291045

[Problem]
Slight corruption in Firefox widgets when scrolling under Compiz with EXA enabled.

[Original report]
When scrolling a web page in Firefox that has check-boxes in a form, I frequently observe slight graphics corruption under some of the check-boxes. The corruption is typically black pixels. Hovering mouse over affected check-boxes makes it go away (presumably because this triggers a high-light redraw).

Xorg driver in use is xserver-xorg-video-radeon git20081003.f9826a56-0ubuntu2.
EXA-acceleration is enabled.
Ubuntu 8.10 (fully updated, installed from RC).
Compiz is enabled.
GTK theme is Human (Ubuntu default).
Graphics card: ATI X1400 mobile radeon (R500), 128MB RAM.

If more information is needed, please say so. I am also willing and able to test new GIT-snapshots of the radeon driver, and provide feedback if problems are fixed, etc.

[Screenshot of corruption]
http://launchpadlibrarian.net/19073271/checkbox-corruption-firefox-gtk-human.png

[lspci]
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon Mobility X1400 [1002:7145]
	Subsystem: Lenovo Device [17aa:202a]
(Full lspci:  http://launchpadlibrarian.net/19073276/lspci-vvnn.txt)
Comment 1 Alex Deucher 2008-11-05 16:51:45 UTC
does:
Option "AccelDFS" "False"
or
Option "RenderAccel" "False"
help?
Comment 2 Øyvind Stegard 2008-11-06 03:15:23 UTC
By disabling accelerated DFS _only_, this problem seems to vanish. At least I was not able to reproduce it, and it triggers easily otherwise. I did not try disabling Xrender-acceleration, because AccelDFS=false fixed it. However, disabling DFS-acceleration makes Compiz-desktop slower (more lags, and as far as I'm able to tell, slightly more motion-tearing).
Comment 3 Øyvind Stegard 2008-11-06 03:23:47 UTC
By only disabling Xrender-acceleration (leaving accelerated DFS enabled), the problem does *not* go away. So AccelDFS must be the key.

Disabling Xrender-acceleration actually causes artifacts in Firefox-tabs (immediately visible by switching between them) and I observed persistent leftovers from the resize-highlight-region in Compiz, after having resized a window. Seems things are more stable (and faster) with render-acceleration than without :).
Comment 4 Øyvind Stegard 2008-11-06 03:26:44 UTC
There are actually artifacts on many more GTK-widgets (in Firefox) without render-acceleration. Drop-down boxes are only partly painted after becoming visible as a result of scrolling, but a widget redraw in general fixes things up.
Comment 5 Øyvind Stegard 2008-11-06 03:38:16 UTC
Forget the observation about increased tearing, false alarm. Sometimes my mind plays tricks on me.
Comment 6 Alex Deucher 2008-11-06 13:01:59 UTC

*** This bug has been marked as a duplicate of bug 18399 ***
Comment 7 Øyvind Stegard 2009-01-09 07:45:44 UTC
I'm not sure this bug should be marked as duplicate of bug 18399, because this problem still occurs frequently with latest radeon GIT, while bug 18399 does not (at least I am unable to reproduce).
Comment 8 Danny 2009-03-22 01:46:07 UTC
Something like the following always fixes 99% of the corruption issues i'm seeing with radeon:
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -401,7 +401,7 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x, int y, int w, int h,
      * blitting the bits to one half while copying them out of the other one and
      * then swapping the halves.
      */
-    if (info->accelDFS && bpp != 24 && RADEONGetDatatypeBpp(bpp, &datatype) &&
+    if (info->accelDFS && bpp != 24 && w>32 && RADEONGetDatatypeBpp(bpp, &datatype) &&
        RADEONGetPixmapOffsetPitch(pSrc, &src_pitch_offset) &&
        (scratch = RADEONCPGetBuffer(pScrn)))
     {


I guess it is obvious why; For small pixmaps things are already used before they are completely there.

Comment 9 Alex Deucher 2009-03-22 10:33:40 UTC
In your case is is probably a dupe of bug 18397.
Comment 10 Danny 2009-03-24 00:13:32 UTC
right. That's correct. I even see i made a small comment there before.
Comment 11 Aron Hsiao 2009-11-29 10:22:42 UTC
(In reply to comment #8)
> Something like the following always fixes 99% of the corruption issues i'm
> seeing with radeon:
> --- a/src/radeon_exa_funcs.c
> +++ b/src/radeon_exa_funcs.c
> @@ -401,7 +401,7 @@ FUNC_NAME(RADEONDownloadFromScreen)(PixmapPtr pSrc, int x,
> int y, int w, int h,
>       * blitting the bits to one half while copying them out of the other one
> and
>       * then swapping the halves.
>       */
> -    if (info->accelDFS && bpp != 24 && RADEONGetDatatypeBpp(bpp, &datatype) &&
> +    if (info->accelDFS && bpp != 24 && w>32 && RADEONGetDatatypeBpp(bpp,
> &datatype) &&
>         RADEONGetPixmapOffsetPitch(pSrc, &src_pitch_offset) &&
>         (scratch = RADEONCPGetBuffer(pScrn)))
>      {
> 
> 
> I guess it is obvious why; For small pixmaps things are already used before
> they are completely there.
> 

Just discovered this. Am running Fedora 12 and was experiencing small pixmap corruption, which then bled into things like corruption in Firefox's places.sqlite (bookmarks) database, via stored favicons that had been corrupted. Grrr.

Hand-applied Danny's patch above to xorg-x11-drv-ati-6.13.0-0.11.20091119git437113124.fc12.src.rpm from the Fedora 12 repository and the corruption issue has been resolved with no apparent decline in stability or performance.

Can no longer duplicate corruption in places where I could always immediately reproduce before (i.e. by loading Slashdot front page and scrolling Firefox up and down past the poll options).

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.