Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/shark/ofw use ARM32_MMAP_WRITECOMBINE when mmap()in...
details: https://anonhg.NetBSD.org/src/rev/5ba26ca3a8de
branches: trunk
changeset: 762779:5ba26ca3a8de
user: macallan <macallan%NetBSD.org@localhost>
date: Mon Feb 28 10:05:04 2011 +0000
description:
use ARM32_MMAP_WRITECOMBINE when mmap()ing video memory for improved X11 speed
diffstat:
sys/arch/shark/ofw/igsfb_ofbus.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r 80b0b028a770 -r 5ba26ca3a8de sys/arch/shark/ofw/igsfb_ofbus.c
--- a/sys/arch/shark/ofw/igsfb_ofbus.c Mon Feb 28 10:03:49 2011 +0000
+++ b/sys/arch/shark/ofw/igsfb_ofbus.c Mon Feb 28 10:05:04 2011 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index