View Single Post
Old 10-15-02, 08:42 AM   #3
Registered User
Join Date: Sep 2002
Posts: 2,262

There may be a way to add support for that chip, assuming it works the same way the other Via AGP chips work.

I was poking around in linux/drivers/char/agp/agpgart_be.c (the AGP backend source file), and found the "list of supported AGP chips" in it. Assuming you know the PCI ID of your northbridge, you can add it to linux/include/linux/pci_ids.h -- find the line that says #define PCI_DEVICE_ID_VIA, and somewhere in that block of Via device ID #defines, add a line:

#define PCI_DEVICE_ID_VIA_8754_0 0xzzzz, where zzzz is the PCI ID of your northbridge.

You can find the ID out, if you have Linux running, by doing a cat /proc/bus/pci/devices | grep 1106 | awk '{print $1; print $2;}' -- the grep 1106 filters out any non-Via hardware you may have (1106 is Via's vendor ID), and the awk statement discards all the flag bits associated with each device, to make things more readable.

The device ID you want is probably the first one printed -- the format is, 4 characters representing bus, device, and function number (basically, where this thing is plugged in on your PCI bus) on one line, then 4 characters for vendor ID, followed by 4 characters for device ID, on the next line. So my guess is that adding the last 4 characters from the second line to the pci_ids.h file will suffice. Although it's probably not a bad idea to take the last 4 characters of the fourth line printed (this is some sort of secondary AGP bridge, or something), and add another line to pci_ids.h:

#define PCI_DEVICE_ID_VIA_8754_1 0xzzzz, where zzzz is now those four characters.

Once you've changed that file, you have to change linux/drivers/char/agp/agpgart_be.c as well. Down near the bottom, near to (but above) the #endif /* CONFIG_AGP_VIA */ line, add a few lines like this:

	{ PCI_DEVICE_ID_VIA_8754_0,
		"Apollo Pro KT400",
		via_generic_setup },
That's the PCI ID you just added to pci_ids.h, with a vendor ID of Via, a set of flags that says "this is compatible with the KT133" (at least, that's what it looks like... I'm not positive that's what it actually means), a string for vendor ("Via"), a string for the device name ("Apollo Pro KT400" -- you can change this if you want), and the address of an initialization routine (via_generic_setup). Almost all the Via AGP chips use this routine for their initialization, and I believe the KT400 shouldn't be any different.

Now recompile your kernel (make sure you enable AGPGART, even if you have it as a module, and make sure to enable "Via chipset support" or whatever it's called), and see if that at least works.

Actually, the more I think about this, the more I think it's a long shot, but it might be worth it to try.
Registered Linux User #219692

Last edited by bwkaz; 10-15-02 at 08:46 AM.
bwkaz is offline   Reply With Quote