There has been a ton of post regarding getting the brand new R300 driver working in Gentoo so I collected the advice that had been given on the subject and put them into this small guide - I have completed the guide on my IBM ThinkPad T42 (Radeon 9600XT Mobility) and it works perfectly (i.e. Quake 3 is playable using only open source software):
Inorder to perform this installation you will need at least (i.e. never versions will do) either xorg-x11-6.8.99.15 or xorg-server-0.99.2-r1 (i.e. modular X) . If you are using xorg-x11 then you will also need libdrm which can be installed like this:
Code: Select all
echo x11-libs/libdrm >> /etc/portage/package.unmask
echo 'x11-libs/libdrm ~*' >> /etc/portage/package.keywords
echo x11-misc/util-macros >> /etc/portage/package.unmask
echo 'x11-misc/util-macros ~*' >> /etc/portage/package.keywords
emerge -v --oneshot --nodeps util-macros libdrm
The actual driver installation is a two step procedure: first we need to compile a DRM module for our kernel and then we must compile a Mesa driver for X that uses our newly created kernel driver - sounds complicated ?, it is not:
Code: Select all
mkdir /usr/src/r300
cd /usr/src/r300
export CVSROOT=":pserver:anonymous@cvs.freedesktop.org:/cvs/dri"
cvs checkout drm
cd drm
rm -rf shared
ln -s shared-core shared
cd linux-core
DRM_MODULES="radeon" make
cp *.ko /lib/modules/`uname -r`/kernel/drivers/char/drm
modules-update
Code: Select all
cd /usr/src/r300
export CVSROOT=":pserver:anonymous@cvs.freedesktop.org:/cvs/mesa"
cvs checkout Mesa
cd Mesa
echo 'DRM_SOURCE_PATH=/usr/src/r300/drm' >> configs/linux-dri
make linux-dri-x86 # on AMD64 this should be: make linux-dri-x86-64
cp -a lib/r300_dri.so /usr/lib/modules/dri/ # on xorg-x11
cp -a lib/r300_dri.so /usr/lib/xorg/modules/dri/ # on xorg-server
mkdir -p /usr/lib/opengl/mesa-cvs
ln -s /usr/src/r300/Mesa/lib /usr/lib/opengl/mesa-cvs/lib
ln -s /usr/src/r300/Mesa/include /usr/lib/opengl/mesa-cvs/include
Code: Select all
eselect opengl set mesa-cvsCode: Select all
Section "Module"
:
Load "glx" # libglx.a
Load "dri" # libdri.a
Load "drm" # libdrm.a
:
EndSection
Code: Select all
Section "dri"
Mode 0666
EndSection
Code: Select all
Section "Device"
Identifier "ATI"
Driver "radeon"
Option "AGPMode" "4"
Option "RenderAccel" "on"
# This two lines are needed to prevent fonts from being scrambled
Option "XaaNoScanlineImageWriteRect"
Option "XaaNoScanlineCPUToScreenColorExpandFill"
# Misc
BusID "PCI:1:0:0"
Screen 0
EndSectionCode: Select all
glxinfo | grep -i "direct rendering"


