From 08f37334c76f5dd735c9d10a2c7fc36e7b45e3f3 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Sat, 30 Mar 2002 00:08:15 +0000 Subject: 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) --- sys/arch/sparc64/dev/vgafb.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc64/dev/vgafb.c') 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 #include +#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 && -- cgit v1.2.3