Module Name:    src
Committed By:   jmcneill
Date:           Thu Feb 10 10:23:20 UTC 2011

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

Log Message:
Use BUS_SPACE_MAP_PREFETCHABLE when mapping the framebuffer.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/genfb_pci.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/genfb_pci.c
diff -u src/sys/dev/pci/genfb_pci.c:1.28 src/sys/dev/pci/genfb_pci.c:1.29
--- src/sys/dev/pci/genfb_pci.c:1.28	Wed Feb  9 13:19:53 2011
+++ src/sys/dev/pci/genfb_pci.c	Thu Feb 10 10:23:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb_pci.c,v 1.28 2011/02/09 13:19:53 jmcneill Exp $ */
+/*	$NetBSD: genfb_pci.c,v 1.29 2011/02/10 10:23:20 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.28 2011/02/09 13:19:53 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.29 2011/02/10 10:23:20 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -132,8 +132,9 @@
 	}
 
 	if (bus_space_map(sc->sc_memt, sc->sc_gen.sc_fboffset,
-	    sc->sc_gen.sc_fbsize, BUS_SPACE_MAP_LINEAR, &sc->sc_memh) != 0) {
-
+	    sc->sc_gen.sc_fbsize,
+	    BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE,
+	    &sc->sc_memh) != 0) {
 		aprint_error_dev(self, "unable to map the framebuffer\n");
 		return;
 	}
@@ -244,7 +245,8 @@
 	    (sc->sc_want_wsfb == 1)) {
 
 		return bus_space_mmap(sc->sc_memt, sc->sc_gen.sc_fboffset,
-		   offset, prot, BUS_SPACE_MAP_LINEAR);
+		   offset, prot,
+		   BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE);
 	}
 
 	/*

Reply via email to