Add AGP support for a number of Intel onboard devices, including trunk
authorriz <riz@NetBSD.org>
Wed, 16 Jun 2010 03:35:01 +0000
branchtrunk
changeset 191591 23fae0b4be25
parent 191590 ede6949e7b68
child 191592 1dfbbf290110
Add AGP support for a number of Intel onboard devices, including 82G41, 82B43, E7221, 82965GME, and "Iron Lake". Device types (i915, i965, G33, and G4X variants) from the Linux Intel AGP driver, and (for 82G41) from Henry Bent in PR#42906. There are a few more varieties that should be relatively low-hanging fruit ("Pineview" and "Sandy Bridge"), but will require a little bit of rejiggering of the "chiptype". OK mrg@
sys/arch/x86/pci/pchb.c
sys/dev/pci/agp.c
sys/dev/pci/agp_i810.c
--- a/sys/arch/x86/pci/pchb.c	Wed Jun 16 03:28:49 2010 +0000
+++ b/sys/arch/x86/pci/pchb.c	Wed Jun 16 03:35:01 2010 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: pchb.c,v 1.21 2010/02/24 22:37:55 dyoung Exp $ */
+/*	$NetBSD: pchb.c,v 1.22 2010/06/16 03:35:01 riz Exp $ */
 
 /*-
  * Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.21 2010/02/24 22:37:55 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.22 2010/06/16 03:35:01 riz Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -386,6 +386,14 @@
 		case PCI_PRODUCT_INTEL_82IGD_E_HB:
 		case PCI_PRODUCT_INTEL_82Q45_HB:
 		case PCI_PRODUCT_INTEL_82G45_HB:
+		case PCI_PRODUCT_INTEL_82G41_HB:
+		case PCI_PRODUCT_INTEL_E7221_HB:
+		case PCI_PRODUCT_INTEL_82965GME_HB:
+		case PCI_PRODUCT_INTEL_82B43_HB:
+		case PCI_PRODUCT_INTEL_IRONLAKE_D_HB:
+		case PCI_PRODUCT_INTEL_IRONLAKE_M_HB:
+		case PCI_PRODUCT_INTEL_IRONLAKE_MA_HB:
+		case PCI_PRODUCT_INTEL_IRONLAKE_MC2_HB:
 			/*
 			 * The host bridge is either in GFX mode (internal
 			 * graphics) or in AGP mode. In GFX mode, we pretend
--- a/sys/dev/pci/agp.c	Wed Jun 16 03:28:49 2010 +0000
+++ b/sys/dev/pci/agp.c	Wed Jun 16 03:35:01 2010 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp.c,v 1.68 2010/02/24 22:37:59 dyoung Exp $	*/
+/*	$NetBSD: agp.c,v 1.69 2010/06/16 03:35:01 riz Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -65,7 +65,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.68 2010/02/24 22:37:59 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.69 2010/06/16 03:35:01 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -192,6 +192,22 @@
 	  NULL, 		agp_i810_attach },
 	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82G45_HB,
 	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82G41_HB,
+	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_E7221_HB,
+	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82965GME_HB,
+	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_82B43_HB,
+	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_IRONLAKE_D_HB,
+	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_IRONLAKE_M_HB,
+	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_IRONLAKE_MA_HB,
+	  NULL, 		agp_i810_attach },
+	{ PCI_VENDOR_INTEL,	PCI_PRODUCT_INTEL_IRONLAKE_MC2_HB,
+	  NULL, 		agp_i810_attach },
 #endif
 
 #if NAGP_INTEL > 0
--- a/sys/dev/pci/agp_i810.c	Wed Jun 16 03:28:49 2010 +0000
+++ b/sys/dev/pci/agp_i810.c	Wed Jun 16 03:35:01 2010 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_i810.c,v 1.67 2010/04/04 14:40:05 jakllsch Exp $	*/
+/*	$NetBSD: agp_i810.c,v 1.68 2010/06/16 03:35:01 riz Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.67 2010/04/04 14:40:05 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.68 2010/06/16 03:35:01 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -171,6 +171,7 @@
 	case PCI_PRODUCT_INTEL_82945GM_IGD:
 	case PCI_PRODUCT_INTEL_82945GM_IGD_1:
 	case PCI_PRODUCT_INTEL_82945GME_IGD:
+	case PCI_PRODUCT_INTEL_E7221_IGD:
 	case PCI_PRODUCT_INTEL_82965Q_IGD:
 	case PCI_PRODUCT_INTEL_82965Q_IGD_1:
 	case PCI_PRODUCT_INTEL_82965PM_IGD:
@@ -179,6 +180,7 @@
 	case PCI_PRODUCT_INTEL_82G33_IGD_1:
 	case PCI_PRODUCT_INTEL_82965G_IGD:
 	case PCI_PRODUCT_INTEL_82965G_IGD_1:
+	case PCI_PRODUCT_INTEL_82965GME_IGD:
 	case PCI_PRODUCT_INTEL_82Q35_IGD:
 	case PCI_PRODUCT_INTEL_82Q35_IGD_1:
 	case PCI_PRODUCT_INTEL_82Q33_IGD:
@@ -191,6 +193,10 @@
 	case PCI_PRODUCT_INTEL_82IGD_E_IGD:
 	case PCI_PRODUCT_INTEL_82Q45_IGD:
 	case PCI_PRODUCT_INTEL_82G45_IGD:
+	case PCI_PRODUCT_INTEL_82G41_IGD:
+	case PCI_PRODUCT_INTEL_82B43_IGD:
+	case PCI_PRODUCT_INTEL_IRONLAKE_D_IGD:
+	case PCI_PRODUCT_INTEL_IRONLAKE_M_IGD:
 		return (1);
 	}
 
@@ -274,6 +280,7 @@
 	case PCI_PRODUCT_INTEL_82945GM_IGD:
 	case PCI_PRODUCT_INTEL_82945GM_IGD_1:
 	case PCI_PRODUCT_INTEL_82945GME_IGD:
+	case PCI_PRODUCT_INTEL_E7221_IGD:
 		isc->chiptype = CHIP_I915;
 		break;
 	case PCI_PRODUCT_INTEL_82965Q_IGD:
@@ -282,6 +289,7 @@
 	case PCI_PRODUCT_INTEL_82965PM_IGD_1:
 	case PCI_PRODUCT_INTEL_82965G_IGD:
 	case PCI_PRODUCT_INTEL_82965G_IGD_1:
+	case PCI_PRODUCT_INTEL_82965GME_IGD:
 	case PCI_PRODUCT_INTEL_82946GZ_IGD:
 	case PCI_PRODUCT_INTEL_82G35_IGD:
 	case PCI_PRODUCT_INTEL_82G35_IGD_1:
@@ -300,6 +308,10 @@
 	case PCI_PRODUCT_INTEL_82IGD_E_IGD:
 	case PCI_PRODUCT_INTEL_82Q45_IGD:
 	case PCI_PRODUCT_INTEL_82G45_IGD:
+	case PCI_PRODUCT_INTEL_82G41_IGD:
+	case PCI_PRODUCT_INTEL_82B43_IGD:
+	case PCI_PRODUCT_INTEL_IRONLAKE_D_IGD:
+	case PCI_PRODUCT_INTEL_IRONLAKE_M_IGD:
 		isc->chiptype = CHIP_G4X;
 		break;
 	}