2002-11-26 00:36:50

by Leif Delgass

[permalink] [raw]
Subject: [PATCH] [2.4] AGP Support for VIA KT400

Hello,

Here is a small patch to support agp for the VIA KT400 northbridge. It's
against 2.4.20-rc3 and is based on Nicolas Mailhot's patch for 2.5 which
was included in 2.5.49. It adds the PCI id and registers the VIA generic
setup routine for the chipset. I've tested it successfully on a Gigabyte
GA-7VAXP (KT400) with a Radeon 7500 using DRI and various GL apps/games.
If this has already been submitted, just ignore it -- but I hadn't seen a
patch for 2.4 appear on lkml or the BitKeeper site yet.

Nicolas' patch for 2.5 on lkml:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103786946803970&w=2

Bugzilla entry for 2.5 is here:
http://bugme.osdl.org/show_bug.cgi?id=14

Please apply. Thanks.
P.S. Please cc: me on any replies, I'm not subscribed to the list.

diff -uNr linux-2.4.20-rc3.orig/drivers/char/agp/agpgart_be.c linux-2.4.20-rc3/drivers/char/agp/agpgart_be.c
--- linux-2.4.20-rc3.orig/drivers/char/agp/agpgart_be.c 2002-11-25 17:53:36.000000000 -0500
+++ linux-2.4.20-rc3/drivers/char/agp/agpgart_be.c 2002-11-25 17:46:42.000000000 -0500
@@ -4714,6 +4714,12 @@
"Via",
"Apollo Pro KT266",
via_generic_setup },
+ { PCI_DEVICE_ID_VIA_8377_0,
+ PCI_VENDOR_ID_VIA,
+ VIA_APOLLO_KT400,
+ "Via",
+ "Apollo Pro KT400",
+ via_generic_setup },
{ 0,
PCI_VENDOR_ID_VIA,
VIA_GENERIC,
diff -uNr linux-2.4.20-rc3.orig/include/linux/agp_backend.h linux-2.4.20-rc3/include/linux/agp_backend.h
--- linux-2.4.20-rc3.orig/include/linux/agp_backend.h 2002-11-25 17:53:42.000000000 -0500
+++ linux-2.4.20-rc3/include/linux/agp_backend.h 2002-11-25 17:44:14.000000000 -0500
@@ -60,6 +60,7 @@
VIA_APOLLO_PRO,
VIA_APOLLO_KX133,
VIA_APOLLO_KT133,
+ VIA_APOLLO_KT400,
SIS_GENERIC,
AMD_GENERIC,
AMD_IRONGATE,
diff -uNr linux-2.4.20-rc3.orig/include/linux/pci_ids.h linux-2.4.20-rc3/include/linux/pci_ids.h
--- linux-2.4.20-rc3.orig/include/linux/pci_ids.h 2002-11-25 17:53:42.000000000 -0500
+++ linux-2.4.20-rc3/include/linux/pci_ids.h 2002-11-25 17:43:27.000000000 -0500
@@ -986,6 +986,7 @@
#define PCI_DEVICE_ID_VIA_8233C_0 0x3109
#define PCI_DEVICE_ID_VIA_8361 0x3112
#define PCI_DEVICE_ID_VIA_8233A 0x3147
+#define PCI_DEVICE_ID_VIA_8377_0 0x3189
#define PCI_DEVICE_ID_VIA_86C100A 0x6100
#define PCI_DEVICE_ID_VIA_8231 0x8231
#define PCI_DEVICE_ID_VIA_8231_4 0x8235

--
Leif Delgass
http://www.retinalburn.net



2002-11-26 13:34:35

by Nicolas Mailhot

[permalink] [raw]
Subject: Re:[PATCH] [2.4] AGP Support for VIA KT400

> Hello,
>
> Here is a small patch to support agp for the VIA KT400
northbridge. It's
> against 2.4.20-rc3 and is based on Nicolas Mailhot's patch
for 2.5 which
> was included in 2.5.49. It adds the PCI id and registers
the VIA generic
> setup routine for the chipset. I've tested it successfully
on a Gigabyte
> GA-7VAXP (KT400) with a Radeon 7500 using DRI and various GL
apps/games.
> If this has already been submitted, just ignore it -- but I
hadn't seen a
> patch for 2.4 appear on lkml or the BitKeeper site yet.
>
> Nicolas' patch for 2.5 on lkml:
>
http://marc.theaimsgroup.com/?l=linux-kernel&m=103786946803970&w=2
>
> Bugzilla entry for 2.5 is here:
> http://bugme.osdl.org/show_bug.cgi?id=14

In fact I've been cleaning up a bit the 2.4 version before
submitting it -- the entries for other VIA chips are a bit
more convoluted and I suspect the first patch is not as
complete as it should be. In fact I think I'll post a 2.5
followup soon.

Please do not apply the first patch and use this one instead.
I didn't tested it myself (not enough time) but Johannes
Winkelmann reports it as ok. It's pretty straightforward
anyway, just id lists all over the place.

Best regards,

--
Nicolas Mailhot

Acc?dez au courrier ?lectronique de La Poste : http://www.laposte.net ;
3615 LAPOSTENET (0,13 ?/mn) ; t?l : 08 92 68 13 50 (0,34?/mn)"


Attachments:
kt400-2.4.patch (4.42 kB)

2002-11-26 20:21:34

by Nicolas Mailhot

[permalink] [raw]
Subject: Re: Re:[PATCH] [2.4] AGP Support for VIA KT400

[Please CC me replies as I'm not on the list]

Le mar 26/11/2002 ? 14:41, Nicolas Mailhot a ?crit :

> In fact I've been cleaning up a bit the 2.4 version before
> submitting it -- the entries for other VIA chips are a bit
> more convoluted and I suspect the first patch is not as
> complete as it should be. In fact I think I'll post a 2.5
> followup soon.
>
> Please do not apply the first patch and use this one instead.

Which was webmail-borked. Sorry, should not have let the other
submission rush me.

Anyway here is a cleaned-up tested version for 2.4.20-rc4. It's
basically a straight port of the 2.5 patch, plus the dri bits I missed
in 2.5 (purely cosmetic, but hey not having his dmesg full of unknown
chips is always nice), plus some kt400-related pci ids for the database.

The effect is the same as the patch that went in 2.5, with a few nicer
printks.

Please apply

--
Nicolas Mailhot <[email protected]>


Attachments:
kt400-agp.patch (4.42 kB)
signature.asc (189.00 B)
Ceci est une partie de message num?riquement sign
Download all attachments