verified boot invokes screen refreshes unnecessarily |
|||||||
Issue description
When a device sits in recovery mode waiting for boot media to be plugged in, it periodically polls USB/SD/etc ports to see if a new storage device was plugged in.
In every poll cycle it invokes the vbDisplayScreen() function, which re-draws the screen. This is unnecessary, could cause flickering on some slow devices.
the below patch is one way of fixing the problem:
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index c336278..b8e0830 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -499,6 +499,7 @@ VbError_t VbBootRecovery(VbCommonParams *cparams, LoadKernelParams *p)
{
VbSharedDataHeader *shared =
(VbSharedDataHeader *)cparams->shared_data_blob;
+ uint32_t previous_retval = VBERROR_SUCCESS;
uint32_t retval;
uint32_t key;
int i;
@@ -552,10 +553,14 @@ VbError_t VbBootRecovery(VbCommonParams *cparams, LoadKernelParams *p)
if (VBERROR_SUCCESS == retval)
break; /* Found a recovery kernel */
- VbDisplayScreen(cparams, VBERROR_NO_DISK_FOUND == retval ?
- VB_SCREEN_RECOVERY_INSERT :
- VB_SCREEN_RECOVERY_NO_GOOD,
- 0, &vnc);
+ if (retval != previous_retval) {
+ previous_retval = retval;
+ VbDisplayScreen(cparams,
+ VBERROR_NO_DISK_FOUND == retval ?
+ VB_SCREEN_RECOVERY_INSERT :
+ VB_SCREEN_RECOVERY_NO_GOOD,
+ 0, &vnc);
+ }
/*
* Scan keyboard more frequently than media, since x86
it was considered not comprehensive enough.
,
Apr 12 2016
ah, I missed the part about the extra parameter. Not a big deal either way, just annoying when you look at the console or at a half working display :)
,
Apr 12 2016
,
Apr 17 2016
It often happens after Deep Resetting the Chromebook.
,
Apr 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/ff9c2b2e8b49a948ecc6ca640a0400450fd16f4f commit ff9c2b2e8b49a948ecc6ca640a0400450fd16f4f Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Thu Apr 21 21:54:45 2016 vboot: Save last screen ID This patch makes VbDisplayScreen remember the last successfully displayed screen and skip rendering if the same screen is requested. When locale is changed, VbCheckDisplayKey calls VbDisplayScreen with force=1, which makes VbDisplayScreen render the requested screen regardless of the saved screen ID. BUG= chromium:602793 BRANCH=tot TEST=emerge-veyron_jerry vboot_reference chromeos-bootimage Change-Id: I31c4dde4ff060081f14224a93d57e9b76fcac1db Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/340264 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> [modify] https://crrev.com/ff9c2b2e8b49a948ecc6ca640a0400450fd16f4f/firmware/lib/vboot_display.c
,
Apr 25 2016
,
May 23 2016
,
Jul 1 2016
,
Aug 29 2016
,
Aug 31 2016
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by rspangler@chromium.org
, Apr 12 2016