diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-03-13 19:40:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-03-13 19:40:50 +0000 |
commit | 1adb1d0fd1934ebb394bc3e83bc34a6408fd8c18 (patch) | |
tree | c5394e174cead1767b05195a67d530f69153abfa /sys/arch | |
parent | 1a194b3d7d135ee33f0c5d0235e27315e971a3b6 (diff) |
When about to run X11 in 32 bpp mode, advertize correctly that we are
really using 24 bpp pixels on 32 bit boundaries.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/cgfourteen.c | 8 | ||||
-rw-r--r-- | sys/arch/sparc/dev/cgtwelve.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc/dev/tcx.c | 8 | ||||
-rw-r--r-- | sys/arch/sparc/dev/tvtwo.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc/dev/zx.c | 5 |
5 files changed, 26 insertions, 5 deletions
diff --git a/sys/arch/sparc/dev/cgfourteen.c b/sys/arch/sparc/dev/cgfourteen.c index 12a70381269..8eb5da0fa02 100644 --- a/sys/arch/sparc/dev/cgfourteen.c +++ b/sys/arch/sparc/dev/cgfourteen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgfourteen.c,v 1.34 2007/02/18 18:40:35 miod Exp $ */ +/* $OpenBSD: cgfourteen.c,v 1.35 2007/03/13 19:40:48 miod Exp $ */ /* $NetBSD: cgfourteen.c,v 1.7 1997/05/24 20:16:08 pk Exp $ */ /* @@ -357,6 +357,12 @@ cgfourteen_ioctl(void *dev, u_long cmd, caddr_t data, int flags, struct proc *p) wdf->depth = sc->sc_32 ? 32 : 8; wdf->cmsize = sc->sc_32 ? 0 : 256; break; + case WSDISPLAYIO_GETSUPPORTEDDEPTH: + if (sc->sc_32) + *(u_int *)data = WSDISPLAYIO_DEPTH_24_32; + else + return (-1); + break; case WSDISPLAYIO_LINEBYTES: if (sc->sc_32) *(u_int *)data = sc->sc_sunfb.sf_linebytes * 4; diff --git a/sys/arch/sparc/dev/cgtwelve.c b/sys/arch/sparc/dev/cgtwelve.c index 070877e0d0d..1deddc5c919 100644 --- a/sys/arch/sparc/dev/cgtwelve.c +++ b/sys/arch/sparc/dev/cgtwelve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgtwelve.c,v 1.15 2006/06/02 20:00:54 miod Exp $ */ +/* $OpenBSD: cgtwelve.c,v 1.16 2007/03/13 19:40:48 miod Exp $ */ /* * Copyright (c) 2002, 2003 Miodrag Vallat. All rights reserved. @@ -233,6 +233,9 @@ cgtwelve_ioctl(void *dev, u_long cmd, caddr_t data, int flags, struct proc *p) wdf->depth = 32; wdf->cmsize = 0; break; + case WSDISPLAYIO_GETSUPPORTEDDEPTH: + *(u_int *)data = WSDISPLAYIO_DEPTH_24_32; + break; case WSDISPLAYIO_LINEBYTES: *(u_int *)data = sc->sc_sunfb.sf_linebytes * 32; break; diff --git a/sys/arch/sparc/dev/tcx.c b/sys/arch/sparc/dev/tcx.c index 43dac914c75..39e8428c0e6 100644 --- a/sys/arch/sparc/dev/tcx.c +++ b/sys/arch/sparc/dev/tcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcx.c,v 1.29 2007/02/18 18:40:35 miod Exp $ */ +/* $OpenBSD: tcx.c,v 1.30 2007/03/13 19:40:48 miod Exp $ */ /* $NetBSD: tcx.c,v 1.8 1997/07/29 09:58:14 fair Exp $ */ /* @@ -278,6 +278,12 @@ tcx_ioctl(void *dev, u_long cmd, caddr_t data, int flags, struct proc *p) wdf->depth = sc->sc_sunfb.sf_depth; wdf->cmsize = sc->sc_cplane == NULL ? 256 : 0; break; + case WSDISPLAYIO_GETSUPPORTEDDEPTH: + if (sc->sc_cplane != NULL) + *(u_int *)data = WSDISPLAYIO_DEPTH_24_32; + else + return (-1); + break; case WSDISPLAYIO_LINEBYTES: if (sc->sc_cplane == NULL) *(u_int *)data = sc->sc_sunfb.sf_linebytes; diff --git a/sys/arch/sparc/dev/tvtwo.c b/sys/arch/sparc/dev/tvtwo.c index 4dc152b6fcc..46536579317 100644 --- a/sys/arch/sparc/dev/tvtwo.c +++ b/sys/arch/sparc/dev/tvtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tvtwo.c,v 1.13 2006/08/14 12:24:30 miod Exp $ */ +/* $OpenBSD: tvtwo.c,v 1.14 2007/03/13 19:40:48 miod Exp $ */ /* * Copyright (c) 2003, 2006, Miodrag Vallat. * All rights reserved. @@ -294,6 +294,9 @@ tvtwo_ioctl(void *dev, u_long cmd, caddr_t data, int flags, struct proc *p) wdf->depth = 32; wdf->cmsize = 0; break; + case WSDISPLAYIO_GETSUPPORTEDDEPTH: + *(u_int *)data = WSDISPLAYIO_DEPTH_24_32; + break; case WSDISPLAYIO_LINEBYTES: *(u_int *)data = sc->sc_sunfb.sf_linebytes * 4; break; diff --git a/sys/arch/sparc/dev/zx.c b/sys/arch/sparc/dev/zx.c index 49e289bd687..ff128a62b9e 100644 --- a/sys/arch/sparc/dev/zx.c +++ b/sys/arch/sparc/dev/zx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zx.c,v 1.18 2006/12/03 17:10:40 miod Exp $ */ +/* $OpenBSD: zx.c,v 1.19 2007/03/13 19:40:48 miod Exp $ */ /* $NetBSD: zx.c,v 1.5 2002/10/02 16:52:46 thorpej Exp $ */ /* @@ -320,6 +320,9 @@ zx_ioctl(void *dev, u_long cmd, caddr_t data, int flags, struct proc *p) wdf->depth = 32; wdf->cmsize = 0; break; + case WSDISPLAYIO_GETSUPPORTEDDEPTH: + *(u_int *)data = WSDISPLAYIO_DEPTH_24_32; + break; case WSDISPLAYIO_LINEBYTES: *(u_int *)data = sc->sc_sunfb.sf_linebytes; break; |