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.
-/* $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 $ */
/*-
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: