diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-03-01 10:48:55 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-03-01 10:48:55 +0000 |
commit | 78920aa6655361a3e50a412ccdf2f9d81de6ea2f (patch) | |
tree | 3671b8faf2d95a85182c5db9912098c6e7b8d3df /sys | |
parent | 8d9aa9157af166e0586be5cd7bcea004b9ad4ff9 (diff) |
Don't let an mmio area replace the frame buffer if they are the same size.
Seen on a Tech Source Raptor.
ok miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/macppc/pci/vgafb_pci.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/vgafb.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/macppc/pci/vgafb_pci.c b/sys/arch/macppc/pci/vgafb_pci.c index 97c05b31fd3..924ccbe65ba 100644 --- a/sys/arch/macppc/pci/vgafb_pci.c +++ b/sys/arch/macppc/pci/vgafb_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb_pci.c,v 1.19 2007/11/05 19:24:31 martin Exp $ */ +/* $OpenBSD: vgafb_pci.c,v 1.20 2009/03/01 10:48:54 kettenis Exp $ */ /* $NetBSD: vga_pci.c,v 1.4 1996/12/05 01:39:38 cgd Exp $ */ /* @@ -143,7 +143,7 @@ vgafb_pci_probe(struct pci_attach_args *pa, int id, u_int32_t *ioaddr, * or mmio, we guess that memory is * the larger of the two. */ - if (*memaddr > size) { + if (*memaddr >= size) { /* this is the mmio */ *mmioaddr = addr; /* ATI driver maps 0x80000 mmio, grr */ diff --git a/sys/arch/sparc64/dev/vgafb.c b/sys/arch/sparc64/dev/vgafb.c index 6978da34132..2c2f5b49664 100644 --- a/sys/arch/sparc64/dev/vgafb.c +++ b/sys/arch/sparc64/dev/vgafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb.c,v 1.56 2008/12/29 22:07:35 miod Exp $ */ +/* $OpenBSD: vgafb.c,v 1.57 2009/03/01 10:48:54 kettenis Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -438,7 +438,7 @@ vgafb_mapregs(sc, pa) * or mmio, we guess that memory is * the larger of the two. */ - if (sc->sc_mem_size > bs) { + if (sc->sc_mem_size >= bs) { /* this is the mmio */ sc->sc_mmio_addr = ba; /* ATI driver maps 0x80000 mmio, grr */ |