summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2020-02-19 12:54:06 +0100
committerPatrick Rudolph <siro@das-labor.org>2020-12-14 08:21:22 +0000
commit92106b166671a315a2b1e8f5cc467f2fa0823301 (patch)
treecafe3140a79757b87133b1e12f2420c43e02618c /src/soc/intel
parenta3495c0d7b249ce5cf53335d2036e31f1a86739c (diff)
downloadcoreboot-92106b166671a315a2b1e8f5cc467f2fa0823301.tar.xz
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 <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39003 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-by: Christian Walter <christian.walter@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/graphics/graphics.c17
1 files changed, 5 insertions, 12 deletions
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 <drivers/intel/gma/libgfxinit.h>
#include <drivers/intel/gma/opregion.h>
#include <intelblocks/graphics.h>
+#include <fsp/graphics.h>
#include <soc/pci_devs.h>
#include <types.h>
@@ -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 <fsp/util.h>,
- * 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,