diff options
author | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2013-05-16 13:59:11 +0000 |
---|---|---|
committer | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2013-05-16 13:59:11 +0000 |
commit | 627151165ba1fcf359d08ea37f72c1b6e866691a (patch) | |
tree | eee2a7bc2db2959d56127e55c94ee58719eb65f7 /sys/arch/luna88k | |
parent | 0f6eb1b312e9754d351d10ccb2ec7e37e9a68ef3 (diff) |
Ignore colormap operations at 1bpp, to work with Xorg wsfb driver.
Still need more work in Xorg...
ok miod@
Diffstat (limited to 'sys/arch/luna88k')
-rw-r--r-- | sys/arch/luna88k/dev/lunafb.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/luna88k/dev/lunafb.c b/sys/arch/luna88k/dev/lunafb.c index 1c430f524f8..c9599222d37 100644 --- a/sys/arch/luna88k/dev/lunafb.c +++ b/sys/arch/luna88k/dev/lunafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lunafb.c,v 1.13 2013/04/28 23:33:12 aoyama Exp $ */ +/* $OpenBSD: lunafb.c,v 1.14 2013/05/16 13:59:10 aoyama Exp $ */ /* $NetBSD: lunafb.c,v 1.7.6.1 2002/08/07 01:48:34 lukem Exp $ */ /*- @@ -300,7 +300,7 @@ omfbmmap(v, offset, prot) if ((offset & PAGE_MASK) != 0) return (-1); -#if 0 /* Workaround for making Xorg 1bpp server work */ +#if 0 /* Workaround for making Xorg mono server work */ if (offset >= 0 && offset < OMFB_SIZE) cookie = (paddr_t)(trunc_page(dc->dc_videobase) + offset); #else @@ -320,6 +320,11 @@ omgetcmap(sc, p) int error; cmsize = sc->sc_dc->dc_cmsize; + + /* Don't touch colormap when we use 1bpp */ + if (cmsize == 0) + return (0); + if (index >= cmsize || count > cmsize - index) return (EINVAL); @@ -346,6 +351,11 @@ omsetcmap(sc, p) int error; cmsize = sc->sc_dc->dc_cmsize; + + /* Don't touch colormap when we use 1bpp */ + if (cmsize == 0) + return (0); + if (index >= cmsize || count > cmsize - index) return (EINVAL); @@ -392,7 +402,7 @@ omfb_getdevconfig(paddr, dc) u_int32_t u; } rfcnt; -#if 0 /* Workaround for making Xorg 1bpp server work */ +#if 0 /* Workaround for making Xorg mono server work */ switch (hwplanebits) { case 8: bpp = 8; /* XXX check monochrome bit in DIPSW */ |