diff options
author | Subrata Banik <subratabanik@google.com> | 2023-10-03 14:51:26 +0000 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2023-10-04 18:50:49 +0000 |
commit | 790b5cf442b1d8d9312652f17cf7b16d48e2e6a8 (patch) | |
tree | 85ac3fa28467767730b57b0b050e739e59154df7 /src/commonlib/include | |
parent | 913ea97fbe0907a86e221a9553b21fcc7aecff57 (diff) |
{commonlib, libpayload}: Add "has_external_display" in coreboot table
This patch introduces a new coreboot table entry named
"has_external_display" to understand if external display is attached.
This information is useful to prevent graceful shutdown by payload
when the LID is closed but an external display is present.
This piece of the information will be gathered by coreboot and passed
into the payload using this new entry aka external_display because
payload (i.e., deptcharge) doesn't have any other way to determine
if external display is available.
BUG=b:299137940
TEST=Able to build and boot google/rex.
w/o this patch:
LID closed and external display attached (HDMI) in developer mode
(GBB 0x39):
> System is powered off by depthcharge
w/ this patch:
LID closed and external display attached (HDMI) in developer mode
(GBB 0x39):
> Booted to OS and device is alive/usable
Change-Id: I0fa7eee4c5a50371a7a66c6ca1ac2c7d046d010b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77796
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/commonlib/include')
-rw-r--r-- | src/commonlib/include/commonlib/coreboot_tables.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h index d77c5eb26f..94985b1567 100644 --- a/src/commonlib/include/commonlib/coreboot_tables.h +++ b/src/commonlib/include/commonlib/coreboot_tables.h @@ -275,6 +275,11 @@ enum lb_fb_orientation { LB_FB_ORIENTATION_RIGHT_UP = 3, }; +struct lb_framebuffer_flags { + uint8_t has_external_display : 1; + uint8_t reserved : 7; +}; + struct lb_framebuffer { uint32_t tag; uint32_t size; @@ -293,7 +298,8 @@ struct lb_framebuffer { uint8_t reserved_mask_pos; uint8_t reserved_mask_size; uint8_t orientation; - uint8_t pad[2]; + struct lb_framebuffer_flags flags; + uint8_t pad; }; struct lb_gpio { |