aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/include/coreboot_tables.h7
-rw-r--r--src/commonlib/include/commonlib/coreboot_tables.h8
-rw-r--r--src/drivers/intel/fsp2_0/graphics.c10
-rw-r--r--src/drivers/intel/fsp2_0/include/fsp/graphics.h10
4 files changed, 34 insertions, 1 deletions
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 4502e34484..5c3f0c47ec 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -220,6 +220,11 @@ enum cb_fb_orientation {
CB_FB_ORIENTATION_RIGHT_UP = 3,
};
+struct cb_framebuffer_flags {
+ u8 has_external_display : 1;
+ u8 reserved : 7;
+};
+
struct cb_framebuffer {
u32 tag;
u32 size;
@@ -238,6 +243,8 @@ struct cb_framebuffer {
u8 reserved_mask_pos;
u8 reserved_mask_size;
u8 orientation;
+ struct cb_framebuffer_flags flags;
+ u8 pad;
};
#define CB_GPIO_ACTIVE_LOW 0
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 {
diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c
index 6514209d04..a98f3bbba2 100644
--- a/src/drivers/intel/fsp2_0/graphics.c
+++ b/src/drivers/intel/fsp2_0/graphics.c
@@ -54,6 +54,13 @@ enum fw_splash_screen_status {
FW_SPLASH_SCREEN_ENABLED,
};
+/* Check and report if an external display is attached */
+__weak int fsp_soc_report_external_display(void)
+{
+ /* Default implementation, on-board display enabled */
+ return 0;
+}
+
/*
* Update elog with Firmware Splash Screen related information
* based on enum fw_splash_screen_status.
@@ -123,6 +130,9 @@ void fsp_report_framebuffer_info(const uintptr_t framebuffer_bar,
.reserved_mask_pos = fbinfo->rsvd.pos,
.reserved_mask_size = fbinfo->rsvd.size,
.orientation = orientation,
+ .flags = {
+ .has_external_display = fsp_soc_report_external_display(),
+ },
};
fb_add_framebuffer_info_ex(&fb);
diff --git a/src/drivers/intel/fsp2_0/include/fsp/graphics.h b/src/drivers/intel/fsp2_0/include/fsp/graphics.h
index dfd7b4e65b..a5f781f87f 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/graphics.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/graphics.h
@@ -14,4 +14,14 @@
void fsp_report_framebuffer_info(const uintptr_t framebuffer_bar,
enum lb_fb_orientation orientation);
+/* SoC Overrides */
+/*
+ * Check and report if an external display is attached
+ *
+ * Possible return values:
+ * 1 - An external device is attached.
+ * 0 - On-board display alone.
+ */
+int fsp_soc_report_external_display(void);
+
#endif /* _FSP2_0_GRAPHICS_H_ */