Log in


March 2015
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

airlied [userpic]
testing modesetting on radeon...

So if you are feeling like testing modesetting on radeon cards, here are some methods.

a) Install Fedora rawhide - remember nomodeset on the kernel commandline disables it.

b) get some repos.

You need to do a full kernel build for this stuff.

git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-rawhide
git://git.freedesktop.org/git/mesa/drm.git modesetting-gem
If you already have a kernel with GEM bits in it (i.e. rawhide or you have intel stuff - you can
pull this repo and build the kernel modules with make OS_HAS_GEM=1 radeon.o

git://people.freedesktop.org/~airlied/xf86-video-ati radeon-gem-cs
git://people.freedesktop.org/~airlied/mesa r300-bufmgr

If you don't care about 3D you can ignore the mesa tree. You need to build a kernel and choose the radeon drm,
and you can enable modesetting by default. You need to build libdrm from the modesetting-gem branch, and
you need to build the ati driver against it. 3D only works with r300->r500 and even there has some bugs. 2D X.org may not work with render accel on r100/r200 as I need to add a lot of commands to the verifier.

In theory rebooting into the kernel should give you modesetting.

So far the systems I've tested this on are:

RV530 FireGL in a Thinkpad T60P - LVDS + VGA
R580 X1900XTX - DVI + VGA
RS690 - VGA
RV370 in laptop - LVDS + VGA

RN50 - vga - no render/3D
RV100 - tmds - no render/3D

RV250 on SIS AGP - DVI (Internal/External TMDS) + VGA - no render/3D

So the two areas with problems most likely are AGP and LVDS. and I'm sure r420/rv410 will throw some curve balls as the usually do.

If you are using Rawhide and/or enable modesetting by default you can add the "nomodeset" to the kernel
command line to disable it.

To debug bootup hangs etc you can

1. boot with command line options "nomodeset 3"
2. rmmod radeon drm
3. modprobe drm debug=1
4. modprobe radeon modeset=1

see if you get an oops.. you can fire the dmesg off to me if you want as well, an Xorg.0.log from a working -ati
on the same machine may also help.

I'll hopefully get some radeontool tests available to find regressions.


Are there any drawbacks from using this (like performance regressions, unimplemented features that work in the current architecture), of course not talking about potential bugs?

Re: drawbacks

Currently the main things are getting suspend/resume reliable again, and 3D is probably not as fast as it was before, as we need to re-write quite a lot of it.

an R600 (M76) ain't an option, right?

libdrm outdated?

xf86-video-ati doesn't compile, it passes 9 arguments to drmModeAddFB, but this expects only 8?
(also, had to use libdrm headers from the kernel, since the libdrm ones also had some things missing) Suggestions?

Alternative to Rawhide?

Is there an alternative to using the whole rawhide kernel? I had some trouble building the modules and the firmware stuff and I really don't want to have to dig into how Fedora does things to get that figured out.

Thanks, by the way, for working on this. Radeon support has really come a long way in the two and a half years I've had one. Performance increase is incredible. Keep up the good work.

Re: Alternative to Rawhide?

Patched that additional argument out and got it to compile.

I managed to start X, it even worked, but looked very funny. Half of the letters were missing and the background image was scaled to twice the size it should be. Also, sometimes the mouse cursor was very, very huge. And it did stutter a lot, including the mouse cursor.

This is an X1400 (in a T60), which is supported nicely including 3D by Mesa 7.1 (r500).


kms works fine, i get 1680x1050 mode on insmod radeon.ko modeset=1 but -ati radeon-gem-cs doesn't build.

radeon_memory.c: In function ‘radeon_bind_memory’:
radeon_memory.c:25: error: ‘struct drm_radeon_gem_pin’ has no member named ‘pin_domain’
radeon_memory.c:27: error: ‘struct drm_radeon_gem_pin’ has no member named ‘pin_domain’
make[2]: *** [radeon_memory.lo] Error 1

libdrm from modesetting-gem commit 9f9f171f8e0ad817414e6218b44579171d03cec0
xf86-video-ati from ~airlied radeon-gem-cs commit d17edbde5879b1aeb0ecd8ba9878d83cd76de2ce

I've just pushed the fix to the headers for libdrm.

Really the way it is meant to work is the kernel installs those headers not libdrm, currently libdrm is still doing it which is bad.


Ok, with the latest fixes i got it working. It sets the mode at boot, X starts, I login and the wallpaper starts about ~30% of the height from the top. The panels etc look ok. When i move the cursor to the top of the screen, it disappears. xrandr output looks interesting:

$ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 1680 x 1680, maximum 1680 x 1680
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1400x1050 60.0
1280x1024 60.0
1280x960 60.0
1024x768 60.0
800x600 60.3
640x480 59.9

And any time i open a window like firefox or gnome-terminal, it thinks a little and tries to detect outputs according to dmesg.

Exciting :)

GTK+ bug

I think it's a GTK+ bug, it asks the server to reprobe the video outputs each time an application is started


Kernel oops for me

I have a nice oops with modesetting on (my screen display flashy color for few seconds too). You can get it here http://www.kerneloops.org/raw.php?rawid=60433 (this new tool is really handy !)

With option "nomodeset", it boots normally. I can provide a Xorg0.log if it's necessary (is it useful for you when nomodeset is set ?).

Info: Fedora Rawhide up-to-date + RV350 + Nforce2 chip + AthlonXP cpu


Re: Kernel oops for me

Think I should add that's a ATI Technologies Inc RV350 AP [Radeon 9600] AGP card with a CRT display (1280x1024).

Mobility Radeon X300 / LVDS

Works great!