Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/fdt Pass WSDISPLAYIO_SVIDEO through to pmf



details:   https://anonhg.NetBSD.org/src/rev/871a788677be
branches:  trunk
changeset: 318826:871a788677be
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun May 06 10:31:10 2018 +0000
description:
Pass WSDISPLAYIO_SVIDEO through to pmf

diffstat:

 sys/dev/fdt/simplefb.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 53d362017893 -r 871a788677be sys/dev/fdt/simplefb.c
--- a/sys/dev/fdt/simplefb.c    Sun May 06 00:46:09 2018 +0000
+++ b/sys/dev/fdt/simplefb.c    Sun May 06 10:31:10 2018 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
        struct wsdisplayio_bus_id *busid;
        struct wsdisplayio_fbinfo *fbi;
        struct rasops_info *ri;
+       u_int video;
        int error;
 
        switch (cmd) {
@@ -87,6 +88,15 @@
                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;
        }



Home | Main Index | Thread Index | Old Index