diff options
Diffstat (limited to 'sys/dev/wscons/wsdisplay.c')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index b86602e2895..cc6f1008497 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.148 2022/07/08 21:29:20 miod Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.149 2022/07/15 17:57:27 kettenis Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -1302,6 +1302,25 @@ wsdisplay_driver_ioctl(struct wsdisplay_softc *sc, u_long cmd, caddr_t data, { int error; +#if defined(OpenBSD7_1) || defined(OpenBSD7_2) || defined(OpenBSD7_3) + if (cmd == WSDISPLAYIO_OGINFO) { + struct wsdisplay_ofbinfo *oinfo = + (struct wsdisplay_ofbinfo *)data; + struct wsdisplay_fbinfo info; + + error = (*sc->sc_accessops->ioctl)(sc->sc_accesscookie, + WSDISPLAYIO_GINFO, (caddr_t)&info, flag, p); + if (error) + return error; + + oinfo->height = info.height; + oinfo->width = info.width; + oinfo->depth = info.depth; + oinfo->cmsize = info.cmsize; + return (0); + } +#endif + error = ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, cmd, data, flag, p)); /* Do not report parameters with empty ranges to userland. */ |