Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b090f9fa authored by Arve Hjønnevåg's avatar Arve Hjønnevåg Committed by Linus Torvalds
Browse files

PM: Wait for console in resume



Avoids later waking up to a blinking cursor if the device woke up and
returned to sleep before the console switch happened.

Signed-off-by: default avatarBrian Swetland <swetland@google.com>
Signed-off-by: default avatarArve Hjønnevåg <arve@android.com>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ebae2604
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -78,6 +78,12 @@ void pm_restore_console(void)
	}
	}
	set_console(orig_fgconsole);
	set_console(orig_fgconsole);
	release_console_sem();
	release_console_sem();

	if (vt_waitactive(orig_fgconsole)) {
		pr_debug("Resume: Can't switch VCs.");
		return;
	}

	kmsg_redirect = orig_kmsg;
	kmsg_redirect = orig_kmsg;
}
}
#endif
#endif