From: aoyama Date: Sat, 5 Aug 2023 00:34:19 +0000 (+0000) Subject: Inform 8bpp capability on 8bpp framebuffer in X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ff5ac6858747b9e76e6e562155f2ef1ae85364b2;p=openbsd Inform 8bpp capability on 8bpp framebuffer in WSDISPLAYIO_GETSUPPORTEDDEPTH ioctl. This is needed to use recent updated wsfb(4) driver in 8bpp mode. We can use 1bpp X server on 8bpp framebuffer by 'startx -- -depth 1'. Tested by me. --- diff --git a/sys/arch/luna88k/dev/lunafb.c b/sys/arch/luna88k/dev/lunafb.c index cc41a0eaf6d..072b1b24518 100644 --- a/sys/arch/luna88k/dev/lunafb.c +++ b/sys/arch/luna88k/dev/lunafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lunafb.c,v 1.31 2022/11/06 13:01:22 aoyama Exp $ */ +/* $OpenBSD: lunafb.c,v 1.32 2023/08/05 00:34:19 aoyama Exp $ */ /* $NetBSD: lunafb.c,v 1.7.6.1 2002/08/07 01:48:34 lukem Exp $ */ /*- @@ -260,7 +260,11 @@ omfbioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) return omsetcmap(sc, (struct wsdisplay_cmap *)data); case WSDISPLAYIO_GETSUPPORTEDDEPTH: - *(u_int *)data = WSDISPLAYIO_DEPTH_1; + if (dc->dc_depth == 8) + *(u_int *)data = + WSDISPLAYIO_DEPTH_8 | WSDISPLAYIO_DEPTH_1; + else + *(u_int *)data = WSDISPLAYIO_DEPTH_1; break; case WSDISPLAYIO_SETGFXMODE: