diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2020-09-15 18:36:19 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2020-09-15 18:36:19 +0000 |
commit | 51eedbb8dabff9f7f6bb40bdb65270c480d4ece8 (patch) | |
tree | e028e086abfdb247b527dce5dcb5cf4f7c966867 /sys | |
parent | 83ca902194b18ae01702cd047e0ff9f4a05e6879 (diff) |
Add the wsioctl() bits to radeondrm(4) so that abl(4) can be controlled
through the wsconsctl(8) 'display.brightness' variable.
ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_kms.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_kms.c b/sys/dev/pci/drm/radeon/radeon_kms.c index 6ddd382bd85..92a6aaa0b6d 100644 --- a/sys/dev/pci/drm/radeon/radeon_kms.c +++ b/sys/dev/pci/drm/radeon/radeon_kms.c @@ -231,6 +231,7 @@ radeondrm_wsioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) { struct rasops_info *ri = v; struct wsdisplay_fbinfo *wdf; + struct wsdisplay_param *dp = (struct wsdisplay_param *)data; switch (cmd) { case WSDISPLAYIO_GTYPE: @@ -243,6 +244,14 @@ radeondrm_wsioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p) wdf->depth = ri->ri_depth; wdf->cmsize = 0; return 0; + case WSDISPLAYIO_GETPARAM: + if (ws_get_param == NULL) + return 0; + return ws_get_param(dp); + case WSDISPLAYIO_SETPARAM: + if (ws_set_param == NULL) + return 0; + return ws_set_param(dp); default: return -1; } |