From d22f9e79592e8a31e2f0c7ed6e36c9cd99f69d8a Mon Sep 17 00:00:00 2001 From: gnezdo Date: Mon, 20 Jun 2022 16:28:42 +0000 Subject: [PATCH] Fix console screen blanker setting timeout back to zero Tested locally. "looks correct" to miod@ From Crystal Kolipe kolipe DOT c AT exoticsilicon DOT com --- sys/dev/wscons/wsdisplay.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 7fbbf06cff9..8e1b2543e7c 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.144 2022/04/06 18:59:30 naddy Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.145 2022/06/20 16:28:42 gnezdo Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -1233,7 +1233,7 @@ wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr, error = 0; sc->sc_burnflags = d->flags; /* disable timeout if necessary */ - if ((sc->sc_burnflags & (WSDISPLAY_BURN_OUTPUT | + if (d->off==0 || (sc->sc_burnflags & (WSDISPLAY_BURN_OUTPUT | WSDISPLAY_BURN_KBD | WSDISPLAY_BURN_MOUSE)) == 0) { if (sc->sc_burnout) timeout_del(&sc->sc_burner); @@ -1252,14 +1252,12 @@ wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr, wsdisplay_burn(sc, sc->sc_burnflags); } } - if (d->off) { - sc->sc_burnoutintvl = d->off; - if (!sc->sc_burnman) { - sc->sc_burnout = sc->sc_burnoutintvl; - /* reinit timeout if changed */ - if ((active->scr_flags & SCR_GRAPHICS) == 0) - wsdisplay_burn(sc, sc->sc_burnflags); - } + sc->sc_burnoutintvl = d->off; + if (!sc->sc_burnman) { + sc->sc_burnout = sc->sc_burnoutintvl; + /* reinit timeout if changed */ + if ((active->scr_flags & SCR_GRAPHICS) == 0) + wsdisplay_burn(sc, sc->sc_burnflags); } return (error); } -- 2.20.1