This allows the brightness on my Dell Latitude 3160 to be adjusted through wsconsctl(1).
Index: arch/amd64/amd64/efifb.c =================================================================== RCS file: /cvs/src/sys/arch/amd64/amd64/efifb.c,v retrieving revision 1.9 diff -u -p -r1.9 efifb.c --- arch/amd64/amd64/efifb.c 21 Jun 2016 15:24:55 -0000 1.9 +++ arch/amd64/amd64/efifb.c 11 Dec 2016 09:25:04 -0000 @@ -104,6 +104,9 @@ int efifb_load_font(void *, void *, str struct cb_framebuffer *cb_find_fb(paddr_t); +extern int (*ws_get_param)(struct wsdisplay_param *); +extern int (*ws_set_param)(struct wsdisplay_param *); + const struct cfattach efifb_ca = { sizeof(struct efifb_softc), efifb_match, efifb_attach, NULL }; @@ -235,6 +238,16 @@ efifb_ioctl(void *v, u_long cmd, caddr_t struct wsdisplay_fbinfo *wdf; switch (cmd) { + case WSDISPLAYIO_GETPARAM: + if (ws_get_param != NULL) + return (*ws_get_param)((struct wsdisplay_param *)data); + else + return (-1); + case WSDISPLAYIO_SETPARAM: + if (ws_set_param != NULL) + return (*ws_set_param)((struct wsdisplay_param *)data); + else + return (-1); case WSDISPLAYIO_GTYPE: *(u_int *)data = WSDISPLAY_TYPE_EFIFB; break;