Module Name:    src
Committed By:   markd
Date:           Mon May  4 11:05:45 UTC 2009

Modified Files:
        src/sys/dev/pci: agp_i810.c

Log Message:
Treat G4X like I915 and G33 for MSAC.  Fixes aperture setting.
Has been working successfully for me and snj for the last few months.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/agp_i810.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/agp_i810.c
diff -u src/sys/dev/pci/agp_i810.c:1.63 src/sys/dev/pci/agp_i810.c:1.64
--- src/sys/dev/pci/agp_i810.c:1.63	Thu Feb 19 05:58:37 2009
+++ src/sys/dev/pci/agp_i810.c	Mon May  4 11:05:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_i810.c,v 1.63 2009/02/19 05:58:37 markd Exp $	*/
+/*	$NetBSD: agp_i810.c,v 1.64 2009/05/04 11:05:45 markd Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.63 2009/02/19 05:58:37 markd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.64 2009/05/04 11:05:45 markd Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -706,6 +706,7 @@
 		break;
 	case CHIP_I915:
 	case CHIP_G33:
+	case CHIP_G4X:
 		reg = pci_conf_read(sc->as_pc, sc->as_tag, AGP_I915_MSAC);
 		msac = (u_int16_t)(reg >> 16);
 		if (msac & AGP_I915_MSAC_APER_128M)
@@ -716,16 +717,6 @@
 	case CHIP_I965:
 		size = 512 * 1024 * 1024;
 		break;
-	case CHIP_G4X:
-		reg = pci_conf_read(sc->as_pc, sc->as_tag, AGP_G4X_MSAC);
-		msac = (u_int16_t)(reg >> 16);
-		switch (msac & AGP_G4X_MSAC_MASK) {
-		case AGP_G4X_MSAC_APER_256M:
-			size = 256 * 1024 * 1024;		
-		case AGP_G4X_MSAC_APER_512M:
-			size = 512 * 1024 * 1024;
-		}
-		break;
 	default:
 		aprint_error(": Unknown chipset\n");
 	}

Reply via email to