[ltp] T42p and open source hardware accelerated OpenGL = SUCCESS

Dax Kelson linux-thinkpad@linux-thinkpad.org
Wed, 13 Jul 2005 14:16:24 -0600


I have my T42p running Fedora Core v4.

I've been lurking on the dri-devel mailing list and following with
interest development of the hardware accelerated OpenGL r300 driver.
Recent reports having been saying that it has been working well without
lockups on Radeon 9600 hardware.

The kernel tainting, non-suspending fglrx ATI driver is not appealing to
me.

lspci says I have the following card:
ATI Technologies Inc M10 NT [FireGL Mobility T2] (same as a Radeon 9600)

I wanted to try it out the new r300_dri with the least
distruption/hacking of my existing working config. Basically I wanted to
leave as much as possible in stock configuration.

I ended up only needing the following updated/new files: drm.ko,
radeon.ko, r300_dri.so, libdri.a, radeon_drv.o

As well as these files that I'm not sure I really needed to update:
libGL.so.1.2, libGLU.so.1.3, libGLw.so.1.0

I'm using the latest Xorg and kernel for released FC4, namely:
xorg-x11-6.8.2-37 and kernel-2.6.12-1.1390_FC4.

I compiled and installed the new drm kernel modules (src obtained from
xorg CVS):

drm.ko
radeon.ko

I compiled and installed the r300_dri.so driver, this is a new file not
a replacement for any existing file and installed it
in /usr/X11R6/lib/modules/dri/.

At the same time I also installed Mesa CVS compiled libGL.so.1.2,
libGLU.so.1.3 and libGLw.so.1.0 into /usr/X11R6/lib/. I'm not sure I
needed to do that though.

I then needed two updated files, libdri.a and radeon_drv.o from CVS
Xorg. After lots of hacking and dead ends I could not get the CVS Xorg
to compile. I ended up downloading the binary snapshots files: 

common-20050707-linux.i386.tar.bz2  --> extracted libdri.a
radeon-20050707-linux.i386.tar.bz2  --> extracted radeon_drv.o

I installed libdri.a in:

/usr/X11R6/lib/modules/extensions/
/usr/X11R6/lib/Server/modules/extensions/

I installed radeon_drv.o in:

/usr/X11R6/lib/modules/drivers/

I updated my xorg.conf file with:

Section "Device"
        Identifier  "Videocard0"
        Driver      "radeon"
        VendorName  "Videocard vendor"
        BoardName   "ATI FireGL Mobility T2"
        Option "Colortiling" "TRUE"
        Option "AGPMode" "4"
#       Option "AGPFastWrite" "On" (this
#       Option "RenderAccel" "On"  (or this is or both causes a lockup)
EndSection

I saved backups of all files that I overwrote.

So in summary, I used the following files:

drm.ko
radeon.ko
r300_dri.so
libdri.a
radeon_drv.o
# Not sure the following libG* files are really required
libGL.so.1.2
libGLU.so.1.3
libGLw.so.1.0

The results are great.

Snippets from my /var/log/Xorg.0.log file:

(II) LoadModule: "dri"
(II) Loading /usr/X11R6/lib/modules/extensions/libdri.a
(II) Module dri: vendor="X.Org Foundation"
        compiled for 6.8.99.14, module version = 1.0.0
        ABI class: X.Org Server Extension, version 0.2

...

(II) LoadModule: "radeon"
(II) Loading /usr/X11R6/lib/modules/drivers/radeon_drv.o
(II) Module radeon: vendor="X.Org Foundation"
        compiled for 6.8.99.14, module version = 4.0.1
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 0.7

...

(WW) RADEON(0): Enabling DRM support

        *** Direct rendering support is highly experimental for Radeon 9500
        *** and newer cards. In fact, the only thing you could probably use
        ***  it for is better 2d acceleration. The 3d mesa driver is not
        *** provided in this tree. A very experimental (and incomplete)
        *** version is available from http://r300.sourceforge.net
        *** This message has been last modified on 12/12/04.

...

(II) RADEON(0): [drm] installed DRM signal handler
(II) RADEON(0): [DRI] installation complete
(II) RADEON(0): [drm] Added 32 65536 byte vertex/indirect buffers
(II) RADEON(0): [drm] Mapped 32 vertex/indirect buffers
(II) RADEON(0): [drm] dma control initialized, using IRQ 3
(II) RADEON(0): [drm] Initialized kernel GART heap manager, 5111808
(II) RADEON(0): Direct rendering enabled

I tried a bunch of OpenGL apps and they all ran great. I tried doing ill
advised things to cause lockups and I couldn't. I'm been using it
heavily all day long without any problems.

$ glxgears
*********************************WARN_ONCE*********************************
File r300_state.c function r300Enable line 456
TODO - double side stencil !
***************************************************************************
No ctx->FragmentProgram._Current!!
*********************************WARN_ONCE*********************************
File r300_render.c function r300_get_num_verts line 187
user error: Need more than 2 vertices to draw primitive QS !
***************************************************************************
7789 frames in 5.0 seconds = 1557.800 FPS
9658 frames in 5.0 seconds = 1931.600 FPS
9665 frames in 5.0 seconds = 1933.000 FPS
9665 frames in 5.0 seconds = 1933.000 FPS
9671 frames in 5.0 seconds = 1934.200 FPS

Dax Kelson
Guru Labs