diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-03-30 00:08:15 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-03-30 00:08:15 +0000 |
commit | 08f37334c76f5dd735c9d10a2c7fc36e7b45e3f3 (patch) | |
tree | 7b03039731b13f0b22fb8e28cc23deadffd5f958 /sys/arch/sparc64 | |
parent | 3827e941de402e0d054b0bdaec19d1221a37df9f (diff) |
Don't honor native accesses unless VGAFB_ALLOW_NATIVE is defined (this is
a temporary workaround that will be backed out when more work is done
elsewhere)
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/vgafb.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/vgafb.c b/sys/arch/sparc64/dev/vgafb.c index 8039e502f30..5bd27ef6686 100644 --- a/sys/arch/sparc64/dev/vgafb.c +++ b/sys/arch/sparc64/dev/vgafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb.c,v 1.12 2002/03/28 04:28:38 jason Exp $ */ +/* $OpenBSD: vgafb.c,v 1.13 2002/03/30 00:08:14 jason Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -53,6 +53,8 @@ #include <dev/wscons/wscons_raster.h> #include <dev/rcons/raster.h> +#undef VGAFB_ALLOW_NATIVE + struct vgafb_softc { struct device sc_dev; struct sbusdev sc_sd; @@ -415,12 +417,15 @@ vgafb_mmap(v, off, prot) int prot; { struct vgafb_softc *sc = v; +#ifdef VGAFB_ALLOW_NATIVE bus_addr_t ba; bus_size_t bs; +#endif if (off & PGOFSET) return (-1); +#ifdef VGAFB_ALLOW_NATIVE /* See if this is a native mapping of pixel memory */ if ((pci_mem_find(sc->sc_pci_chip, sc->sc_pci_tag, sc->sc_mem_cf, &ba, &bs, NULL) == 0) && @@ -436,6 +441,7 @@ vgafb_mmap(v, off, prot) return (bus_space_mmap(sc->sc_mem_t, ba, off - ba, prot, BUS_SPACE_MAP_LINEAR)); } +#endif /* Lastly, this might be a request for a "dumb" framebuffer map */ if (off >= 0 && off < sc->sc_mem_size) { @@ -443,7 +449,7 @@ vgafb_mmap(v, off, prot) BUS_SPACE_MAP_LINEAR)); } -#if 0 +#ifdef VGAFB_ALLOW_NATIVE /* Don't allow mapping of the shadow rom right now... needs work */ if (sc->sc_rom_ptr != NULL && off >= sc->sc_rom_addr && |