This paves the way for having backlight control on the pinebook.

ok?


Index: dev/fdt/simplefb.c
===================================================================
RCS file: /cvs/src/sys/dev/fdt/simplefb.c,v
retrieving revision 1.5
diff -u -p -r1.5 simplefb.c
--- dev/fdt/simplefb.c  27 Aug 2018 09:30:07 -0000      1.5
+++ dev/fdt/simplefb.c  13 Oct 2019 15:17:01 -0000
@@ -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;

Reply via email to