Skip to contentSkip to conversation

Intel 820 chipset AGP - Fix for 840, 845, 850, 860 AGP support

PATCH New Nicolas Aspert 1 participant 1 message Nov 6, 2001

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

PATCH 1/1 Intel 820 chipset AGP - Fix for 840, 845, 850, 860 AGP support

Hello all

Following the discussion with Robert Love, here is a patch that :
- provides AGP support for i820 chipset
- fixes several incorrect reads/writes to the APSIZE register. According
to the Intel specs, this register has a size of 8 bits for the 820, 840, 845, 850 and 860 chipsets. As a consequence, the types for the aperture info has been changed to aper_Size_info_8
- the '*tlbflush' was incorrect. The Intel specs give only one bit of the
AGPCTRL to be set to flush the GTLB. The generic function writes this bit, along with two others (why ?)

The patch has been made against 2.4.13-ac7. I have another one available for the 2.4.9 Redhat's kernel at http://ltswww.epfl.ch/~aspert/patches/patch-agp_i820-2.4.9-6_fix_apsize
This one works fine with me (I have i820) _but_ the other chipsets have not been tested. Please report any bug/silly things you may find. I have not tested the patch for 2.4.13-ac7, but it should not break up too many things :-)

Nicolas.

PS: I am not subsribed to linux-kernel, so CC to me your answers/proposals/whatever ;-)

Signature · 2 lines
Nicolas Aspert      Signal Processing Laboratory (LTS)
Swiss Federal Institute of Technology (EPFL)
Documentation/Configure.help +2 -2
diff -Nru linux-2.4.13-ac7.clean/Documentation/Configure.help linux-2.4.13-ac7_i820/Documentation/Configure.help
@@ -3098,10 +3098,10 @@
   a module, say M here and read <file:Documentation/modules.txt>.  The
   module will be called agpgart.o.
 
-Intel 440LX/BX/GX/815/830/840/845/850/860 support
+Intel 440LX/BX/GX/815/820/830/840/845/850/860 support
 CONFIG_AGP_INTEL
   This option gives you AGP support for the GLX component of the
-  XFree86 4.x on Intel 440LX/BX/GX, 815, 830, 840, 845, 850 and 860 chipsets.
+  XFree86 4.x on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850 and 860 chipsets.
 
   You should say Y here if you use XFree86 3.3.6 or 4.x and want to
   use GLX or DRI.  If unsure, say N.
drivers/char/Config.in +1 -1
diff -Nru linux-2.4.13-ac7.clean/drivers/char/Config.in linux-2.4.13-ac7_i820/drivers/char/Config.in
@@ -213,7 +213,7 @@
    bool '  ALI chipset support' CONFIG_AGP_ALI
    bool '  AMD Irongate, 761, and 762 support' CONFIG_AGP_AMD
    bool '  Generic SiS support' CONFIG_AGP_SIS
-   bool '  Intel 440LX/BX/GX and I815/I830/I840/I845/I850/I860 support' CONFIG_AGP_INTEL
+   bool '  Intel 440LX/BX/GX and I815/I820/I830/I840/I845/I850/I860 support' CONFIG_AGP_INTEL
    bool '  Intel I810/I815/I830M (on-board) support' CONFIG_AGP_I810
    bool '  Serverworks LE/HE support' CONFIG_AGP_SWORKS
    bool '  VIA chipset support' CONFIG_AGP_VIA
drivers/char/agp/agp.h +10 -1
diff -Nru linux-2.4.13-ac7.clean/drivers/char/agp/agp.h linux-2.4.13-ac7_i820/drivers/char/agp/agp.h
@@ -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_820_0
+#define PCI_DEVICE_ID_INTEL_820_0       0x2500
+#endif
 #ifndef PCI_DEVICE_ID_INTEL_840_0
 #define PCI_DEVICE_ID_INTEL_840_0		0x1a21
 #endif
@@ -273,9 +276,13 @@
 #define I830_RDRAM_ND(x)           (((x) & 0x20) >> 5)
 #define I830_RDRAM_DDT(x)          (((x) & 0x18) >> 3)
 
+/* intel i820 registers */
+#define INTEL_I820_RDCR     0x51
+#define INTEL_I820_ERRSTS   0xc8
+
 /* intel i840 registers */
 #define INTEL_I840_MCHCFG   0x50
-#define INTEL_I840_ERRSTS	0xc8
+#define INTEL_I840_ERRSTS   0xc8
  
 /* intel i845 registers */
 #define INTEL_I845_AGPM     0x51
@@ -307,6 +314,8 @@
 #define I810_DRAM_ROW_0        0x00000001
 #define I810_DRAM_ROW_0_SDRAM  0x00000001
 
+
+
 /* VIA register */
 #define VIA_APBASE      0x10
 #define VIA_GARTCTRL    0x80
drivers/char/agp/agpgart_be.c +182 -33

333 lines not on this page · raw message

drivers/char/drm/drm_agpsupport.h +1 -0
diff -Nru linux-2.4.13-ac7.clean/drivers/char/drm/drm_agpsupport.h linux-2.4.13-ac7_i820/drivers/char/drm/drm_agpsupport.h
@@ -273,6 +273,7 @@
 
 #if LINUX_VERSION_CODE >= 0x020400
 		case INTEL_I815:	head->chipset = "Intel i815";	 break;
+	 	case INTEL_I820:	head->chipset = "Intel i820";	 break;
 		case INTEL_I840:	head->chipset = "Intel i840";    break;
 		case INTEL_I845:	head->chipset = "Intel i845";    break;
 		case INTEL_I850:	head->chipset = "Intel i850";	 break;
include/linux/agp_backend.h +1 -0
diff -Nru linux-2.4.13-ac7.clean/include/linux/agp_backend.h linux-2.4.13-ac7_i820/include/linux/agp_backend.h
@@ -46,6 +46,7 @@
 	INTEL_GX,
 	INTEL_I810,
 	INTEL_I815,
+	INTEL_I820,
 	INTEL_I830_M,
 	INTEL_I840,
 	INTEL_I845,