summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2009-05-10 14:53:28 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2009-05-10 14:53:28 +0000
commit4e06ae995d5f72453b9d57e95c3e82e04c67e5d8 (patch)
tree35f16352094108437d3fc064a1d94d5aae4a8dac /sys/dev/usb
parentbe700cb31669b73a1f90a83f992c3248c711640c (diff)
Make inactivity screen blanking (burner) work.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/udl.c12
-rw-r--r--sys/dev/usb/udl.h6
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c
index 3fadf6a80c9..beb5fc02ff2 100644
--- a/sys/dev/usb/udl.c
+++ b/sys/dev/usb/udl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.c,v 1.3 2009/05/10 09:28:58 mglocker Exp $ */
+/* $OpenBSD: udl.c,v 1.4 2009/05/10 14:53:27 mglocker Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -458,16 +458,16 @@ udl_burner(void *v, u_int on, u_int flags)
sc = v;
- DPRINTF(1, "%s: %s: %s\n", DN(sc), FUNC, on ? "on" : "off");
+ DPRINTF(1, "%s: %s: screen %s\n", DN(sc), FUNC, on ? "ON" : "OFF");
if (on)
- udl_cmd_write_reg_1(sc, UDL_REG_BLANK_SCREEN, 0x01);
+ udl_cmd_write_reg_1(sc, UDL_REG_SCREEN, UDL_REG_SCREEN_ON);
else
- udl_cmd_write_reg_1(sc, UDL_REG_BLANK_SCREEN, 0x00);
+ udl_cmd_write_reg_1(sc, UDL_REG_SCREEN, UDL_REG_SCREEN_OFF);
udl_cmd_write_reg_1(sc, UDL_REG_SYNC, 0xff);
- (void)udl_cmd_send(sc);
+ (void)udl_cmd_send_async(sc);
}
/* ---------- */
@@ -1151,7 +1151,7 @@ udl_init_resolution(struct udl_softc *sc, uint8_t *buf, uint8_t len)
return (error);
/* show framebuffer content */
- udl_cmd_write_reg_1(sc, UDL_REG_BLANK_SCREEN, 0x00);
+ udl_cmd_write_reg_1(sc, UDL_REG_SCREEN, UDL_REG_SCREEN_ON);
udl_cmd_write_reg_1(sc, UDL_REG_SYNC, 0xff);
error = udl_cmd_send(sc);
if (error != USBD_NORMAL_COMPLETION)
diff --git a/sys/dev/usb/udl.h b/sys/dev/usb/udl.h
index bda07c5c71a..6287aa83646 100644
--- a/sys/dev/usb/udl.h
+++ b/sys/dev/usb/udl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.h,v 1.1 2009/05/09 19:23:07 mglocker Exp $ */
+/* $OpenBSD: udl.h,v 1.2 2009/05/10 14:53:27 mglocker Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -87,7 +87,9 @@ struct udl_softc {
#define UDL_REG_ADDR_START8 0x26
#define UDL_REG_ADDR_STRIDE8 0x29
-#define UDL_REG_BLANK_SCREEN 0x1f
+#define UDL_REG_SCREEN 0x1f
+ #define UDL_REG_SCREEN_ON 0x00
+ #define UDL_REG_SCREEN_OFF 0x01
#define UDL_REG_SYNC 0xff
/*