agpgart module description This is a basic Linux kernel module and test program for supporting the (extra) data transfer features of agp cards. It was originally written as part of the utah-glx accelerated MesaGL driver project, but now is used for agp access in general under linux. Jeff Hartmann is the primary maintainer. An agp device looks just like a normal pci device to the driver software, and can be used as such. However, there are additional features we can take advantage of with our driver. One gain is primarily in speed: many agp interfaces are capable of higher memory bandwidth for transferring scene data to the card. The other is a device called the 'gart' (*mumble* address resolution table) which is part of your motherboard's chipset and handles gathering data from memory and passing it to the card as a continuous stream. This last part is very convenient since linux provides no clean method of allocating large (multi-megabyte) buffers that are contiguous in physical memory as is required in tradional pci bus-master transfers. This module takes care of programming the gart and enabling the faster agp transfers if requested. It is provided in terms of a patch against the 2.2 kernel series. The source files are provided for reference only; you must patch and recompile your kernel. This module is already included in Linux 2.3 and later, so if you have one of those, you only need to enable it. Also note that the version in the 2.4 kernel is the primary focus of development and in general to be preferred. This collection of patches is supplied for the convenience of those who must use a 2.2 kernel. Build instructions To patch the kernel, you must have a recent copy of the 2.2 kernel source. The patches should work with a kernels of 'nearby' version numbers, though unfortunately I don't have testing data on which patch works with which kernel. certainly the 2.2.10 patch applies cleaning as far back as 2.2.7, and the 2.2.13 patch works fine with 2.2.14 and 2.2.15. The patch against 2.2.16 contains a number of improvements over the earlier patches. Use it if you can. Now, assuming you've unpacked the kernel into /usr/src/linux: cd /usr/src cat /path/to/newagp/agpgart- | patch -p1 cd linux make config/menuconfig enable development code/drivers under "code maturity" enable /dev/agpgart support under "character devices" you must also include support for your particular motherboard chipset. If unsure of the exact model of your chipset a quick look at the output from lspci or a look at the file /proc/pci should be enough to identify it. rebuild your kernel, install and reboot. More information on this process in general can be found in the Linux Kernel-HOWTO, available for example at http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html Do note that you really need to reboot with the new kernel. The patch contains patches to the memory subsystem which the agpgart module won't work without. There should now be a /dev/agpgart device, major 10, minor 175. If you don't have /dev/agpgart you can create it with the following command: mknod /dev/agpgart c 10 175 Enter the newagp source directory and type "make". This should build the testgart program. as root: modprobe agpgart (load the driver) ./testgart (it should successfully allocate some memory and test it) If all goes well, you're ready to use the gart device with the utah-glx drivers. Congratulations. Please see utah-glx.sourceforge.net for more information on the utah-glx project. This is the "new" agpgart module, matching the one that was added to the mainline kernel at v2.3.31. There was an older "gart" module used early in development, now obsolete. It can be identified as using a /dev/gart interface at node 174, 0. Note that some drivers, particularly the one for the Intel i810 chipset may require the older module. -- Ralph_Giles@sfu.ca $Date: 2000/06/08 21:41:56 $