From 14595d64de17a39f946085620e2f221a6865443d Mon Sep 17 00:00:00 2001 From: Nancy Lin Date: Wed, 12 Nov 2025 13:34:08 +0800 Subject: [PATCH] lib/edid_fill_fb: Add dual pipe flag to lb_framebuffer_flags Extend the lb_framebuffer_flags struct to include one more bitfield 'has_dual_pipe' to indicate dual pipe support. TEST=firmware display ok, in depthcharge with https://crrev.com/c/7129839 BRANCH=none BUG=b:424782827 Change-Id: I082be80b4606090ed219820a407d80d9f429ea7e Signed-off-by: Nancy Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/90038 Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Yu-Ping Wu --- payloads/libpayload/include/coreboot_tables.h | 3 ++- src/commonlib/include/commonlib/coreboot_tables.h | 3 ++- src/include/framebuffer_info.h | 3 +++ src/lib/edid_fill_fb.c | 8 ++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index 04d205c053..2f5b9be228 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -223,7 +223,8 @@ enum cb_fb_orientation { struct cb_framebuffer_flags { u8 has_external_display : 1; - u8 reserved : 7; + u8 has_dual_pipe : 1; + u8 reserved : 6; }; struct cb_framebuffer { diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h index d308cf0ebf..fa966b5fef 100644 --- a/src/commonlib/include/commonlib/coreboot_tables.h +++ b/src/commonlib/include/commonlib/coreboot_tables.h @@ -281,7 +281,8 @@ enum lb_fb_orientation { struct lb_framebuffer_flags { uint8_t has_external_display : 1; - uint8_t reserved : 7; + uint8_t has_dual_pipe : 1; + uint8_t reserved : 6; }; struct lb_framebuffer { diff --git a/src/include/framebuffer_info.h b/src/include/framebuffer_info.h index 451d893e99..4bc7afea51 100644 --- a/src/include/framebuffer_info.h +++ b/src/include/framebuffer_info.h @@ -5,6 +5,7 @@ #include #include +#include struct fb_info; @@ -20,6 +21,8 @@ int fb_add_framebuffer_info_simple(uintptr_t fb_addr, uint32_t x_res, uint32_t y void fb_set_orientation(struct fb_info *info, enum lb_fb_orientation orientation); +void fb_set_dual_pipe_flag(struct fb_info *info, bool dual_pipe); + struct edid; struct fb_info *fb_new_framebuffer_info_from_edid(const struct edid *edid, uintptr_t fb_addr); diff --git a/src/lib/edid_fill_fb.c b/src/lib/edid_fill_fb.c index c72b70172c..a9ff31f5ca 100644 --- a/src/lib/edid_fill_fb.c +++ b/src/lib/edid_fill_fb.c @@ -163,6 +163,14 @@ void fb_set_orientation(struct fb_info *info, enum lb_fb_orientation orientation info->fb.orientation = orientation; } +void fb_set_dual_pipe_flag(struct fb_info *info, bool dual_pipe) +{ + if (!info) + return; + + info->fb.flags.has_dual_pipe = dual_pipe; +} + /* * Take an edid, and create a framebuffer. */