soc/intel: Remove blank lines before '}' and after '{'
[coreboot2.git] / src / lib / bootmode.c
blob2d5a7eb0043d8d299d21162656973c9e40ede4b8
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <assert.h>
4 #include <bootmode.h>
5 #include <security/vboot/misc.h>
6 #include <vb2_api.h>
8 static int gfx_init_done = -1;
10 int gfx_get_init_done(void)
12 if (gfx_init_done < 0)
13 return 0;
14 return gfx_init_done;
17 void gfx_set_init_done(int done)
19 gfx_init_done = done;
22 int display_init_required(void)
24 /* Need display for showing splash screen. */
25 if (CONFIG(BMP_LOGO))
26 return 1;
28 /* For vboot, honor VB2_CONTEXT_DISPLAY_INIT. */
29 if (CONFIG(VBOOT)) {
30 /* Must always select MUST_REQUEST_DISPLAY when using this
31 function. */
32 if (!CONFIG(VBOOT_MUST_REQUEST_DISPLAY))
33 dead_code();
34 return vboot_get_context()->flags & VB2_CONTEXT_DISPLAY_INIT;
37 /* By default always initialize display. */
38 return 1;