From 395ab9da9322fb9dd208f9c4e3987d32bc911399 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 23 Dec 2020 17:30:27 -0600 Subject: soc/intel/common/gfx: rename and guard graphics_soc_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename to graphics_soc_panel_init, to more accurately convey operations performed by the function. Guard execution so we don't attempt to reconfigure the panel after FSP has already done so. This fixes FSP/GOP display init on APL/GLK, which was broken by attempting to configure the panel after FSP had already done so. Change-Id: I8e68a16b2efb59965077735578b1cc6ffd5a58f0 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/48884 Reviewed-by: Nico Huber Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/graphics/graphics.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/soc/intel/common/block/graphics/graphics.c') diff --git a/src/soc/intel/common/block/graphics/graphics.c b/src/soc/intel/common/block/graphics/graphics.c index eac38f8f15..7150babc83 100644 --- a/src/soc/intel/common/block/graphics/graphics.c +++ b/src/soc/intel/common/block/graphics/graphics.c @@ -16,7 +16,7 @@ #include /* SoC Overrides */ -__weak void graphics_soc_init(struct device *dev) +__weak void graphics_soc_panel_init(struct device *dev) { /* * User needs to implement SoC override in case wishes @@ -34,8 +34,12 @@ static void gma_init(struct device *const dev) { intel_gma_init_igd_opregion(); - /* SoC specific configuration. */ - graphics_soc_init(dev); + /* SoC specific panel init/configuration. + If FSP has already run/configured the IGD, we can assume the + panel/backlight control have already been set up sufficiently + and that we shouldn't attempt to reconfigure things. */ + if (!CONFIG(RUN_FSP_GOP)) + graphics_soc_panel_init(dev); if (CONFIG(SOC_INTEL_CONFIGURE_DDI_A_4_LANES) && !acpi_is_wakeup_s3()) { const u32 ddi_buf_ctl = graphics_gtt_read(DDI_BUF_CTL_A); -- cgit v1.2.3