From nobody Fri Apr 26 18:24:36 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=puri.sm ARC-Seal: i=1; a=rsa-sha256; t=1569689028; cv=none; d=zoho.com; s=zohoarc; b=IueNlZd9EOi04JVFxm5ZOm5yp4AgT8qS6V3ecs4wJWpoR7WTFRIWr7DIA0IDwWiPD12D33hWcs1YEoLxLnqiy6auhqssx2LOtDSWlvo/7ydGGU7+cSBvqlep9uTo3+vEoQkgsOsEcqSghSXtPDE0o0usiYM6YxaalIyfi9jIMss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569689028; h=Content-Type:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Subject:To:ARC-Authentication-Results; bh=igN8JMmfkepd3C8ane/LAc+gNtKG/n8YkylM3OLKCIc=; b=h/76kylJiMkE5VwWlIEJMML5qtQs8KRn8/Hl/WW+agOx8uPtmtGKmazI5jZ/r6QeACIqUzbfJiWIvIlVGyDVEo9oaLy/vXTXQUoIa/RONwNj4ZXfHFFd9w/xTaEpF1Ck/i/iK8l/Wr2ER0xXRmnchBmf0OwwniIFxK9SS3cLeEQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1569689028030368.0826631134173; Sat, 28 Sep 2019 09:43:48 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 301B712A0FE6; Sat, 28 Sep 2019 16:43:44 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id D6EBC12A0FB0 for ; Tue, 24 Sep 2019 21:02:40 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by comms.puri.sm (Postfix) with ESMTP id 16728E030B for ; Tue, 24 Sep 2019 14:02:39 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xMpdDI1BiVbh for ; Tue, 24 Sep 2019 14:02:38 -0700 (PDT) Message-ID: <66e181fbab7d9576e20b4da011123aaff721f60a.camel@puri.sm> From: Matt DeVillier To: seabios@seabios.org Date: Tue, 24 Sep 2019 16:02:35 -0500 X-MailFrom: matt.devillier@puri.sm X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1 Message-ID-Hash: NUKA2ARGZCYBQ2DFN2Z5WFF6AJGLQZ5L X-Message-ID-Hash: NUKA2ARGZCYBQ2DFN2Z5WFF6AJGLQZ5L X-Mailman-Approved-At: Sat, 28 Sep 2019 16:43:24 +0000 X-Mailman-Version: 3.2.3 Precedence: list Subject: [SeaBIOS] [PATCH] Reduce video modeswitching when using a boot splash image List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============0019880107309515182==" X-Spamd-Bar: ++ X-Spam-Level: ** Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Zoho-Virus-Status: 1 --===============0019880107309515182== Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-vDN7LcF8X1iC4BH8+aZ2" --=-vDN7LcF8X1iC4BH8+aZ2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =46rom 015d42aefa7cdebee79f12f9eca113e234574c89 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Tue, 24 Sep 2019 12:29:55 -0500 Subject: [PATCH] Reduce video modeswitching when using a boot splash image In the normal boot flow, the VGA console is enabled immediately after running the VGA option ROM. Later, after device hardware setup, if a bootsplash is used, the video modeis changed from VGA text to a graphics mode, then back to VGA text mode to show the boot menu. In the normal case where the boot menu is not invoked, this can produce a bit of flickering as the display mode changes 3x in a short period of time. To mitigate this, display the bootsplash earlier in the boot process if used, and switch to VGA text mode only as needed to show the boot menu. Show the Boot Menu Message only if a boot splash is not currently being shown. Signed-off-by: Matt DeVillier --- src/boot.c | 10 ++++++---- src/bootsplash.c | 2 +- src/post.c | 2 +- src/util.h | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/boot.c b/src/boot.c index 9f82f3c..f4c0f42 100644 --- a/src/boot.c +++ b/src/boot.c @@ -479,11 +479,13 @@ interactive_bootmenu(void) char *bootmsg =3D romfile_loadfile("etc/boot-menu-message", NULL); int menukey =3D romfile_loadint("etc/boot-menu-key", 1); - printf("%s", bootmsg ?: "\nPress ESC for boot menu.\n\n"); - free(bootmsg); - u32 menutime =3D romfile_loadint("etc/boot-menu-wait", DEFAULT_BOOTMENU_WAIT); - enable_bootsplash(); + + if (!BootsplashActive) { + enable_vga_console(); + printf("%s", bootmsg ?: "\nPress ESC for boot menu.\n\n"); + free(bootmsg); + } int scan_code =3D get_keystroke(menutime); disable_bootsplash(); if (scan_code !=3D menukey) diff --git a/src/bootsplash.c b/src/bootsplash.c index 538b316..6fa91dd 100644 --- a/src/bootsplash.c +++ b/src/bootsplash.c @@ -92,7 +92,7 @@ find_videomode(struct vbe_info *vesa_info, struct vbe_mode_info *mode_info } } -static int BootsplashActive; +int BootsplashActive =3D 0; void enable_bootsplash(void) diff --git a/src/post.c b/src/post.c index f93106a..ad45b07 100644 --- a/src/post.c +++ b/src/post.c @@ -209,7 +209,7 @@ maininit(void) // Run vga option rom vgarom_setup(); sercon_setup(); - enable_vga_console(); + enable_bootsplash(); // Do hardware initialization (if running synchronously) if (!threads_during_optionroms()) { diff --git a/src/util.h b/src/util.h index 9c06850..997789d 100644 --- a/src/util.h +++ b/src/util.h @@ -42,6 +42,7 @@ int get_keystroke(int msec); void enable_vga_console(void); void enable_bootsplash(void); void disable_bootsplash(void); +extern int BootsplashActive; // cdrom.c extern struct eltorito_s CDEmu; -- 2.20.1 --=-vDN7LcF8X1iC4BH8+aZ2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEjWBmz5IuUnlvGHq+K7t3ajW5eP0FAl2KhGsACgkQK7t3ajW5 eP1h/hAAjuzi0AxfETdj688NlTpgjgo9GbdwpsAihAMI/q4TLa88boyFwbvv7+Uj fys2BBvojiDR6QlDi4RSM7mNf9yDbQMNkpGb2sHu/joSgSd6FhkZrq0yCeZKyHfV NsX7AqR2VJ0bW9UGxmd61mg/y/D2NhcjyiFtzMFzS/7tT7n6DQgzBlOXq9w0XEXl 1w8MvaAqsDaONPlLCskfuTvb0fMNt3EECmEOOeiQjkfYDm94iXr6aIQpM4k0RWIL uTe3Th1Qs2PuVz82AxLtdvuqR3l2puqUzpSU+TF8hLfqAr8h4TRfpZjcD2I2kB0V tn1NEJx74JzRPa3BPKbx+FTQM+zRxZ6SVKPAmDPv9h18NahpGC3OuWRIbpCyIgzP S6BQMTi9u31zfRC79Ubms8PImeSyGdXMPBy1RGr+dpGJRjeYPpS/OOBWwdlSW/SS /GZqSgPZN7TiQ7hLDsAsw3eTJoxS3+MWrkRwjFfWeHnNkLqe7E9MnlhqvPn5Y55Z vvgFYTwzC/jnXj1crA8v2ZhFDaqGyy1jHcSgaaXetLiGvmllpn2ZlrAoUM5uek0v 11XfekEMBnlBF3uZnNO1h3G0bBxE73HlDAZ/b75uUFFfh04Nal/1AxlD52cJ5jan 3z26eeGbVwB79Ioi2QK8tda8A962Ayzpb5YI92g3R3+mpIdlFg0= =BgTo -----END PGP SIGNATURE----- --=-vDN7LcF8X1iC4BH8+aZ2-- --===============0019880107309515182== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org --===============0019880107309515182==--