Module Name:    src
Committed By:   macallan
Date:           Tue Sep 20 06:15:02 UTC 2011

Modified Files:
        src/sys/dev/pci/voyager: voyagerfb.c

Log Message:
support ioctl(WSDISPLAYIO_SVIDEO) and friends so wsfb can turn the backlight
off


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/voyager/voyagerfb.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/pci/voyager/voyagerfb.c
diff -u src/sys/dev/pci/voyager/voyagerfb.c:1.3 src/sys/dev/pci/voyager/voyagerfb.c:1.4
--- src/sys/dev/pci/voyager/voyagerfb.c:1.3	Tue Sep  6 06:27:14 2011
+++ src/sys/dev/pci/voyager/voyagerfb.c	Tue Sep 20 06:15:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: voyagerfb.c,v 1.3 2011/09/06 06:27:14 macallan Exp $	*/
+/*	$NetBSD: voyagerfb.c,v 1.4 2011/09/20 06:15:02 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.3 2011/09/06 06:27:14 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.4 2011/09/20 06:15:02 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -371,6 +371,18 @@
 		}
 		return 0;
 
+	case WSDISPLAYIO_GVIDEO:
+		*(int *)data = sc->sc_bl_on ? WSDISPLAYIO_VIDEO_ON :
+					      WSDISPLAYIO_VIDEO_OFF;
+		return 0;
+
+	case WSDISPLAYIO_SVIDEO: {
+			int new_bl = *(int *)data;
+
+			voyagerfb_switch_backlight(sc,  new_bl);
+		}
+		return 0;
+
 	case WSDISPLAYIO_GETPARAM:
 		param = (struct wsdisplay_param *)data;
 		switch (param->param) {

Reply via email to