* [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2
@ 2003-01-02 19:53 Richard Baverstock
2003-01-03 16:16 ` Vojtech Pavlik
0 siblings, 1 reply; 7+ messages in thread
From: Richard Baverstock @ 2003-01-02 19:53 UTC (permalink / raw)
To: linux-kernel; +Cc: marcelo
Here is a patch that enables AGPGART for the VIA vt8235 chipset on P4X400 motherboards. Rather trivial, adds the pci id, then a few lines in the agp sources to get it identified. I've only been able to test this on my computer, where it works.
Rich
--BEGIN--
diff -ur linux/drivers/char/agp/agp.h linux-2.4.21-pre2/drivers/char/agp/agp.h
--- linux/drivers/char/agp/agp.h 2003-01-02 14:36:15.000000000 -0500
+++ linux-2.4.21-pre2/drivers/char/agp/agp.h 2003-01-02 14:35:02.000000000 -0500
@@ -157,6 +157,9 @@
#define PGE_EMPTY(p) (!(p) || (p) == (unsigned long) agp_bridge.scratch_page)
+#ifndef PCI_DEVICE_ID_VIA_8235_0
+#define PCI_DEVICE_ID_VIA_8235_0 0x3168
+#endif
#ifndef PCI_DEVICE_ID_VIA_82C691_0
#define PCI_DEVICE_ID_VIA_82C691_0 0x0691
#endif
diff -ur linux/drivers/char/agp/agpgart_be.c linux-2.4.21-pre2/drivers/char/agp/agpgart_be.c
--- linux/drivers/char/agp/agpgart_be.c 2003-01-02 14:36:15.000000000 -0500
+++ linux-2.4.21-pre2/drivers/char/agp/agpgart_be.c 2003-01-02 14:35:02.000000000 -0500
@@ -4640,6 +4640,12 @@
#endif /* CONFIG_AGP_SIS */
#ifdef CONFIG_AGP_VIA
+ { PCI_DEVICE_ID_VIA_8235_0,
+ PCI_VENDOR_ID_VIA,
+ VIA_P4X400,
+ "Via",
+ "P4X400",
+ via_generic_setup },
{ PCI_DEVICE_ID_VIA_8501_0,
PCI_VENDOR_ID_VIA,
VIA_MVP4,
diff -ur linux/drivers/pci/pci.ids linux-2.4.21-pre2/drivers/pci/pci.ids
--- linux/drivers/pci/pci.ids 2003-01-02 14:36:16.000000000 -0500
+++ linux-2.4.21-pre2/drivers/pci/pci.ids 2003-01-02 14:35:02.000000000 -0500
@@ -2751,6 +2751,7 @@
3147 VT8233A ISA Bridge
3148 P4M266 Host Bridge
3156 P/KN266 Host Bridge
+ 3168 VT8235 [P4X400 AGP]
3177 VT8233A ISA Bridge
1458 5001 GA-7VAX Mainboard
3189 VT8377 [KT400 AGP] Host Bridge
diff -ur linux/include/linux/agp_backend.h linux-2.4.21-pre2/include/linux/agp_backend.h
--- linux/include/linux/agp_backend.h 2003-01-02 14:36:17.000000000 -0500
+++ linux-2.4.21-pre2/include/linux/agp_backend.h 2003-01-02 14:35:02.000000000 -0500
@@ -54,6 +54,7 @@
INTEL_I850,
INTEL_I860,
VIA_GENERIC,
+ VIA_P4X400,
VIA_VP3,
VIA_MVP3,
VIA_MVP4,
--END--
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2
2003-01-02 19:53 [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2 Richard Baverstock
@ 2003-01-03 16:16 ` Vojtech Pavlik
2003-01-03 17:22 ` Richard Baverstock
0 siblings, 1 reply; 7+ messages in thread
From: Vojtech Pavlik @ 2003-01-03 16:16 UTC (permalink / raw)
To: Richard Baverstock; +Cc: linux-kernel, marcelo
On Thu, Jan 02, 2003 at 02:53:46PM -0500, Richard Baverstock wrote:
> Here is a patch that enables AGPGART for the VIA vt8235 chipset on P4X400 motherboards. Rather trivial, adds the pci id, then a few lines in the agp sources to get it identified. I've only been able to test this on my computer, where it works.
The vt8235 is the southbridge chip and that the AGP bridge is
located in the northbridge, which most likely has a different number.
> Rich
>
>
> --BEGIN--
>
> diff -ur linux/drivers/char/agp/agp.h linux-2.4.21-pre2/drivers/char/agp/agp.h
> --- linux/drivers/char/agp/agp.h 2003-01-02 14:36:15.000000000 -0500
> +++ linux-2.4.21-pre2/drivers/char/agp/agp.h 2003-01-02 14:35:02.000000000 -0500
> @@ -157,6 +157,9 @@
>
> #define PGE_EMPTY(p) (!(p) || (p) == (unsigned long) agp_bridge.scratch_page)
>
> +#ifndef PCI_DEVICE_ID_VIA_8235_0
> +#define PCI_DEVICE_ID_VIA_8235_0 0x3168
> +#endif
> #ifndef PCI_DEVICE_ID_VIA_82C691_0
> #define PCI_DEVICE_ID_VIA_82C691_0 0x0691
> #endif
> diff -ur linux/drivers/char/agp/agpgart_be.c linux-2.4.21-pre2/drivers/char/agp/agpgart_be.c
> --- linux/drivers/char/agp/agpgart_be.c 2003-01-02 14:36:15.000000000 -0500
> +++ linux-2.4.21-pre2/drivers/char/agp/agpgart_be.c 2003-01-02 14:35:02.000000000 -0500
> @@ -4640,6 +4640,12 @@
> #endif /* CONFIG_AGP_SIS */
>
> #ifdef CONFIG_AGP_VIA
> + { PCI_DEVICE_ID_VIA_8235_0,
> + PCI_VENDOR_ID_VIA,
> + VIA_P4X400,
> + "Via",
> + "P4X400",
> + via_generic_setup },
> { PCI_DEVICE_ID_VIA_8501_0,
> PCI_VENDOR_ID_VIA,
> VIA_MVP4,
> diff -ur linux/drivers/pci/pci.ids linux-2.4.21-pre2/drivers/pci/pci.ids
> --- linux/drivers/pci/pci.ids 2003-01-02 14:36:16.000000000 -0500
> +++ linux-2.4.21-pre2/drivers/pci/pci.ids 2003-01-02 14:35:02.000000000 -0500
> @@ -2751,6 +2751,7 @@
> 3147 VT8233A ISA Bridge
> 3148 P4M266 Host Bridge
> 3156 P/KN266 Host Bridge
> + 3168 VT8235 [P4X400 AGP]
> 3177 VT8233A ISA Bridge
> 1458 5001 GA-7VAX Mainboard
> 3189 VT8377 [KT400 AGP] Host Bridge
> diff -ur linux/include/linux/agp_backend.h linux-2.4.21-pre2/include/linux/agp_backend.h
> --- linux/include/linux/agp_backend.h 2003-01-02 14:36:17.000000000 -0500
> +++ linux-2.4.21-pre2/include/linux/agp_backend.h 2003-01-02 14:35:02.000000000 -0500
> @@ -54,6 +54,7 @@
> INTEL_I850,
> INTEL_I860,
> VIA_GENERIC,
> + VIA_P4X400,
> VIA_VP3,
> VIA_MVP3,
> VIA_MVP4,
>
> --END--
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Vojtech Pavlik
SuSE Labs
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2
2003-01-03 16:16 ` Vojtech Pavlik
@ 2003-01-03 17:22 ` Richard Baverstock
2003-01-03 17:43 ` Dave Jones
0 siblings, 1 reply; 7+ messages in thread
From: Richard Baverstock @ 2003-01-03 17:22 UTC (permalink / raw)
To: Vojtech Pavlik; +Cc: linux-kernel
> The vt8235 is the southbridge chip and that the AGP bridge is
> located in the northbridge, which most likely has a different number.
Sorry about that, thought the AGP was in the southbridge chip. I see however that someone else has submitted a patch with the correct naming conventions (It does seem to change between P4X333 and P4X400 however). Thanks for the heads up :)
Rich
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2
2003-01-03 17:22 ` Richard Baverstock
@ 2003-01-03 17:43 ` Dave Jones
2003-01-03 18:00 ` Dave Jones
2003-01-03 18:13 ` Richard Baverstock
0 siblings, 2 replies; 7+ messages in thread
From: Dave Jones @ 2003-01-03 17:43 UTC (permalink / raw)
To: Richard Baverstock; +Cc: Vojtech Pavlik, linux-kernel
On Fri, Jan 03, 2003 at 12:22:16PM -0500, Richard Baverstock wrote:
> > The vt8235 is the southbridge chip and that the AGP bridge is
> > located in the northbridge, which most likely has a different
> > number.
> Sorry about that, thought the AGP was in the southbridge chip. I see
> however that someone else has submitted a patch with the correct
> naming conventions (It does seem to change between P4X333 and P4X400
> however).
What exactly do you mean by 'it' ? The PCI device id ?
If they share the same device ID, then Bernhards patch is
really no better...
#define PCI_DEVICE_ID_VIA_P4X333 0x3168
In fact, P4X333 defines a chipset rather than a chip.
According to ..
http://www.viatech.com/en/apollo/p4x333.jsp and
http://www.viatech.com/en/apollo/p4x400.jsp ,
the northbridge is a VT8754 in both models, so the
correct define would seem to be PCI_DEVICE_ID_VIA_8754
Just to confirm, device 3168 is the host bridge in lspci output right?
And this does all work when you run a DRI application ?
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2
2003-01-03 17:43 ` Dave Jones
@ 2003-01-03 18:00 ` Dave Jones
2003-01-03 18:24 ` Richard Baverstock
2003-01-03 18:13 ` Richard Baverstock
1 sibling, 1 reply; 7+ messages in thread
From: Dave Jones @ 2003-01-03 18:00 UTC (permalink / raw)
To: Richard Baverstock, Vojtech Pavlik, linux-kernel
On Fri, Jan 03, 2003 at 05:43:23PM +0000, Dave Jones wrote:
>
> In fact, P4X333 defines a chipset rather than a chip.
> According to ..
> http://www.viatech.com/en/apollo/p4x333.jsp and
> http://www.viatech.com/en/apollo/p4x400.jsp ,
> Just to confirm, device 3168 is the host bridge in lspci output right?
> And this does all work when you run a DRI application ?
Actually, the P4X400 won't work in current situations.
I'll bet if you put an AGPx8 card in there, it'll do the same
"change into AGP3.0 mode" trick that the KT400 does.
I'll move onto that after I finish up the KT400 GART driver.
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2
2003-01-03 18:00 ` Dave Jones
@ 2003-01-03 18:24 ` Richard Baverstock
0 siblings, 0 replies; 7+ messages in thread
From: Richard Baverstock @ 2003-01-03 18:24 UTC (permalink / raw)
To: linux-kernel
> Actually, the P4X400 won't work in current situations.
> I'll bet if you put an AGPx8 card in there, it'll do the same
> "change into AGP3.0 mode" trick that the KT400 does.
> I'll move onto that after I finish up the KT400 GART driver.
>
I'm not using an AGPx8 card however, so that may have changed things. (Geforce 4 Ti).
Thanks :)
Rich
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2
2003-01-03 17:43 ` Dave Jones
2003-01-03 18:00 ` Dave Jones
@ 2003-01-03 18:13 ` Richard Baverstock
1 sibling, 0 replies; 7+ messages in thread
From: Richard Baverstock @ 2003-01-03 18:13 UTC (permalink / raw)
To: Dave Jones; +Cc: linux-kernel
On Fri, 3 Jan 2003 17:43:23 +0000
Dave Jones <davej@codemonkey.org.uk> wrote:
> What exactly do you mean by 'it' ? The PCI device id ?
>
Since he was referring to the host bridge names, i thought he meant the naming conventions.
> If they share the same device ID, then Bernhards patch is
> really no better...
>
> #define PCI_DEVICE_ID_VIA_P4X333 0x3168
>
> In fact, P4X333 defines a chipset rather than a chip.
> According to ..
> http://www.viatech.com/en/apollo/p4x333.jsp and
> http://www.viatech.com/en/apollo/p4x400.jsp ,
> the northbridge is a VT8754 in both models, so the
> correct define would seem to be PCI_DEVICE_ID_VIA_8754
Then we were both wrong, and it should be vt8754.
> Just to confirm, device 3168 is the host bridge in lspci output right?
> And this does all work when you run a DRI application ?
>
00:00.0 Host bridge: VIA Technologies, Inc.: Unknown device 3168 (rev 03)
And yes, DRI works :)
Rich
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-01-03 18:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-02 19:53 [PATCH] AGPGART for VIA vt8235, kernel 2.4.21-pre2 Richard Baverstock
2003-01-03 16:16 ` Vojtech Pavlik
2003-01-03 17:22 ` Richard Baverstock
2003-01-03 17:43 ` Dave Jones
2003-01-03 18:00 ` Dave Jones
2003-01-03 18:24 ` Richard Baverstock
2003-01-03 18:13 ` Richard Baverstock
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox