| 1 |
|
| 2 |
|
| 3 |
#include <assert.h> |
| 4 |
#include <bootmode.h> |
| 5 |
#include <security/vboot/misc.h> |
| 6 |
#include <vb2_api.h> |
| 7 |
|
| 8 |
static int gfx_init_done = -1; |
| 9 |
|
| 10 |
int gfx_get_init_done(void) |
| 11 |
{ |
| 12 |
if (gfx_init_done < 0) |
| 13 |
return 0; |
| 14 |
return gfx_init_done; |
| 15 |
} |
| 16 |
|
| 17 |
void gfx_set_init_done(int done) |
| 18 |
{ |
| 19 |
gfx_init_done = done; |
| 20 |
} |
| 21 |
|
| 22 |
int display_init_required(void) |
| 23 |
{ |
| 24 |
|
| 25 |
if (CONFIG(VBOOT)) { |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
if (!CONFIG(VBOOT_MUST_REQUEST_DISPLAY) && !CONFIG(VBOOT_ALWAYS_ENABLE_DISPLAY)) |
| 31 |
dead_code(); |
| 32 |
return vboot_get_context()->flags & VB2_CONTEXT_DISPLAY_INIT; |
| 33 |
} |
| 34 |
|
| 35 |
|
| 36 |
return 1; |
| 37 |
} |