Module Name: src
Committed By: jmcneill
Date: Sun May 6 10:31:10 UTC 2018
Modified Files:
src/sys/dev/fdt: simplefb.c
Log Message:
Pass WSDISPLAYIO_SVIDEO through to pmf
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/simplefb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/fdt/simplefb.c
diff -u src/sys/dev/fdt/simplefb.c:1.4 src/sys/dev/fdt/simplefb.c:1.5
--- src/sys/dev/fdt/simplefb.c:1.4 Sun Apr 1 04:35:05 2018
+++ src/sys/dev/fdt/simplefb.c Sun May 6 10:31:10 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: simplefb.c,v 1.4 2018/04/01 04:35:05 ryo Exp $ */
+/* $NetBSD: simplefb.c,v 1.5 2018/05/06 10:31:10 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <[email protected]>
@@ -29,7 +29,7 @@
#include "opt_wsdisplay_compat.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.4 2018/04/01 04:35:05 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.5 2018/05/06 10:31:10 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -70,6 +70,7 @@ simplefb_ioctl(void *v, void *vs, u_long
struct wsdisplayio_bus_id *busid;
struct wsdisplayio_fbinfo *fbi;
struct rasops_info *ri;
+ u_int video;
int error;
switch (cmd) {
@@ -87,6 +88,15 @@ simplefb_ioctl(void *v, void *vs, u_long
if (error == 0)
fbi->fbi_flags |= WSFB_VRAM_IS_RAM;
return error;
+ case WSDISPLAYIO_SVIDEO:
+ video = *(u_int *)data;
+ if (video == WSDISPLAYIO_VIDEO_OFF)
+ pmf_event_inject(NULL, PMFE_DISPLAY_OFF);
+ else if (video == WSDISPLAYIO_VIDEO_ON)
+ pmf_event_inject(NULL, PMFE_DISPLAY_ON);
+ else
+ return EINVAL;
+ return 0;
default:
return EPASSTHROUGH;
}