ok Bjorn, I think I got it. Thanks again for the info. I went to developer.intel.com and read about the i830 chipset and, like you said the 830M and 830MG have an integrated graphics chipset, where the 830MP does not (I have a radeon :) ).
So... In the detection / initialization tables, the 830 is defaulted to the intel_generic_setup, but this is never called, as you can see from: static int __init agp_find_supported_device(void) ... case PCI_DEVICE_ID_INTEL_830_M_0: ... printk(KERN_INFO PFX "Detected an Intel " "830M Chipset.\n"); agp_bridge.type = INTEL_I810; return intel_i830_setup(i810_dev); This seemed odd to me, since these cases seem to handle exceptions to the standard routines. So, I changed: i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830_M_1, NULL); if(PCI_FUNC(i810_dev->devfn) != 0) { i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830_M_1, i810_dev); } to: i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830_M_1, NULL); if (!i810_dev) { // no integrated graphics chip i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830_M_2, NULL); if (i810_dev) // we at least found PCI bridge break; // probably an i830MP // try generic_intel_setup } if (i810_dev) { if(PCI_FUNC(i810_dev->devfn) != 0) { i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830_M_1, i810_dev); } } i.e. If we don't find the integrated chip, at least be sure we have the PCI bridge. If so, we're probably the 830MP, and should break from the exception routines and just called the intel_generic_setup, which was set in the initialization tables here: ... { PCI_DEVICE_ID_INTEL_830_M_0, PCI_VENDOR_ID_INTEL, INTEL_I830_M, "Intel", "i830M", intel_generic_setup }, ... Anyway, thanks tons for your help! I'm including the patch in this message (against redhat srpm kernel-2.4.15-0.3) and CC:ing dri-devel and redhat kernel maintainer. PS. Also included are gltestperf results. Bjorn Helgaas wrote: > > Your init changes look reasonable. I wonder if this ever worked on any > 830 chipset. It just looks broken to me. > > >From a quick look at the specs (from developer.intel.com), the 810 appears > to have only two PCI devices: > > 7120 Graphics Memory Controller Hub > 7121 Chipset Graphics Controller > > while the 830 has three: > > 3575 something like the GMCH > 3576 AGP bridge > 3577 integrated graphics device > > Actually, I guess the 830 comes in three flavors, the 830MP, 830M, and > 830MG, and the 3577 is not present on the 830MP, which must be what you > have. Maybe the existing code DOES work, but only on 830M and 830MG? > > I don't know if the 810 device #1 (7121) combines the functionality of the > 3576 and 3577 in the 830 or what. In any case, you changed it to look for > the 3576, which seems to make sense, but then the code goes on to > reference MMADDR, which is a CSR in the 3577. The offset of MMADDR (0x14) > is reserved in the 3577, so I'm not surprised that you get zeroes back. > > I'll have to read the specs more to see what MMADDR is and what the 830MP > ought to do. On the face of it, it looks like a graphics device CSR, > which would correspond to something in Radeon for you. I suppose the > integrated graphics devices have the AGP bridge and the actual graphics > device all mixed up together or something. > > Bjorn
diff -Pru kernel-2.4.15.orig/linux/drivers/char/agp/agp.h kernel-2.4.15/linux/drivers/char/agp/agp.h --- kernel-2.4.15.orig/linux/drivers/char/agp/agp.h Fri Nov 9 15:01:21 2001 +++ kernel-2.4.15/linux/drivers/char/agp/agp.h Wed Dec 12 01:12:48 2001 @@ -176,6 +176,9 @@ #ifndef PCI_DEVICE_ID_INTEL_830_M_1 #define PCI_DEVICE_ID_INTEL_830_M_1 0x3577 #endif +#ifndef PCI_DEVICE_ID_INTEL_830_M_2 +#define PCI_DEVICE_ID_INTEL_830_M_2 0x3576 +#endif #ifndef PCI_DEVICE_ID_INTEL_820_0 #define PCI_DEVICE_ID_INTEL_820_0 0x2500 #endif diff -Pru kernel-2.4.15.orig/linux/drivers/char/agp/agpgart_be.c kernel-2.4.15/linux/drivers/char/agp/agpgart_be.c --- kernel-2.4.15.orig/linux/drivers/char/agp/agpgart_be.c Fri Nov 16 11:11:22 2001 +++ kernel-2.4.15/linux/drivers/char/agp/agpgart_be.c Wed Dec 12 01:12:59 2001 @@ -3877,12 +3877,23 @@ case PCI_DEVICE_ID_INTEL_830_M_0: i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, - PCI_DEVICE_ID_INTEL_830_M_1, - NULL); - if(PCI_FUNC(i810_dev->devfn) != 0) { + +PCI_DEVICE_ID_INTEL_830_M_1, + NULL); + if (!i810_dev) { // no integrated graphics chip i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, - PCI_DEVICE_ID_INTEL_830_M_1, - i810_dev); + +PCI_DEVICE_ID_INTEL_830_M_2, + NULL); + if (i810_dev) // we at least found PCI bridge + break; // probably an i830MP + // try generic_intel_setup + } + + if (i810_dev) { + if(PCI_FUNC(i810_dev->devfn) != 0) { + i810_dev = +pci_find_device(PCI_VENDOR_ID_INTEL, + +PCI_DEVICE_ID_INTEL_830_M_1, + i810_dev); + } } if (i810_dev == NULL) {
Simple Points 611758.320951 Pnts/sec Smooth Lines SIZE=480 => 62172.848382 Lins/sec SIZE=250 => 119109.450165 Lins/sec SIZE=100 => 259200.930830 Lins/sec SIZE=050 => 456408.022948 Lins/sec SIZE=025 => 612694.524409 Lins/sec ZSmooth Triangles SIZE=480 => 3326.611141 Tris/sec SIZE=250 => 8875.957743 Tris/sec SIZE=100 => 125995.359372 Tris/sec SIZE=050 => 237869.653815 Tris/sec SIZE=025 => 1790437.945452 Tris/sec ZSmooth Tex Blend Triangles SIZE=480 => 2043.339656 Tris/sec SIZE=250 => 7647.023943 Tris/sec SIZE=100 => 68833.965034 Tris/sec SIZE=050 => 566255.358507 Tris/sec SIZE=025 => 1501180.981148 Tris/sec ZSmooth Tex Blend TMesh Triangles SIZE=400 => 1395.421900 Tris/sec, MPixel Fill/sec: 111.633752 SIZE=250 => 3416.629010 Tris/sec, MPixel Fill/sec: 106.769657 SIZE=100 => 13966.596378 Tris/sec, MPixel Fill/sec: 69.832982 SIZE=050 => 51606.050041 Tris/sec, MPixel Fill/sec: 64.507563 SIZE=025 => 199438.350504 Tris/sec, MPixel Fill/sec: 62.324485 SIZE=010 => 684720.187654 Tris/sec, MPixel Fill/sec: 34.236009 SIZE=005 => 2296259.426325 Tris/sec, MPixel Fill/sec: 28.703243 SIZE=002 => 2289544.598597 Tris/sec, MPixel Fill/sec: 4.579089 Color/Depth Buffer Clears 421.228680 Clrs/sec, MPixel Fill/sec: 129.281822 [root@troyslaptop root]# gltestperf > glperf GLTest v1.0 Written by David Bucciarelli Benchmark: 0 Elapsed time for the calibration test (3519): 2.000000 Selected number of benchmark iterations: 8797 Elapsed time for run 0: 6.902000 Elapsed time for run 1: 6.907000 Elapsed time for run 2: 6.898000 Elapsed time for run 3: 6.928000 Elapsed time for run 4: 6.871000 Benchmark: 1 Current size: 480 Elapsed time for the calibration test (246): 2.003000 Selected number of benchmark iterations: 614 Elapsed time for run 0: 4.745000 Elapsed time for run 1: 4.738000 Elapsed time for run 2: 4.738000 Elapsed time for run 3: 4.748000 Elapsed time for run 4: 4.723000 Current size: 250 Elapsed time for the calibration test (857): 2.002000 Selected number of benchmark iterations: 2140 Elapsed time for run 0: 4.484000 Elapsed time for run 1: 4.507000 Elapsed time for run 2: 4.505000 Elapsed time for run 3: 4.485000 Elapsed time for run 4: 4.485000 Current size: 100 Elapsed time for the calibration test (4239): 2.000000 Selected number of benchmark iterations: 10597 Elapsed time for run 0: 4.127000 Elapsed time for run 1: 4.084000 Elapsed time for run 2: 4.083000 Elapsed time for run 3: 4.092000 Elapsed time for run 4: 4.089000 Current size: 50 Elapsed time for the calibration test (12564): 2.000000 Selected number of benchmark iterations: 31410 Elapsed time for run 0: 3.458000 Elapsed time for run 1: 3.439000 Elapsed time for run 2: 3.428000 Elapsed time for run 3: 3.441000 Elapsed time for run 4: 3.443000 Current size: 25 Elapsed time for the calibration test (27511): 2.000000 Selected number of benchmark iterations: 68777 Elapsed time for run 0: 2.798000 Elapsed time for run 1: 2.802000 Elapsed time for run 2: 2.810000 Elapsed time for run 3: 2.813000 Elapsed time for run 4: 2.807000 Benchmark: 2 Current size: 480 Elapsed time for the calibration test (73): 2.008000 Selected number of benchmark iterations: 181 Elapsed time for run 0: 5.219000 Elapsed time for run 1: 5.223000 Elapsed time for run 2: 5.228000 Elapsed time for run 3: 5.211000 Elapsed time for run 4: 6.846000 Current size: 250 Elapsed time for the calibration test (387): 2.002000 Selected number of benchmark iterations: 966 Elapsed time for run 0: 5.440000 Elapsed time for run 1: 5.443000 Elapsed time for run 2: 5.443000 Elapsed time for run 3: 5.442000 Elapsed time for run 4: 5.386000 Current size: 100 Elapsed time for the calibration test (5439): 2.000000 Selected number of benchmark iterations: 13597 Elapsed time for run 0: 2.149000 Elapsed time for run 1: 2.154000 Elapsed time for run 2: 2.184000 Elapsed time for run 3: 2.172000 Elapsed time for run 4: 2.102000 Current size: 50 Elapsed time for the calibration test (5985): 2.000000 Selected number of benchmark iterations: 14962 Elapsed time for run 0: 1.501000 Elapsed time for run 1: 0.628000 Elapsed time for run 2: 0.632000 Elapsed time for run 3: 0.627000 Elapsed time for run 4: 0.626000 Current size: 25 Elapsed time for the calibration test (97591): 2.000000 Selected number of benchmark iterations: 243977 Elapsed time for run 0: 0.681000 Elapsed time for run 1: 0.681000 Elapsed time for run 2: 0.684000 Elapsed time for run 3: 0.682000 Elapsed time for run 4: 0.681000 Benchmark: 3 Current size: 480 Elapsed time for the calibration test (52): 2.014000 Selected number of benchmark iterations: 129 Elapsed time for run 0: 6.055000 Elapsed time for run 1: 6.057000 Elapsed time for run 2: 6.063000 Elapsed time for run 3: 6.062000 Elapsed time for run 4: 6.071000 Current size: 250 Elapsed time for the calibration test (342): 2.003000 Selected number of benchmark iterations: 853 Elapsed time for run 0: 6.469000 Elapsed time for run 1: 6.421000 Elapsed time for run 2: 4.766000 Elapsed time for run 3: 5.153000 Elapsed time for run 4: 5.158000 Current size: 100 Elapsed time for the calibration test (4270): 2.000000 Selected number of benchmark iterations: 10675 Elapsed time for run 0: 3.098000 Elapsed time for run 1: 3.140000 Elapsed time for run 2: 3.102000 Elapsed time for run 3: 3.105000 Elapsed time for run 4: 3.091000 Current size: 50 Elapsed time for the calibration test (26312): 2.000000 Selected number of benchmark iterations: 65780 Elapsed time for run 0: 1.161000 Elapsed time for run 1: 1.167000 Elapsed time for run 2: 1.163000 Elapsed time for run 3: 1.161000 Elapsed time for run 4: 1.155000 Current size: 25 Elapsed time for the calibration test (87469): 2.000000 Selected number of benchmark iterations: 218672 Elapsed time for run 0: 0.727000 Elapsed time for run 1: 0.733000 Elapsed time for run 2: 0.725000 Elapsed time for run 3: 0.725000 Elapsed time for run 4: 0.738000 Benchmark: 4 Current size: 400 Elapsed time for the calibration test (1332): 2.001000 Selected number of benchmark iterations: 3328 Elapsed time for run 0: 9.551000 Elapsed time for run 1: 9.550000 Elapsed time for run 2: 9.468000 Elapsed time for run 3: 9.526000 Elapsed time for run 4: 9.539000 Current size: 250 Elapsed time for the calibration test (3278): 2.000000 Selected number of benchmark iterations: 8195 Elapsed time for run 0: 9.602000 Elapsed time for run 1: 9.615000 Elapsed time for run 2: 9.584000 Elapsed time for run 3: 9.589000 Elapsed time for run 4: 9.590000 Current size: 100 Elapsed time for the calibration test (12683): 2.000000 Selected number of benchmark iterations: 31707 Elapsed time for run 0: 9.082000 Elapsed time for run 1: 9.079000 Elapsed time for run 2: 9.081000 Elapsed time for run 3: 9.085000 Elapsed time for run 4: 9.029000 Current size: 50 Elapsed time for the calibration test (39221): 2.000000 Selected number of benchmark iterations: 98052 Elapsed time for run 0: 7.618000 Elapsed time for run 1: 7.574000 Elapsed time for run 2: 7.597000 Elapsed time for run 3: 7.597000 Elapsed time for run 4: 7.606000 Current size: 25 Elapsed time for the calibration test (92872): 2.000000 Selected number of benchmark iterations: 232180 Elapsed time for run 0: 4.632000 Elapsed time for run 1: 4.670000 Elapsed time for run 2: 4.644000 Elapsed time for run 3: 4.657000 Elapsed time for run 4: 4.669000 Current size: 10 Elapsed time for the calibration test (125304): 2.000000 Selected number of benchmark iterations: 313260 Elapsed time for run 0: 1.842000 Elapsed time for run 1: 1.834000 Elapsed time for run 2: 1.828000 Elapsed time for run 3: 1.828000 Elapsed time for run 4: 1.815000 Current size: 5 Elapsed time for the calibration test (146961): 2.000000 Selected number of benchmark iterations: 367402 Elapsed time for run 0: 0.644000 Elapsed time for run 1: 0.640000 Elapsed time for run 2: 0.634000 Elapsed time for run 3: 0.643000 Elapsed time for run 4: 0.637000 Current size: 2 Elapsed time for the calibration test (153476): 2.000000 Selected number of benchmark iterations: 383690 Elapsed time for run 0: 0.673000 Elapsed time for run 1: 0.675000 Elapsed time for run 2: 0.666000 Elapsed time for run 3: 0.670000 Elapsed time for run 4: 0.668000 Benchmark: 5 Elapsed time for the calibration test (823): 2.000000 Selected number of benchmark iterations: 2057 Elapsed time for run 0: 4.864000 Elapsed time for run 1: 4.897000 Elapsed time for run 2: 4.894000 Elapsed time for run 3: 4.880000 Elapsed time for run 4: 4.876000 [root@troyslaptop root]#