summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-03-13 19:40:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-03-13 19:40:50 +0000
commit1adb1d0fd1934ebb394bc3e83bc34a6408fd8c18 (patch)
treec5394e174cead1767b05195a67d530f69153abfa /sys
parent1a194b3d7d135ee33f0c5d0235e27315e971a3b6 (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')
-rw-r--r--sys/arch/sparc/dev/cgfourteen.c8
-rw-r--r--sys/arch/sparc/dev/cgtwelve.c5
-rw-r--r--sys/arch/sparc/dev/tcx.c8
-rw-r--r--sys/arch/sparc/dev/tvtwo.c5
-rw-r--r--sys/arch/sparc/dev/zx.c5
-rw-r--r--sys/dev/sbus/cgtwelve.c5
-rw-r--r--sys/dev/sbus/tvtwo.c5
-rw-r--r--sys/dev/sbus/zx.c5
8 files changed, 38 insertions, 8 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;
diff --git a/sys/dev/sbus/cgtwelve.c b/sys/dev/sbus/cgtwelve.c
index 5f5076bd9cb..84782e93dc4 100644
--- a/sys/dev/sbus/cgtwelve.c
+++ b/sys/dev/sbus/cgtwelve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgtwelve.c,v 1.4 2006/06/02 20:00:56 miod Exp $ */
+/* $OpenBSD: cgtwelve.c,v 1.5 2007/03/13 19:40:49 miod Exp $ */
/*
* Copyright (c) 2002, 2003 Miodrag Vallat. All rights reserved.
@@ -276,6 +276,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/dev/sbus/tvtwo.c b/sys/dev/sbus/tvtwo.c
index 57992a03b78..2e227b0d05e 100644
--- a/sys/dev/sbus/tvtwo.c
+++ b/sys/dev/sbus/tvtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tvtwo.c,v 1.10 2006/08/14 12:24:31 miod Exp $ */
+/* $OpenBSD: tvtwo.c,v 1.11 2007/03/13 19:40:49 miod Exp $ */
/*
* Copyright (c) 2003, 2006, Miodrag Vallat.
* All rights reserved.
@@ -324,6 +324,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/dev/sbus/zx.c b/sys/dev/sbus/zx.c
index 43b8dfc409f..73f35c4912d 100644
--- a/sys/dev/sbus/zx.c
+++ b/sys/dev/sbus/zx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zx.c,v 1.12 2006/12/17 22:18:16 miod Exp $ */
+/* $OpenBSD: zx.c,v 1.13 2007/03/13 19:40:49 miod Exp $ */
/* $NetBSD: zx.c,v 1.5 2002/10/02 16:52:46 thorpej Exp $ */
/*
@@ -349,6 +349,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;