From 92106b166671a315a2b1e8f5cc467f2fa0823301 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Wed, 19 Feb 2020 12:54:06 +0100 Subject: drivers: Replace multiple fill_lb_framebuffer with single instance Currently it's not possible to add multiple graphics drivers into one coreboot image. This patch series will fix this issue by providing a single API that multiple graphics drivers can use. This is required for platforms that have two graphic cards, but different graphic drivers, like Intel+Aspeed on server platforms or Intel+Nvidia on consumer notebooks. The goal is to remove duplicated fill_fb_framebuffer(), the advertisment of multiple independent framebuffers in coreboot tables, and better runtime/build time graphic configuration options. Replace all duplications of fill_fb_framebuffer and provide a single one in edid_fill_fb.c. Should not change the current behaviour as still only one graphic driver can be active at time. Change-Id: Ife507f7e7beaf59854e533551b4b87ea6980c1f4 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/39003 Reviewed-by: Angel Pons Reviewed-by: Frans Hendriks Reviewed-by: Christian Walter Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/graphics/graphics.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/graphics/graphics.c b/src/soc/intel/common/block/graphics/graphics.c index 23cf84756d..eac38f8f15 100644 --- a/src/soc/intel/common/block/graphics/graphics.c +++ b/src/soc/intel/common/block/graphics/graphics.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -46,13 +47,15 @@ static void gma_init(struct device *const dev) /* * GFX PEIM module inside FSP binary is taking care of graphics * initialization based on RUN_FSP_GOP Kconfig option and input - * VBT file. + * VBT file. Need to report the framebuffer info after PCI enumeration. * * In case of non-FSP solution, SoC need to select another * Kconfig to perform GFX initialization. */ - if (CONFIG(RUN_FSP_GOP)) + if (CONFIG(RUN_FSP_GOP)) { + fsp_report_framebuffer_info(graphics_get_memory_base()); return; + } if (!CONFIG(NO_GFX_INIT)) pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); @@ -155,16 +158,6 @@ void graphics_gtt_rmw(unsigned long reg, uint32_t andmask, uint32_t ormask) graphics_gtt_write(reg, val); } -/* - * fsp_soc_get_igd_bar() is declared in , - * but that draws incompatible UDK headers in. - */ -uintptr_t fsp_soc_get_igd_bar(void); -uintptr_t fsp_soc_get_igd_bar(void) -{ - return graphics_get_memory_base(); -} - static const struct device_operations graphics_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, -- cgit v1.2.3