Module Name:    src
Committed By:   macallan
Date:           Mon Feb 28 10:05:04 UTC 2011

Modified Files:
        src/sys/arch/shark/ofw: igsfb_ofbus.c

Log Message:
use ARM32_MMAP_WRITECOMBINE when mmap()ing video memory for improved X11 speed


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/shark/ofw/igsfb_ofbus.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/arch/shark/ofw/igsfb_ofbus.c
diff -u src/sys/arch/shark/ofw/igsfb_ofbus.c:1.10 src/sys/arch/shark/ofw/igsfb_ofbus.c:1.11
--- src/sys/arch/shark/ofw/igsfb_ofbus.c:1.10	Wed Nov 11 17:05:11 2009
+++ src/sys/arch/shark/ofw/igsfb_ofbus.c	Mon Feb 28 10:05:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: igsfb_ofbus.c,v 1.10 2009/11/11 17:05:11 macallan Exp $ */
+/*	$NetBSD: igsfb_ofbus.c,v 1.11 2011/02/28 10:05:04 macallan Exp $ */
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igsfb_ofbus.c,v 1.10 2009/11/11 17:05:11 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igsfb_ofbus.c,v 1.11 2011/02/28 10:05:04 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -39,10 +39,12 @@
 #include <sys/device.h>
 #include <sys/malloc.h>
 #include <sys/buf.h>
+#include <uvm/uvm.h>
 
 #include <machine/bus.h>
 #include <machine/intr.h>
 #include <machine/ofw.h>
+#include <machine/pmap.h>
 
 #include <dev/isa/isavar.h>
 
@@ -255,6 +257,10 @@
 	 * registers on CyberPro at its physical address
 	 */
 	if ((offset >= igsfb_mem_paddr) && 
+	    (offset < (igsfb_mem_paddr + 0x00800000))) {
+		return (arm_btop(offset) | ARM32_MMAP_WRITECOMBINE);
+	}
+	if ((offset >= (igsfb_mem_paddr + 0x00800000)) && 
 	    (offset < (igsfb_mem_paddr + 0x01000000)))
 		return arm_btop(offset);
 

Reply via email to