DRI with ProSavageDDR and Kernel 2.6

DRI is an acronym for Direct Rendering Infrastructure. It is that part of XFree86 which is responsible for the lower level access to hardware accelerated 3D graphics.

I did a port of the DRI-driver for the S3/VIA Savage-Chips to the new Kernel 2.6. It is based on the patch created by Erik Lindstr”m (many thanks). It's more a quick and dirty hack than a seriously port, but it works for now.

Currently, the real work on the savage DRI is done by Felix Kühling and Alex Deucher. They are porting the sources provided by VIA to XFree86 4.4 respectively Mesa 5.0. See here for the current development state.

Download Patch

Kernel 2.6: xf86.patch.bz2 (297 k)

Kernel 2.4: xf86.patch.bz2 original patch from Erik (247 k)

State

Like Eriks patch to kernel 2.4, it runs smoothly tuxracer on a ProSavageDDR-Chip. The XFree86-Code is unchanged - just the Kernel-Code is adapted to work with 2.6.

Instructions

The patch is against XFree86 4.2.0 (included in SuSE 8.0) and doesn't work with later versions.

The following description is copied from Eriks Site, because that seems to be down, currently. It's exactly applicable to this patch, too (with the one exception to make a savage.ko instead of a savage.o-Module):


Linux on Acer Aspire 1304LC


XFree86 support


State: Working

Hardware: S3 Inc. VT8636A [ProSavage KN133] AGP4X VGA Controller (TwisterK) (rev 1).

Info: XFree86 runs smoothly on this machine with OpenGL-support and
everything. I've tested fuhquake and gltron so far and they worked
better than i thought. Due to the difficoulties that i expirienced
installing (i would rather say editing the sourcecode and converting files)
the graphicdrivers provided by VIA/S3, i've created a patch that
does "everything" for you.


DISCLAIMER: I take no responsibility or whatsoever for what this driver
does to your computer. The driver is copyrighted to S3 Graphics Inc. and
is slightly modified to compile correctly. You can find the original
file here .

Instructions: First, you will need the XFree86 sourcecode (for version
4.2.0). Get these from ftp://ftp.xfree86.org/pub/XFree86/4.2.0/source/.
Unpack them and apply this patch on them. If you do not trust the authoity
of this patch, you can get the signature from here (you will need my
PGP-signature to verify it).

OBSERVE: THIS PATCH IS YET UNTESTED!

Once you've downloaded and unpacked the three tarballs, you should apply
my patch, from the XF86's sourcecode's parentdirectory, with this
commands:
        erik@lappy:~$ bunzip2 xf86.patch.bz2
erik@lappy:~$ patch -p0 < xf86.patch
Now, do the following:
        erik@lappy:~$ cd xc/
erik@lappy:~/xc$ make World
erik@lappy:~/xc$ su -c "make install"
This will take a while (a few years or so), so go make some coffee or
take a lo(ooo)ng shower.

When this is done, the following needs to be done (as root):
        root@lappy:/home/moh/xc# cd programs/Xserver/hw/xfree86/drivers/savage
root@lappy:.../drivers/savage# make install
root@lappy:.../drivers/savage# ldconfig
root@lappy:.../drivers/savage# sync
And now it's time for the 3D-drivers:
        root@lappy:.../drivers/savage# cd ../../os-support/linux/drm/kernel/
root@lappy:.../os-support/linux/drm/kernel# make -f Makefile.linux savage.ko
root@lappy:.../os-support/linux/drm/kernel# cp savage.o /lib/modules/`uname -r`/kernel/drivers/char/drm/
root@lappy:.../os-support/linux/drm/kernel# cd ../../../../../../../../lib/GL/mesa/src/drv/savage/

root@lappy:.../mesa/src/drv/savage# make install
root@lappy:.../mesa/src/drv/savage# ldconfig
root@lappy:.../mesa/src/drv/savage# sync
Confirm the installation with this command:
        root@lappy:/home/moh/# insmod savage
Unless you get any errors, the installation has succeeded
The only things left to be done is putting the module in the /etc/modules.autoload-file and installing the XvMC-driver.
        root@lappy:.../mesa/src/drv/savage/# cd ../../../../../XvMC/hw/savage
root@lappy:.../XvMC/hw/savage# make install
root@lappy:.../XvMC/hw/savage# ldconfig
root@lappy:.../XvMC/hw/savage# sync
Please note that you will need to load glx, dri and dga in your
XF86Config-file.
Here's an example-config done by me: XF86Config .


I hope this document helped atleast someone out there ;)


I would like to thank Tim Roberts for maintaining a great mailing-list in
which he announced this new driver, and also, i couldn't have done this
without the information provided by Phillip Hellewell.

You can reach me on NO_SPAMmoh@NOSPAMprimelan.org (remove NO_SPAM).

© Lars Kanis, 2004 - Letzte Änderung: 2004/02/29