Full EXA composite support for R3xx/R4xx/R5xx chips

As some of you have probably heard, I’ve been working on adding full support for EXA composite for R3xx-R5xx cards. Well, as of last night, it lives. R3xx/R4xx support is pretty solid although there are some blend combinations that still need to be debugged. RS690 works, but only after running a 3D app like gears first. R5xx support works on some chips, but not on others, probably along the same lines as textured video. I think both may be related to the number of raster pipes that should be enabled for each chip. I haven’t merged it into master yet, but you can grab it from the r3xx-render branch of xf86-video-ati. To check it out:

git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati
cd xf86-video-ati
git checkout -b r3xx-render origin/r3xx-render

Update: The new render code has been merged to ati git master.

39 Responses to “Full EXA composite support for R3xx/R4xx/R5xx chips”

  1. Torsten Says:

    Just cloned it.
    And my system still “works”.
    It seems most of my icons get corrupted and a significant number of solid rectangle fills only get executed as solid triangle fills. But text and many other things work correctly.
    And scrolling still feels as fast as with XAA. Definitely a step in the right direction. Thanks!

    My hardware:
    01:00.0 VGA compatible controller: ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)]

  2. lk Says:

    Tested. It works well. “Well” means:
    - xcompmgr/render_bench is way faster,
    - text rendering (text selecting in browser) is slower,
    - everything else looks like master.
    Didn’t reboot yet.

    Hardware: RV410/AGP bridge.

  3. lk Says:

    Ah, yes. Torsten may be right — scrolling may be faster. Or it’s just placebo.

  4. agd5f Says:

    If you get weird solid triangles instead of a proper image run textured video first. That seems to “fix” render.

  5. agd5f Says:

    This should be fixed now it git.

  6. kbps Says:

    01:05.0 VGA compatible controller: ATI Technologies Inc RC410 [Radeon Xpress 200M]

    works, but no Direct Rendering…

    kbps@gentoo ~ $ cat /var/log/Xorg.0.log|grep WW
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (WW) Duplicate core pointer devices. Removing core pointer attribute from “TouchPad”
    (WW) The directory “/usr/share/fonts/TTF/” does not exist.
    (WW) The directory “/usr/share/fonts/OTF” does not exist.
    (WW) RADEON(0): Direct rendering for RN50/RC410/RS485/R600 forced on — This is NOT officially supported at the hardware level and may cause instability or lockups
    (WW) RADEON(0): LCD DDC Info Table found!
    (WW) RADEON(0): LVDS Info:
    (WW) RADEON(0): Cannot read colourmap from VGA. Will restore with default
    (WW) RADEON(0): Direct rendering disabled
    (WW) RADEON(0): Option “OpenGLOverlay” is not used
    (WW) RADEON(0): Option “VideoOverlay” is not used
    (WW) RADEON(0): Option “DPI” is not used

  7. kbps Says:

    and composite works well!

  8. fuoco Says:

    I built this in ubuntu and installed. I have a r300 based card, radeon 9550 in an iBook G4.
    I am not sure I notice a difference compared to before. Am I looking for something specific in the log to see that exa is more effective?

  9. agd5f Says:

    Make sure you switch to using EXA:
    Option “AccelMethod” “EXA”

    The desktop in general should feel faster and non-3D compositers like xcompmgr will perform much better, especially stuff like alpha blending.

  10. fuoco Says:

    yeah I’ve been using EXA for some time and it’s enabled.
    I’m using compiz - so it’s not supposed to be faster?
    Scrolling in firefox doesn’t seem to be faster now

  11. agd5f Says:

    Compiz uses 3D via OpenGL, so you won’t see much difference there.

  12. kbps Says:

    Yeah! It’s realy very very fast composite!
    I tried xcompmgr -cCfF and xfwm4 compositor :)

    in /etc/X11/xorg.conf
    Driver “ati”
    Option “AccelMethod” “EXA”

    kbps@gentoo ~ $ cat /var/log/Xorg.0.log|grep -i EXA
    (**) RADEON(0): Option “AccelMethod” “EXA”
    (**) RADEON(0): Using EXA acceleration architecture
    (II) Loading sub module “exa”
    (II) LoadModule: “exa”
    (II) Loading /usr/lib/xorg/modules//libexa.so
    (II) Module exa: vendor=”X.Org Foundation”
    (==) RADEON(0): Not using accelerated EXA DownloadFromScreen hook
    (II) EXA(0): Offscreen pixmap area of 128040960 bytes
    (II) EXA(0): Driver registered support for the following operations:

  13. fuoco Says:

    I thought that even with compiz EXA is what draws the inside of windows? am i wrong? when compiz is running everything is drawn with 3d? even when scrolling in firefox for example?

  14. agd5f Says:

    I’m not sure. I’m not that familiar with how compiz does drawing for what.

  15. Torsten Says:

    Even just running glxgears fixes the triangle vs. rectangle problem in my old version (didn’t have the time to update yet).

    But I noticed some other bug: After switching to the console and back to X I can no longer start glxgears (but the icons stay fixed):
    $ glxgears
    drmRadeonCmdBuffer: -22

    @lk: No the difference in scrolling is not just a placebo.
    But calling my calling it just ’scrolling’ might be misleading.

    If I use EXA with 6.8.0 scrolling in konqueror is just horrible slow. But I think that it might really be the scrolling that is so slow, but the rendering of the lines of text.
    With the new version from git this ’scrolling’ and/or text rendering is just as fast with EXA that it is with XAA. It is a very visible difference, and that was the cause for the big “Thanks!” to agd5f.

  16. Torsten Says:

    PS: current version does fix the icon/triangle bug for me, but not the console switching bug.

    Each time I try to start glxgears after coming back from the console the following lines get put into the kernel log:
    [drm:r300_emit_carefully_checked_packet0] *ERROR* Offset failed range check (reg=4e28 sz=1)
    [drm:r300_do_cp_cmdbuf] *ERROR* r300_emit_packet0 failed

  17. agd5f Says:

    The VT switch is already fixed in git master. Once the render changes get merged to master, that will be fixed.

  18. paul Says:

    I’m trying this on a Mobility X1400 and it’s a bit sluggish compared to fglrx 8.3, but workable.

    Using these in xorg.conf:

    Driver “radeon”
    Option “DRI” “true”
    Option “ColorTiling” “on”
    Option “EnablePageFlip” “true”
    Option “AccelMethod” “EXA”
    Option “RenderAccel” “true”

    but Xorg.0.log still shows no DRI:

    paul :/var/log$ grep EE Xorg.0.log
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (II) Loading extension MIT-SCREEN-SAVER
    (EE) RADEON(0): [dri] RADEONDRIGetVersion failed to open the DRM

    paul :/var/log$ grep WW Xorg.0.log
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (WW) The directory “/usr/share/fonts/X11/cyrillic” does not exist.
    (WW) `fonts.dir’ not found (or not valid) in “/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType”.
    (WW) RADEON(0): R500 support is under development. Please report any issues to xorg-driver-ati@lists.x.org
    (WW) RADEON(0): LVDS Info:
    (WW) RADEON(0): Direct rendering disabled
    (WW) Configured Mouse: No Device specified, looking for one…

    paul :/var/log$ grep -i aiglx Xorg.0.log
    (==) AIGLX enabled
    (II) AIGLX: Screen 0 is not DRI capable

    When I try compiz I just get a white screen. Is this supposed to support compiz?

  19. agd5f Says:

    Compiz requires 3D support which is not yet available on R5xx cards. You’ll also need a newer DRM to use the CP.

  20. Xav Says:

    Testing on r300 under compiz, it works flawlessly. It seems epiphany is faster at rendering complex web pages, but it’s subjective.

  21. paul Says:

    Question on getting a newer DRM .. I’m trying to follow the wiki build instruction at http://dri.freedesktop.org/wiki/Building

    After building it, I notice the libdrm/Changelog hasn’t been updated since Mar 14, 2006. Is this the “newer” version you’re suggesting?

  22. agd5f Says:

    Ignore the Changelog, it’s out of date. the git commit log is what you want:

  23. Torsten Says:

    VT-Switch-Bug: I just assumed that this was introduced by the render support. If it is already know (and already fixed!): no problem.

    But I must correct myself: The icon/triangle issue is not fixed.

    After using glxgears to fix it, the card will stay fixed with a X restart or even a complete system reboot. But if I do a cold start its broken again.

    (Crappy initialization in my BIOS?)

  24. Chris Rankin Says:

    Does anyone else notice any weird desktop corruption when using the driver option:

    MigrationHeuristic “greedy” ?

    I enabled this option before because EXA was so much slower than XAA on my Radeon 9550 (with xf86-video, both 6.8.0 and git). It did speed EXA up, but it also caused some strange issues when redrawing regions:


    Images in my browser are also corrupted; it’s like they are being redrawn starting from the wrong offset.

  25. agd5f Says:

    Torsten: make sure you are using git master. the VT switch bug should be fixed.

    Chris: are you using AccelDFS as well?

  26. Torsten Says:

    My priorities are exactly opposite.
    As I normally don’t need the other VTs, it was just pure chance that I even noticed this bug. And I just wanted to report it, in case you did not know about this. (But you already did…)

    But without the new render acceleration the scrolling in (for example) Konqueror is unusable slow. So I’m staying with the r3xx-render branch, “even” if I need to run glxgears after each cold boot.

    I only wanted to you to know, that there is still something missing in the initialization, at least on my card.

  27. agd5f Says:

    the r3xx-render branch has been merged to ati git master, that should fix all the problems you are having.

  28. Torsten Says:

    Switching to the ati git master did indeed fix everything. :-)

  29. Chris Rankin Says:

    Yes, I was using AccelDFS. But disabling AccelDFS again hasn’t made the slightest bit of difference either, so I’m guessing it isn’t that.

  30. paul Says:

    OK, I’ve finally upgraded my drm and mesa to git versions, but now when I enable EXA, my desktop starts but freezes as soon as I try to do anything. The keyboard, mouse and screen are dead. Have to reboot. And, although EXA is enabled, DRM still fails to be enabled.

    I’m trying this on Ubuntu 8.04 beta, which uses a patched version of xorg 1.4.0.

    I have a Mobility X1400 (aka M54P).

    Any suggestions?

  31. paul Says:

    I should also mention that this mix of xorg 1.4 with mesa and drm git and xf86-video-ati git all still work fine under XAA acceleration .. I’m using that right now.


  32. agd5f Says:

    Paul, I’m not sure how well the non-CP composite paths work on all r5xx chips. You’ll probably have more luck once you get the drm enabled.

  33. Mark Says:

    I have RS690 and have 2 problems

    - I have resolution of 1920×1200 (DVI) and my screen goes blank randomly for several seconds. Is there a solution for this (If I use rX550, no problems -> switching back)

    - The latest git version seems to be much slower when Composite is disabled (I haven’t tried enabling it yet) than one in FC9 rawhide

    - although Xv works fine unless the window is partially covered (on the left side), clipping seems to subtract from both sides although only one is covered.

  34. agd5f Says:

    Mark: I’ll need to see your xorg log. Can you file a bug and attach your log and config?

  35. paul Says:

    Now have it working here after getting the correct kernel modules. Everything is quick here on EXA. Thanks for the great work.

  36. Mark Says:

    bug 15175

  37. Peter Says:

    I’ve got an ATI Radeon X1200 (ChipID = 0×791e) running on Ubuntu Hardy. After having compiled all needed drivers and modules all was running indeed very quick. Even Google-Earth was running fine after disabling V.Sync (otherwise it’s unbearable slow) and the “low-impact fallback”.

    However, there were quite severe drawing errors in some apps (Synaptic for instance) and i’ve experienced system-freezes very often (of the reset-button kind).

    Keep up the excellent work!

  38. Fast text: use a single cache pixmap « fishsoup Says:

    […] single cache pixmap A couple of weeks ago Dave Airlie pointed out to me that Alex Deucher had added RENDER extension acceleration for R3xx/R5xx to the Radeon EXA driver. Seeing an opportunity to have a desktop that was both composited and […]

  39. ati radeon x1200 driver Says:

    ati radeon x1200 driver…

    What PSU would be good for a Diamond Radeon HD 4890 graphics card? Can anyone tell me more about ati radeon x1200 driver?…