summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-10-01 21:06:43 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-10-01 21:06:43 +0000
commit0339078b2931d1fd37be17f300448c8b32ec06e7 (patch)
tree60c32c3f7028a98346b855c78bf1fb10c2d3afee
parent01ae3d3033d6579380a22c684398acc72d523e7e (diff)
Revert last commit. It didn't really help and we fixed X11 instead.
ok miod@
-rw-r--r--sys/arch/sparc64/dev/vgafb.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/arch/sparc64/dev/vgafb.c b/sys/arch/sparc64/dev/vgafb.c
index 98d79f385ac..d0fd962141b 100644
--- a/sys/arch/sparc64/dev/vgafb.c
+++ b/sys/arch/sparc64/dev/vgafb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vgafb.c,v 1.53 2008/08/11 20:56:55 kettenis Exp $ */
+/* $OpenBSD: vgafb.c,v 1.54 2008/10/01 21:06:42 kettenis Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -418,19 +418,10 @@ vgafb_mmap(v, off, prot)
sc->sc_mem_addr, off - sc->sc_mem_addr,
prot, BUS_SPACE_MAP_LINEAR));
- /*
- * ATI Mach64 boards have an mmio region that's
- * typically smaller than a page and therefore may end
- * up being not aligned to a page boundary. Alow the
- * whole page to be mapped and hope the firmware
- * didn't put any resources on the same page that
- * belong to a different device.
- */
- if (off >= trunc_page(sc->sc_mmio_addr) &&
+ if (off >= sc->sc_mmio_addr &&
off < (sc->sc_mmio_addr + sc->sc_mmio_size))
return (bus_space_mmap(sc->sc_mem_t,
- trunc_page(sc->sc_mmio_addr),
- off - trunc_page(sc->sc_mmio_addr),
+ sc->sc_mmio_addr, off - sc->sc_mmio_addr,
prot, BUS_SPACE_MAP_LINEAR));
break;