diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-10-27 17:52:39 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-10-27 17:52:39 +0000 |
commit | 35d5bdaa06843f6b3338653097d3a5291570ec88 (patch) | |
tree | ef6d69061b521ad7d51c1f5d53a772498364ab7c /sys/arch | |
parent | 36e2289a87b25881b98f9228430f312c4308fbd4 (diff) |
If the lid is closed during boot, blank screen immediately.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/tctrl.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/sparc/dev/tctrl.c b/sys/arch/sparc/dev/tctrl.c index b19eb44b9dd..b732c9e289a 100644 --- a/sys/arch/sparc/dev/tctrl.c +++ b/sys/arch/sparc/dev/tctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tctrl.c,v 1.17 2006/09/17 22:26:37 miod Exp $ */ +/* $OpenBSD: tctrl.c,v 1.18 2006/10/27 17:52:38 miod Exp $ */ /* $NetBSD: tctrl.c,v 1.2 1999/08/11 00:46:06 matt Exp $ */ /*- @@ -107,7 +107,7 @@ #define SCFLAG_PCTPRINT 0x0004000 #define SCFLAG_PRINT (SCFLAG_NOPRINT|SCFLAG_PCTPRINT) -const char *tctrl_ext_statuses[16] = { +const char *tctrl_ext_status[16] = { "main power available", "internal battery attached", "external battery attached", @@ -274,7 +274,7 @@ tctrl_attach(parent, self, aux) continue; /* wrap to next line if necessary */ if (len != 0 && len + strlen(sep) + - strlen(tctrl_ext_statuses[i]) > 80) { + strlen(tctrl_ext_status[i]) > 80) { printf("\n"); len = 0; } @@ -283,8 +283,8 @@ tctrl_attach(parent, self, aux) len = 2 + strlen(sc->sc_dev.dv_xname); sep = ""; } - printf("%s%s", sep, tctrl_ext_statuses[i]); - len += strlen(sep) + strlen(tctrl_ext_statuses[i]); + printf("%s%s", sep, tctrl_ext_status[i]); + len += strlen(sep) + strlen(tctrl_ext_status[i]); sep = ", "; } if (len != 0) @@ -295,6 +295,10 @@ tctrl_attach(parent, self, aux) tctrl_bell(sc, 0xff, 0); tctrl_brightness(sc, 0xff, 0); + /* Blank video if lid is closed during boot */ + if (sc->sc_ext_status & TS102_EXT_STATUS_LID_DOWN) + tctrl_tft(sc); + sc->sc_regs->intr = TS102_UCTRL_INT_RXNE_REQ|TS102_UCTRL_INT_RXNE_MSK; sc->sc_wantdata = 0; |