Created attachment 42732 [details] Screenshot of xterm corruption after running quake3 I get urxvt/xterm after several runnings of fullscreen GL apps when PageFlip is enabled. I am testing it usually using quake3, but it was very annoying when appeared after some xscreensavers and I had to run xfce Terminal or restart Xorg(killing many apps/webbrowser). This bug probably appeared after adding real PageFlip to xf86-video-ati. Using system xorg-driver-video-ati-6.13.2-3.x86_64 resolves the problem(but probably its not real PageFlip, but buffer-copying). Disabling ColorTiling reduces bug appearance(probably), but the only solution with xf86-video-ati from master, is to explicitly disable PageFlip, or use UMS. Using system/gallium/mesa libGL doesnt change anything, only ddx/PageFlip matters. ArtiFacts appears mostly in and around xterm/urxvt(text is totally smashed/unreadable), but other apps like gnome/xfce Terminals, WebKit/Gecko and others webbrowsers are very little affected and still fully usable. I am using PLD Th (2.99/3.0) with 64bit kernel/userspace(multilib) on 15" IBM ThinkPad T60p UXGA(1600x1200) FlexView with FireGL 5200(r500/Radeon X1600), core2duo T7200 and 4GB RAM, nearly identical to airlied one(except he's not 64bit capable), and I didnt tested 32bit. But maybe somebody else got 64bit system and r500.
This is because radeon_bo_set_tiling is never called with RADEON_TILING_SURFACE for the DRI2 back buffers used for page flipping. When an app using page flipping quits, there's a 50/50 chance of ending up with the good or bad BO backing up the screen pixmap. Haven't had time to work out a proper solution yet.
Created attachment 42753 [details] [review] handle tiling using dfs/uts like r6xx+ Does this patch fix the issues?
I see similar corruption but with rs780. The patch does not fix the issue here, but makes it worse. Instead of the screen corruptions, I see heavy flicker now and later a hard lock.
@Alex Deucher: Really thanks. Your patch (nearly)definitely fixed xterm/urxvt corruptions on mine r500. I am still getting few red stripes above wm decorations(fluxbox with grey/red theme) on root window in empty and with webbrowser workspaces(that disappear and reappear after switc. There are still sometimes artifacts in urxvt after scrolling some text, but they disappear after switching workspace. So not fully, but problem is mostly fixed ;)
(In reply to comment #4) > @Alex Deucher: Really thanks. Your patch (nearly)definitely fixed xterm/urxvt > corruptions on mine r500. I am still getting few red stripes above wm > decorations(fluxbox with grey/red theme) on root window in empty and with > webbrowser workspaces(that disappear and reappear after switc. There are still > sometimes artifacts in urxvt after scrolling some text, but they disappear > after switching workspace. > So not fully, but problem is mostly fixed ;) Can you get a picture of the corruption with the patch applied?
> Can you get a picture of the corruption with the patch applied? Its rather big 12MB MNG assebled from 35MB of PNG's(dumped using scrot in while true; sleep 0.2 ;) But you can always convert it to PNG's using advmng(which I used to assemble it) http://carme.pld-linux.org/~evil/radeon/pageflip_corruptions.mng AS you can see especially Opera is affected(unlike WebKit/Gecko/Dillo) and image viewers (XV,gThumb,EOG), so I was forced to disable PageFlip to be able to watch pr0n (Xv is not affected, but I got much more images ;)
Review of attachment 42753 [details] [review]: ::: src/radeon_exa_funcs.c @@ +601,3 @@ copy_src = driver_priv->bo; copy_pitch = pSrc->devKind; + if (!(tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) { This block needs to be extended to include the following if statements operating on src_domain. RADEONUploadToScreenCS() probably needs similar treatment as well.
Created attachment 42813 [details] [review] new patch This patch should fix up the issues on both pre-6xx and r6xx+.
looks perfect! thanks!
Created attachment 42844 [details] [review] new patch against master I've gone ahead and committed the r6xx+ portion of the patch. Attached is the fix for pre-r6xx asics against ati git master. If it fixes your issue, I'll go ahead and commit it.
(In reply to comment #10) > Attached is the fix for pre-r6xx asics against ati git master. If it fixes > your issue, I'll go ahead and commit it. The patch basically looks good to me, but for some reason it doesn't work on my PowerBook. Weirdly, it looks like the 'first few' operations work correctly, but then it quickly falls apart. Haven't figured out what's going on yet.
(In reply to comment #10) > Created an attachment (id=42844) [details] > new patch against master > > I've gone ahead and committed the r6xx+ portion of the patch. Attached is the > fix for pre-r6xx asics against ati git master. If it fixes your issue, I'll go > ahead and commit it. I am out of battery, but I started ~10 times quake3, playing between them urxvt/iceweasel/opera w/o seeing any artifacts, so its probably fixed for r500 :) So you can apply it upstream. I will report there if I will see any artifacts, if problem will reappear after longer using machine,, but I hope it wont. So thx all for fixing it :D
(In reply to comment #11) > The patch basically looks good to me, but for some reason it doesn't work on my > PowerBook. Weirdly, it looks like the 'first few' operations work correctly, > but then it quickly falls apart. Haven't figured out what's going on yet. Does it look like endian problems?
(In reply to comment #13) > Does it look like endian problems? No, actually it seems to be an xserver EXA bug when updating the screen pixmap pitch. Go ahead and push the fix.
Pushed: bb16dd77321e5a64a3cb2d2ca9982117799ac1a8 ef9bfb262db7004bef3704e5d914687e50d3fca4
ef9bfb262db7004bef3704e5d914687e50d3fca4 broke on RV410. I get corruption (also outside window) with xterm and eog unless I revert that commit. Looks similar to bug 33918.
(In reply to comment #16) > ef9bfb262db7004bef3704e5d914687e50d3fca4 broke on RV410. I get corruption (also > outside window) with xterm and eog unless I revert that commit. Looks similar > to bug 33918. I think that Alex shouldnt revert that patch yet, but wait for other reports with gfx chips they use and results. And reverting only that one will bring back(Leroy Brown;) identical problem to r500(and some other chip's user).
(In reply to comment #16) > ef9bfb262db7004bef3704e5d914687e50d3fca4 broke on RV410. I get corruption (also > outside window) with xterm and eog unless I revert that commit. Looks similar > to bug 33918. You might be hitting the EXA bug mentioned in comment 14.
(In reply to comment #16) > ef9bfb262db7004bef3704e5d914687e50d3fca4 broke on RV410. I get corruption (also > outside window) with xterm and eog unless I revert that commit. Looks similar > to bug 33918. I think I've got the same issue with ATI Mobility Radeon X1400. git bisect told me that this commit is the first bad one. If I disable ColorTiling, everything looks fine. (In reply to comment #14) > (In reply to comment #13) > > Does it look like endian problems? > > No, actually it seems to be an xserver EXA bug when updating the screen pixmap > pitch. Go ahead and push the fix. Is this a guess, or do you know which bug?
(In reply to comment #19) > > I think I've got the same issue with ATI Mobility Radeon X1400. git bisect told > me that this commit is the first bad one. > If I disable ColorTiling, everything looks fine. > > Is this a guess, or do you know which bug? Please try the patch on bug 33929.
(In reply to comment #20) > (In reply to comment #19) > > > > I think I've got the same issue with ATI Mobility Radeon X1400. git bisect told > > me that this commit is the first bad one. > > If I disable ColorTiling, everything looks fine. > > > > Is this a guess, or do you know which bug? > > Please try the patch on bug 33929. That works. Thanks.
Just bisected the fatal error issue "Driver failed PrepareAccess on a pinned pixmap" when startig xterm or switching to Linux console (xorg-server 1.6.5 with xf86-video-ati 6.14.2). The bad commit is commit ef9bfb262db7004bef3704e5d914687e50d3fca4 Author: Alex Deucher <alexdeucher@gmail.com> Date: Tue Feb 1 19:24:44 2011 -0500 kms/pre-6xx: fix pageflipping with tiling Use UTS/DFS to tile/untile as appropriate for sw access on pre-6xx. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33738 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Setting Option "ColorTiling" "off" is usable as workaround, whereas setting Option "EnablePageFlip" "off" does not help. This is with a Radeon XPRESS 200M 5975 aka RS482 (1002:5975), so I believe still something R3xx based (KMS with kernel 3.0).
(In reply to comment #22) > Option "ColorTiling" "off" > > is usable as workaround, [...] KMS ColorTiling cannot work with an X server that doesn't support EXA_MIXED_PIXMAPS. I pushed http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=fcf0cca9c0ab0f692b222f619aee8f1cdad3b519 to address this.
Thanks, Michel. Your git commit fixes the issue.
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.