Skip to contentSkip to conversation

AGP GART for AMD 761

PATCH In review Robert Love 3 participants 10 messages Sep 15, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AGP GART for AMD 761

The following patch provides AGP support from the AMD AGP driver for the AMD 761. I don't have an AMD 761 and I had to look the PCI ID up, so I need some confirmation this works. Despite this, it should.

Please test and let me know so I can forward it off. Against 2.4.10-pre9, but should apply to Alan's tree and 2.4.9.

Documentation/Configure.help +1 -1
diff -urN linux-2.4.10-pre9/Documentation/Configure.help linux/Documentation/Configure.help
@@ -2581,7 +2581,7 @@
 AMD Irongate support
 CONFIG_AGP_AMD
   This option gives you AGP support for the GLX component of the
-  XFree86 4.x on AMD Irongate chipset.
+  XFree86 4.x on AMD Irongate and 761 chipsets.
 
   For the moment, you should probably say N, unless you want to test
   the GLX component for XFree86 3.3.6, which can be downloaded from
drivers/char/agp/agp.h +3 -0
diff -urN linux-2.4.10-pre9/drivers/char/agp/agp.h linux/drivers/char/agp/agp.h
@@ -196,6 +196,9 @@
 #ifndef PCI_DEVICE_ID_AMD_IRONGATE_0
 #define PCI_DEVICE_ID_AMD_IRONGATE_0    0x7006
 #endif
+#ifndef PCI_DEVICE_ID_AMD_761_0
+#define PCI_DEVICE_ID_AMD_761_0		0x700E
+#endif
 #ifndef PCI_VENDOR_ID_AL
 #define PCI_VENDOR_ID_AL		0x10b9
 #endif
drivers/char/agp/agpgart_be.c +6 -1
diff -urN linux-2.4.10-pre9/drivers/char/agp/agpgart_be.c linux/drivers/char/agp/agpgart_be.c
@@ -2895,6 +2895,12 @@
 		"AMD",
 		"Irongate",
 		amd_irongate_setup },
+	{ PCI_DEVICE_ID_AMD_761_0,
+		PCI_VENDOR_ID_AMD,
+		AMD_761,
+		"AMD",
+		"761",
+		amd_irongate_setup },
 	{ 0,
 		PCI_VENDOR_ID_AMD,
 		AMD_GENERIC,
@@ -2922,7 +2928,6 @@
 		"Intel",
 		"440GX",
 		intel_generic_setup },
-	/* could we add support for PCI_DEVICE_ID_INTEL_815_1 too ? */
 	{ PCI_DEVICE_ID_INTEL_815_0,
 		PCI_VENDOR_ID_INTEL,
 		INTEL_I815,
include/linux/agp_backend.h +1 -0
diff -urN linux-2.4.10-pre9/include/linux/agp_backend.h linux/include/linux/agp_backend.h
@@ -58,6 +58,7 @@
 	SIS_GENERIC,
 	AMD_GENERIC,
 	AMD_IRONGATE,
+	AMD_761,
 	ALI_M1541,
 	ALI_M1621,
 	ALI_M1631,
Signature · 3 lines
Robert M. Love
rml at ufl.edu
rml at tech9.net
#1 lore raw
Quoted 8 lines · Robert Love

The following patch provides AGP support from the AMD AGP driver for the AMD 761. I don't have an AMD 761 and I had to look the PCI ID up, so I need some confirmation this works. Despite this, it should.

Please test and let me know so I can forward it off. Against 2.4.10-pre9, but should apply to Alan's tree and 2.4.9.

drivers/char/agp/agpgart_be.c line 2933

Quoted 7 lines
drivers/char/agp/agpgart_be.c +0 -1
@@ -2922,7 +2928,6 @@
 		"Intel",
 		"440GX",
 		intel_generic_setup },
-	/* could we add support for PCI_DEVICE_ID_INTEL_815_1 too ? */
 	{ PCI_DEVICE_ID_INTEL_815_0,
 		PCI_VENDOR_ID_INTEL,
 		INTEL_I815,

What's the story with that chunk? It looks like you removed a comment without changing the code, and it is totally unrelated to the AMD 761 problems that you are trying to fix.

-jwb

#2 lore raw
Quoted 4 lines · Jeffrey W. Baker
Quoted 4 lines
drivers/char/agp/agpgart_be.c +0 -0
@@ -2922,7 +2928,6 @@
 		"Intel",
 		"440GX",
 		intel_generic_setup },
Quoted 8 lines

drivers/char/agp/agpgart_be.c line 2933

Quoted 4 lines
drivers/char/agp/agpgart_be.c +0 -1
-	/* could we add support for PCI_DEVICE_ID_INTEL_815_1 too ? */
 	{ PCI_DEVICE_ID_INTEL_815_0,
 		PCI_VENDOR_ID_INTEL,
 		INTEL_I815,

What's the story with that chunk? It looks like you removed a comment without changing the code, and it is totally unrelated to the AMD 761 problems that you are trying to fix.

It's my comment :)

I wrote the i815 AGP code, too, and I don't know what I was thinking but there is no need to add support for PCI_DEVICE_ID_INTEL_815_1.

If I send the patch off to Linus, now is a good time to remove it.

Signature · 3 lines
Robert M. Love
rml at ufl.edu
rml at tech9.net
#3 lore raw
In reply to Robert Love
Quoted 2 lines · Robert Love

Please test and let me know so I can forward it off. Against 2.4.10-pre9, but should apply to Alan's tree and 2.4.9.

Hi,

I first thought that something was wrong with the patch as I got the following trying to apply it to 2.4.10-pre9 :

bash-2.05# pwd
/usr/src/linux
bash-2.05# patch -p1 < /home/jesper/amd761.diff
patching file Documentation/Configure.help
patching file drivers/char/agp/agp.h
Hunk #1 succeeded at 196 with fuzz 2.
patching file drivers/char/agp/agpgart_be.c
Hunk #1 FAILED at 2895.
Hunk #2 FAILED at 2928.
2 out of 2 hunks FAILED

-- saving rejects to file drivers/char/agp/agpgart_be.c.rej

patching file include/linux/agp_backend.h

patch unexpectedly ends in middle of line

Hunk #1 FAILED at 58.

1 out of 1 hunk FAILED -- saving rejects to file include/linux/agp_backend.h.rej

but it turned out that it was just my email client that had converted all the tabs to spaces, and after fixing that the patch applied fine.

The new kernel build without any problem, booted without any problem and my system seems to be running fine (agpgart build static, not as a module).

Here are the relevant parts of dmesg from my box:

Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 439M
agpgart: unsupported bridge
agpgart: no supported devices found.

My system is a 1.4GHz AMD Athlon Thunderbird with a 266MHz fsb, mainboard is ASUS A7M266 (AMD761 North Bridge VIA 686B South Bridge) and I have 512MB Kingston 266MHz DDR RAM installed in two slots.

I'm not entirely sure about this, but I don't think that my system actually uses the kernel agpgart driver since I have a ASUS V8200 Deluxe Geforce3 graphics card and I currently use the binary only NVidia supplied drivers (I can easily switch to other drivers if you want me to test anything!).

It there is any other info that you would like me to provide or something you'd like me to test I'm full willing to reconfigure my system in any way nessesary to provide the requested info and/or test results.

Best regards,
Jesper Juhl
[email protected]

#4 lore raw
Quoted 7 lines · Jesper Juhl

<snip>
Here are the relevant parts of dmesg from my box:

Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 439M
agpgart: unsupported bridge
agpgart: no supported devices found.

OK, its not working...

Quoted 5 lines

<snip>
It there is any other info that you would like me to provide or something you'd like me to test I'm full willing to reconfigure my system in any way nessesary to provide the requested info and/or test results.

Please type `/sbin/lspci -n -v -s 0:0' and give me the results.

Let me see if that is enough to figure it out... thank you.

Signature · 3 lines
Robert M. Love
rml at ufl.edu
rml at tech9.net
#5 lore raw
In reply to Robert Love
Quoted 1 line · Robert Love

Please type `/sbin/lspci -n -v -s 0:0' and give me the results.

bash-2.05# /sbin/lspci -n -v -s 0:0
00:00.0 Class 0600: 1022:700e (rev 13)

        Flags: bus master, medium devsel, latency 32
        Memory at f8000000 (32-bit, prefetchable) [size=64M]
        Memory at f7800000 (32-bit, prefetchable) [size=4K]
        I/O ports at e000 [disabled] [size=4]
        Capabilities: [a0] AGP version 2.0

Best regards,
Jesper Juhl
[email protected]

#6 lore raw
Quoted 2 lines · Jesper Juhl

bash-2.05# /sbin/lspci -n -v -s 0:0
00:00.0 Class 0600: 1022:700e (rev 13)

Thanks. Ca you try the attached patch? It should fall back on try_unsupported if it can't find the 761. Please send the relevant dmesg in reply. Thank you.

Documentation/Configure.help +1 -1
diff -urN linux-2.4.10-pre9/Documentation/Configure.help linux/Documentation/Configure.help
@@ -2581,7 +2581,7 @@
 AMD Irongate support
 CONFIG_AGP_AMD
   This option gives you AGP support for the GLX component of the
-  XFree86 4.x on AMD Irongate chipset.
+  XFree86 4.x on AMD Irongate and 761 chipsets.
 
   For the moment, you should probably say N, unless you want to test
   the GLX component for XFree86 3.3.6, which can be downloaded from
drivers/char/agp/agp.h +3 -0
diff -urN linux-2.4.10-pre9/drivers/char/agp/agp.h linux/drivers/char/agp/agp.h
@@ -196,6 +196,9 @@
 #ifndef PCI_DEVICE_ID_AMD_IRONGATE_0
 #define PCI_DEVICE_ID_AMD_IRONGATE_0    0x7006
 #endif
+#ifndef PCI_DEVICE_ID_AMD_761_0
+#define PCI_DEVICE_ID_AMD_761_0		0x700e
+#endif
 #ifndef PCI_VENDOR_ID_AL
 #define PCI_VENDOR_ID_AL		0x10b9
 #endif
drivers/char/agp/agpgart_be.c +7 -2
diff -urN linux-2.4.10-pre9/drivers/char/agp/agpgart_be.c linux/drivers/char/agp/agpgart_be.c
@@ -60,7 +60,7 @@
 static void flush_cache(void);
 
 static struct agp_bridge_data agp_bridge;
-static int agp_try_unsupported __initdata = 0;
+static int agp_try_unsupported __initdata = 1;
 
 
 static inline void flush_cache(void)
@@ -2895,6 +2895,12 @@
 		"AMD",
 		"Irongate",
 		amd_irongate_setup },
+	{ PCI_DEVICE_ID_AMD_761_0,
+		PCI_VENDOR_ID_AMD,
+		AMD_761,
+		"AMD",
+		"761",
+		amd_irongate_setup },
 	{ 0,
 		PCI_VENDOR_ID_AMD,
 		AMD_GENERIC,
@@ -2922,7 +2928,6 @@
 		"Intel",
 		"440GX",
 		intel_generic_setup },
-	/* could we add support for PCI_DEVICE_ID_INTEL_815_1 too ? */
 	{ PCI_DEVICE_ID_INTEL_815_0,
 		PCI_VENDOR_ID_INTEL,
 		INTEL_I815,
include/linux/agp_backend.h +1 -0
diff -urN linux-2.4.10-pre9/include/linux/agp_backend.h linux/include/linux/agp_backend.h
@@ -58,6 +58,7 @@
 	SIS_GENERIC,
 	AMD_GENERIC,
 	AMD_IRONGATE,
+	AMD_761,
 	ALI_M1541,
 	ALI_M1621,
 	ALI_M1631,

--
Robert M. Love
rml at ufl.edu
rml at tech9.net

#7 lore raw
In reply to Robert Love
Quoted 7 lines · Robert Love
Quoted 2 lines · Jesper Juhl

bash-2.05# /sbin/lspci -n -v -s 0:0
00:00.0 Class 0600: 1022:700e (rev 13)

Thanks. Ca you try the attached patch? It should fall back on try_unsupported if it can't find the 761. Please send the relevant dmesg in reply. Thank you.

Seems to work much better :

Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 439M
agpgart: Detected AMD 761 chipset
agpgart: AGP aperture is 64M @ 0xf8000000

Actually the previous patch may have worked as well, while trying to figure out why I couldn't get it to apply I was playing around with the configuration and various other stuff and I may accidentaly have disabled Irongate support in the kernel that I ended up building. I can retry the original patch to verify that if you like.

Best regards,
Jesper Juhl
[email protected]

#8 lore raw
Quoted 6 lines · Jesper Juhl

Seems to work much better :

Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 439M
agpgart: Detected AMD 761 chipset
agpgart: AGP aperture is 64M @ 0xf8000000

Excellent. Thank you for testing -- I don't even have a 761 :)

Quoted 4 lines

Actually the previous patch may have worked as well, while trying to figure out why I couldn't get it to apply I was playing around with the configuration and various other stuff and I may accidentaly have disabled Irongate support in the kernel that I ended up building. I can retry the original patch to verify that if you like.

Actually, test out the final patch I submit to the list and Linus and Alan, and make sure _that_ works (I will disable the agp_try_unsupported there). Let me know if that gives you problems...I will post it in a moment.

Thanks again for your help, hope the driver works good

Signature · 3 lines
Robert M. Love
rml at ufl.edu
rml at tech9.net
#9 lore raw
In reply to Robert Love
Quoted 7 lines · Robert Love
Quoted 2 lines · Jesper Juhl

bash-2.05# /sbin/lspci -n -v -s 0:0
00:00.0 Class 0600: 1022:700e (rev 13)

Thanks. Ca you try the attached patch? It should fall back on try_unsupported if it can't find the 761. Please send the relevant dmesg in reply. Thank you.

Some aditional detail; it seems the NVidia driver agrees that the AGPGART is working since I get this at the end of dmesg:

NVRM: loading NVIDIA kernel module version 1.0-1251
NVRM: not using NVAGP, AGPGART is loaded!!

And since my X is working perfectly I'd say it's looking good :)

Best regards,
Jesper Juhl
[email protected]