PDA

View Full Version : Any timeline on RadeonHD 3D/Xv support?


fatfatwolf
04-01-2008, 01:23 AM
First let me apologize for my impatience... I like RadeonHD driver a lot. It's clean, fast and stable. However, currently I have to stay with fglrx driver since I can only use x11 output to watch video, and it gets very slow if I try to read a webpage with a lot of flash animations. It has been some time since last exciting git commit (EXA 2D acceleration) in radeonhd, and people keep talking about "it's not very difficult to port radeon 3D part into radeonhd". So, is there any time line we could follow? Or any "hidden" progress we did not catch? :p

airlied
04-01-2008, 02:25 AM
what card have you got? if you have an R500 try radeon.

If you have R600, well radeonhd won't get 3D/Xv support before radeon and radeon won't get it until the docs are released + a few months to figure out how it actually works.

fatfatwolf
04-01-2008, 02:34 AM
In fact I tried radeon, but it keeps hard lock my laptop if I enable "EXA". The xv output somehow requires that option so it's kind of dilemma...

BTW, I have a X1300 on Lenovo T60

airlied
04-01-2008, 04:08 AM
I'm working on this at the moment, it dies on my rv515 card here, so I'll hopefully get something in the next couple of days.

airlied
04-01-2008, 05:19 AM
actually you probably tried it without loading a drm.

The non-drm cases aren't that well tested...

fatfatwolf
04-01-2008, 10:12 AM
actually you probably tried it without loading a drm.

The non-drm cases aren't that well tested...

I think that actually IS the case...

I'm gonna pull the latest mesa git and try again...

bridgman
04-01-2008, 11:29 AM
You probably want mesa/mesa *and* mesa/drm - there have been recent changes in both.

fatfatwolf
04-06-2008, 06:08 PM
Just installed drm/mesa from git and it solved the problem. That's great~~~ Thanks guys for your hard work!!!

Kano
04-06-2008, 08:52 PM
Are the changes in mesa 7.0.3?

bridgman
04-06-2008, 09:23 PM
The changes are in the mesa/drm master but I don't think drm is included in the mesa release.

I believe the actual mesa/mesa R5xx 3D support is still off in a branch, so it would not be in 7.03.

fatfatwolf
04-07-2008, 11:20 AM
The changes are in the mesa/drm master but I don't think drm is included in the mesa release.

I believe the actual mesa/mesa R5xx 3D support is still off in a branch, so it would not be in 7.03.

Right, for git mesa master or 7.0.3, R5xx 3D is not supported, but we can use Xv just fine. :)

bridgman
04-07-2008, 12:31 PM
Yep. Xv only uses code from the X driver and drm, not from mesa.

elenius
04-13-2008, 02:22 AM
Is 3D supposed to work with Radeon on R500? I have an x1400. I only get software libGL support. I have the latest radeon from git as of today, and mesa + drm from two days ago. Here's some diagnostics:

elenius@elenius-laptop:~$ dmesg | grep drm
[ 45.782753] [drm] Initialized drm 1.1.0 20060810
[ 45.857535] [drm] Initialized radeon 1.28.0 20060524 on minor 0
[ 47.478703] [drm] Setting GART location based on new memory map
[ 47.480072] [drm] Loading R500 Microcode
[ 47.480143] [drm] writeback test succeeded in 2 usecs
elenius@elenius-laptop:~$ grep -i "Direct rendering" /var/log/Xorg.0.log
(II) RADEON(0): Direct rendering enabled
elenius@elenius-laptop:~$ export LIBGL_DEBUG=verbose
elenius@elenius-laptop:~$ glxinfo
name of display: :0.0
libGL: XF86DRIGetClientDriverName: 5.3.0 r300 (screen 0)
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/r300_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
unknown chip id 0x7145, can't guess.
libGL error: InitDriver failed
libGL error: reverting to (slow) indirect rendering

bridgman
04-13-2008, 09:07 AM
Git masters for radeon and drm are good for R5xx 3D, but you still need to get mesa/mesa from airlied's R500 branch :

http://cgit.freedesktop.org/~airlied/mesa/log/?h=r500test

You might still have to add your chip ID in order to be recognized -- Dave only put a couple of R5xx IDs in the code himself.

adamk
04-13-2008, 10:13 AM
How does one go about checking out that mesa version? I ran 'git clone git://cgit.freedesktop.org/~airlied/mesa', but git-log in the newly created mesa directory doesn't show any updates since April of 2007, so I'm assuming I have to checkout a particular branch, correct?

Adam

bridgman
04-13-2008, 10:37 AM
Yes, I believe you need the "r500test" branch.

adamk
04-13-2008, 10:52 AM
Maybe I just don't know git well enough... I thought 'git-checkout r500test' would be enough, but that gives me:

error: pathspec 'r500test' did not match any file(s) known to git.
Did you forget to 'git add'?

bridgman
04-13-2008, 11:07 AM
I certainly don't know git well enough either... yet.

Does the following (Michael's IRC advice to someone else trying to do the same) help ?

"michaellarabel: git-clone the airlied branch and then change directories to drm or mesa and then do: git-checkout -b r500test origin/r500test"

adamk
04-13-2008, 12:05 PM
That did it :-) Thanks! I owe you a beer next time you're in southern NJ.

Adam

adamk
04-13-2008, 12:37 PM
Heh, I may have to wait a bit to try again. The mesa driver builds, but GL apps fail with:

libGL warning: 3D driver returned no fbconfigs.
libGL warning: 3D driver returned no fbconfigs.
libGL error: InitDriver failed
libGL error: reverting to (slow) indirect rendering
glxgears: Error: couldn't get an RGB, Double-buffered visual.

So I figured that I might need to build an x server from around the same time as the last commit to the r500 branch (March 21st), so I reset to a commit from the 20th, but that fails to build :-)

Kano
04-13-2008, 12:42 PM
I guess only glxgears runs not more.

adamk
04-13-2008, 12:46 PM
I guess only glxgears runs not more.

That's what I tested with :-) It does not work with a recent build of the xserver from git.

EDIT: I don't think I did a "make clean" before trying to build the xserver, so I'm trying again now.

Adam

bridgman
04-13-2008, 01:07 PM
Some more possibly useful info. Note that you should be able to use DRM from master :

11:23 #radeon: < MostAwesomeDude> (giving credit where appropriate)

Okay. All the r500 guys trying to get direct gears, lemme post my technique.

1) Uninstall your distro's Mesa. Trust me, it's not worth it.

2) Go grab your git trees. You'll want the latest master of xf86-video-ati, and airlied's DRM and Mesa trees.
The branch on airlied's Mesa tree is called r500test, and the branch on the DRM tree is called r500-fp. If you want, you can merge the main masters over those after you get them; the important part is that you have those branches merged.

3) Build and install. Configure them all with "--prefix=/usr" so the linker finds them correctly. (If this bricks you (and it might), you'll want a LiveCD handy so you can reinstall the old Mesa.)

You should confirm that CONFIG_DRM is set to "m" (modules) in your kernel. If not, follow your distro's procedure for getting a custom kernel set up.

Finally, go to the linux-core directory in your DRM tree, and make and install there to get your kernel modules set up.

Now, there's a few r500 chip ids already in Mesa. If yours isn't in there ("unknown chip id" error,) you'll have to add it.

Add your chip in radeon_chipset.h as a PCI_CHIP_RV530 or PCI_CHIP_R520 depending on which it is, and then add it to the massive switch statement in radeon_screen.c, above the "R520 detected" statement.

Rebuild and reinstall Mesa, and then enjoy direct glxinfo and direct glxgears. It really is that easy.
("Easy", as usual, is relative.)

bridgman
04-13-2008, 01:13 PM
If the problems persist, you might want to post on #dri-devel or #radeon and see who's up there. Airlie is away for the weekend IIRC but a few other people have been working with the code as well.

sundown
04-13-2008, 01:34 PM
Jesus, will it be that hard on radeonhd as well? :eek:

BTW, I also get "unknown chip id" with radeon and glxgears is also "reverting to (slow) indirect rendering" on my mobility radeon. How much r500 is radeon ;)?

I guess that's why my videos still tear, but I ain't going through all that uninstalling and git mesa stuff either, sorry :(.

bridgman
04-13-2008, 02:03 PM
Development will be just as hard, but the code will be shared between radeon and radeonhd. That's why we're starting early ;)

The only r500-specific acceleration code in radeon is for EXA and Textured Video. Anything to do with 3D is mostly in mesa/mesa and mesa/drm, and will be used by both radeon and radeonhd.

The only reason we can't use radeonhd for R5xx 3D work today is that it doesn't yet have the "DRI support" required to use the drm, which is a pre-requisite for running the mesa 3d code. Getting dri support into radeonhd is top priority right now. Once that is in place, the 3d code won't care whether it is running with radeon or radeonhd.

If you mean "will getting it running on my system be just as hard ?" the answer is no, whether radeon or radeonhd. Right now the code still in early development and all effort is going into making it work with no attempt to make it easy to use. Until the code hits "master" you should consider it as experimental.

re: tearing, that's probably something unrelated. If you are using radeon and textured video (xv output, using a textured video xv port) and your video is tearing a tiny bit, that will probably persist until we start syncing the video playback pipe to vsync (in drm, I think). If the tearing is really bad, pls post back 'cause it may be something in the textured video accel code.

I should mention that *all* of the R5xx acceleration code using the 3d engine (even EXA and Textured Video) is only a few weeks old and is still under development. Until you see the code included in a release it's still cooking.

sundown
04-13-2008, 02:27 PM
Oh, thanks, for the encouraging reply, John. :)

About the tearing, no, it's tiny, but noticeable compared to my former Windows experience.

adamk
04-13-2008, 02:42 PM
Hmmm... No luck so far. I got the X server from git on March 17th to build, and now I don't get the Double-buffered visual error, but instead I get a segfault. :-)

I'll keep poking around and let you guys know how I make out.

Adam

adamk
04-13-2008, 04:22 PM
Well I've done all I can today, I think. I've managed to get past the segfault (caused by *not* adding my PCI ID to the appropriate files) but I still get various "3D driver claims to not support visual ..." errors, ultimately ending with "Error: Unsupported depth 0... exiting"

I can't really complain, though, as I more-or-less didn't expect anything to work anyway :-)

Adam

bridgman
04-13-2008, 11:17 PM
Dave Airlie just made a fix in xserver which *might* (and I stress might) be worth pulling down before you try again.

agd5f
04-14-2008, 01:50 AM
The newer mesa code in git (including Dave's r500 branch) requires a more recent xserver from git. Since this branch happened during the dri2 merge, there's still a lot of fall out on both sides (mesa and xserver) to get everything working correctly again. Unfortunately, that is what makes it tough to get a working combination to test the r500 mesa code. Once dri2 settles, things will get easier. The r500 changes are pretty self contained, so it should be relatively easy to port them back to an older version of mesa or to sync up the latest changes in mesa master. For now your best bet is to keep up with the latest xserver from git.

adamk
04-14-2008, 04:07 AM
For now your best bet is to keep up with the latest xserver from git.

Well I had been using an xserver pulled and built on Thursday. It didn't even occur to me that it needed something newer :-) I might give it a shot later.

Adam

bridgman
04-14-2008, 07:28 AM
Normally you wouldn't, but these are interesting times ;)