Commit 2e5bb44e authored by V Sowmya's avatar V Sowmya Committed by chrome-bot
Browse files

screen: Remove the code which tracks the currently displayed screen



Currently firmware screen is not switching to "VB_SCREEN_RECOVERY_NO_GOOD"
after connecting USB drive which does not contain chrome OS more than
one time in recovery mode.

when non OS USB drive is connected for first time vboot_draw_screen is
called and current_screen is set to VB_SCREEN_RECOVERY_NO_GOOD screen.
when non OS USB is removed it swicthes back to recovery UI but in this
case current_screen variable is not updated. From second time onwards
since current_screen still holds VB_SCREEN_RECOVERY_NO_GOOD screen value
and condition check "requested screen = current screen" is satisfied and
screen does not switch to VB_SCREEN_RECOVERY_NO_GOOD.

Since condition to check if requested screen is the same as the current one
is already handled in Vboot, there is no need to track the screen in
depthcharge. Hence this patch removes the code which tracks the currently
displayed screen in depthcharge.

Change-Id: I7438dd3dcb77dc08f0fe729a5bf40ccdeaf3cd8b
Signed-off-by: default avatarV Sowmya <v.sowmya@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/611765

Tested-by: default avatarNaresh Solanki <naresh.solanki@intel.com>
Reviewed-by: default avatarRandall Spangler <rspangler@chromium.org>
Reviewed-by: default avatarFurquan Shaikh <furquan@chromium.org>
Reviewed-by: default avatarJulius Werner <jwerner@chromium.org>
parent ad691c94
......@@ -1085,7 +1085,6 @@ static VbError_t vboot_init_screen(void)
int vboot_draw_screen(uint32_t screen, uint32_t locale)
{
static uint32_t current_screen = VB_SCREEN_BLANK;
printf("%s: screen=0x%x locale=%d\n", __func__, screen, locale);
......@@ -1094,10 +1093,6 @@ int vboot_draw_screen(uint32_t screen, uint32_t locale)
return VBERROR_UNKNOWN;
}
/* If requested screen is the same as the current one, we're done. */
if (screen == current_screen && locale == locale_data.current)
return VBERROR_SUCCESS;
/* If the screen is blank, turn off the backlight; else turn it on. */
backlight_update(VB_SCREEN_BLANK == screen ? 0 : 1);
......@@ -1106,7 +1101,6 @@ int vboot_draw_screen(uint32_t screen, uint32_t locale)
struct params p = { locale, 0xFFFFFFFF, 0, 1 };
RETURN_ON_ERROR(draw_ui(screen, &p));
current_screen = screen;
locale_data.current = locale;
return VBERROR_SUCCESS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment