summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-10-13 17:00:55 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-10-13 17:00:55 +0000
commit5c2732fcedffe0312691d07b1a0ba3ec3e06419d (patch)
tree080e88643e9d61b10bb263e70f7ce000c50044b9 /sys
parent56e806333c4b8581dfb2538ad2f33d4eb7629f86 (diff)
Add display brightness hooks.
ok matthieu@, deraadt@, patrick@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fdt/simplefb.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/fdt/simplefb.c b/sys/dev/fdt/simplefb.c
index 6f031953a3c..4da80a3dd28 100644
--- a/sys/dev/fdt/simplefb.c
+++ b/sys/dev/fdt/simplefb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: simplefb.c,v 1.5 2018/08/27 09:30:07 kettenis Exp $ */
+/* $OpenBSD: simplefb.c,v 1.6 2019/10/13 17:00:54 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
@@ -230,9 +230,18 @@ int
simplefb_wsioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
{
struct rasops_info *ri = v;
+ struct wsdisplay_param *dp = (struct wsdisplay_param *)data;
struct wsdisplay_fbinfo *wdf;
switch (cmd) {
+ case WSDISPLAYIO_GETPARAM:
+ if (ws_get_param)
+ return ws_get_param(dp);
+ return -1;
+ case WSDISPLAYIO_SETPARAM:
+ if (ws_set_param)
+ return ws_set_param(dp);
+ return -1;
case WSDISPLAYIO_GTYPE:
*(int *)data = WSDISPLAY_TYPE_EFIFB;
return 0;