diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2009-09-20 10:18:21 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2009-09-20 10:18:21 +0000 |
commit | 98d8d217384b07580dc1aba6f3f596da070b92b6 (patch) | |
tree | 63f1fc81224b3727686725787d438255106de0d6 /sys | |
parent | 3ffd3724094528428a179e7ef91672424a6b73d2 (diff) |
Add WSDISPLAYIO_SMODE, WSDISPLAYIO_SVIDEO, WSDISPLAYIO_GVIDEO ioctl. To
be completed.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/udl.c | 23 | ||||
-rw-r--r-- | sys/dev/usb/udl.h | 4 |
2 files changed, 23 insertions, 4 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c index 649f11fda0b..e0a1e0ee6c2 100644 --- a/sys/dev/usb/udl.c +++ b/sys/dev/usb/udl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udl.c,v 1.46 2009/09/19 21:48:34 mglocker Exp $ */ +/* $OpenBSD: udl.c,v 1.47 2009/09/20 10:18:20 mglocker Exp $ */ /* * Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org> @@ -437,14 +437,13 @@ udl_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) struct udl_softc *sc; struct wsdisplay_fbinfo *wdf; struct udl_ioctl_damage *d; - int r; + int r, mode; sc = v; DPRINTF(1, "%s: %s: ('%c', %d, %d)\n", DN(sc), FUNC, IOCGROUP(cmd), cmd & 0xff, IOCPARM_LEN(cmd)); - /* TODO */ switch (cmd) { case WSDISPLAYIO_GTYPE: *(u_int *)data = WSDISPLAY_TYPE_DL; @@ -456,9 +455,27 @@ udl_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) wdf->depth = sc->sc_depth; wdf->cmsize = 0; /* XXX fill up colormap size */ break; + case WSDISPLAYIO_SMODE: + mode = *(u_int *)data; + if (mode == sc->sc_mode) + break; + switch (mode) { + case WSDISPLAYIO_MODE_EMUL: + /* TODO */ + break; + case WSDISPLAYIO_MODE_DUMBFB: + /* TODO */ + break; + } + sc->sc_mode = mode; + break; case WSDISPLAYIO_LINEBYTES: *(u_int *)data = sc->sc_width * (sc->sc_depth / 8); break; + case WSDISPLAYIO_SVIDEO: + case WSDISPLAYIO_GVIDEO: + /* handled for us by wscons */ + break; case UDLIO_DAMAGE: d = (struct udl_ioctl_damage *)data; r = udl_damage(sc, sc->sc_fbmem, d->x1, d->x2, d->y1, d->y2); diff --git a/sys/dev/usb/udl.h b/sys/dev/usb/udl.h index 832e4dac8c3..cd4c66e4be9 100644 --- a/sys/dev/usb/udl.h +++ b/sys/dev/usb/udl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: udl.h,v 1.11 2009/09/19 21:48:34 mglocker Exp $ */ +/* $OpenBSD: udl.h,v 1.12 2009/09/20 10:18:20 mglocker Exp $ */ /* * Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org> @@ -60,6 +60,8 @@ struct udl_softc { struct rasops_info sc_ri; uint8_t sc_nscreens; + int sc_mode; + #define UDL_CMD_XFER_COUNT 8 int sc_cmd_xfer_cnt; struct udl_cmd_xfer sc_cmd_xfer[UDL_CMD_XFER_COUNT]; |