mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-24 16:57:21 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
8de46d0af9
commit
ff9c2b2e8b
@@ -329,16 +329,9 @@ static VbError_t VbDisplayScreenLegacy(VbCommonParams *cparams, uint32_t screen,
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* If requested screen is the same as the current one, we're done. */
|
||||
if (disp_current_screen == screen && 0 == force)
|
||||
return VBERROR_SUCCESS;
|
||||
|
||||
/* If the screen is blank, turn off the backlight; else turn it on. */
|
||||
VbExDisplayBacklight(VB_SCREEN_BLANK == screen ? 0 : 1);
|
||||
|
||||
/* Request the screen */
|
||||
disp_current_screen = screen;
|
||||
|
||||
/* Look in the GBB first */
|
||||
if (VBERROR_SUCCESS == VbDisplayScreenFromGBB(cparams, screen,
|
||||
vncptr, locale))
|
||||
@@ -353,20 +346,26 @@ VbError_t VbDisplayScreen(VbCommonParams *cparams, uint32_t screen,
|
||||
{
|
||||
uint32_t locale;
|
||||
GoogleBinaryBlockHeader *gbb = cparams->gbb;
|
||||
VbError_t rv;
|
||||
|
||||
/* If requested screen is the same as the current one, we're done. */
|
||||
if (disp_current_screen == screen && !force)
|
||||
return VBERROR_SUCCESS;
|
||||
|
||||
/* Read the locale last saved */
|
||||
VbNvGet(vncptr, VBNV_LOCALIZATION_INDEX, &locale);
|
||||
|
||||
if (gbb->bmpfv_size == 0) {
|
||||
VbError_t ret = VbExDisplayScreen(screen, locale);
|
||||
if (gbb->bmpfv_size == 0)
|
||||
rv = VbExDisplayScreen(screen, locale);
|
||||
else
|
||||
rv = VbDisplayScreenLegacy(cparams, screen, force, vncptr,
|
||||
locale);
|
||||
|
||||
if (rv == VBERROR_SUCCESS)
|
||||
/* Keep track of the currently displayed screen */
|
||||
if (ret == VBERROR_SUCCESS)
|
||||
disp_current_screen = screen;
|
||||
return ret;
|
||||
}
|
||||
disp_current_screen = screen;
|
||||
|
||||
return VbDisplayScreenLegacy(cparams, screen, force, vncptr, locale);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static void Uint8ToString(char *buf, uint8_t val)
|
||||
|
||||
Reference in New Issue
Block a user