diff options
author | Tobias Heider <tobhe@cvs.openbsd.org> | 2023-01-10 16:33:19 +0000 |
---|---|---|
committer | Tobias Heider <tobhe@cvs.openbsd.org> | 2023-01-10 16:33:19 +0000 |
commit | ca01c513106309d26b9f44508c8a70bbb46a7f4b (patch) | |
tree | 416a56a8f4921722561b8c331d0de89c229c0c50 /sys/dev/wscons | |
parent | eef6d1b2c2cbdffec521cadfcfca8492fa228945 (diff) |
Switch to console before suspending in DUMBFB mode. Fixes frame buffer corruption
and a few other bugs/races after wakeup on Apple Silicon laptops and Lenovo x13s.
ok kettenis@ deraadt@
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index fbfe0e9966c..a0a3fd25717 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.151 2023/01/10 12:47:19 tb Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.152 2023/01/10 16:33:18 tobhe Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -2265,13 +2265,11 @@ wsdisplay_suspend_device(struct device *dev) scr = sc->sc_scr[active]; /* - * We want to switch out of graphics mode for the suspend, but - * only if we're in WSDISPLAY_MODE_MAPPED. + * We want to switch out of graphics mode for the suspend */ retry: idx = WSDISPLAY_MAXSCREEN; - if (scr->scr_flags & SCR_GRAPHICS && - (scr->scr_flags & SCR_DUMBFB) == 0) { + if (scr->scr_flags & SCR_GRAPHICS) { for (idx = 0; idx < WSDISPLAY_MAXSCREEN; idx++) { if (sc->sc_scr[idx] == NULL || sc->sc_scr[idx] == scr) continue; |