Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48884 )
Change subject: soc/intel/common/gfx: rename and guard graphics_soc_init() ......................................................................
soc/intel/common/gfx: rename and guard graphics_soc_init()
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 matt.devillier@gmail.com --- M src/soc/intel/apollolake/graphics.c M src/soc/intel/common/block/graphics/graphics.c M src/soc/intel/common/block/include/intelblocks/graphics.h M src/soc/intel/skylake/graphics.c 4 files changed, 11 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/48884/1
diff --git a/src/soc/intel/apollolake/graphics.c b/src/soc/intel/apollolake/graphics.c index 24d4772..b790b96 100644 --- a/src/soc/intel/apollolake/graphics.c +++ b/src/soc/intel/apollolake/graphics.c @@ -50,7 +50,7 @@ } }
-void graphics_soc_init(struct device *const dev) +void graphics_soc_panel_init(struct device *const dev) { const struct soc_intel_apollolake_config *const conf = dev->chip_info; const struct resource *mmio_res; diff --git a/src/soc/intel/common/block/graphics/graphics.c b/src/soc/intel/common/block/graphics/graphics.c index eac38f8..7150bab 100644 --- a/src/soc/intel/common/block/graphics/graphics.c +++ b/src/soc/intel/common/block/graphics/graphics.c @@ -16,7 +16,7 @@ #include <types.h>
/* 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 @@ { 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); diff --git a/src/soc/intel/common/block/include/intelblocks/graphics.h b/src/soc/intel/common/block/include/intelblocks/graphics.h index e65be4a..3669c77 100644 --- a/src/soc/intel/common/block/include/intelblocks/graphics.h +++ b/src/soc/intel/common/block/include/intelblocks/graphics.h @@ -12,11 +12,11 @@ */
/* - * Perform Graphics Initialization in ramstage + * Perform Graphics/Panel Initialization in ramstage * Input: * struct device *dev: device structure */ -void graphics_soc_init(struct device *dev); +void graphics_soc_panel_init(struct device *dev);
/* i915 controller info for ACPI backlight controls */ const struct i915_gpu_controller_info * diff --git a/src/soc/intel/skylake/graphics.c b/src/soc/intel/skylake/graphics.c index f95ca6c..46dc9db 100644 --- a/src/soc/intel/skylake/graphics.c +++ b/src/soc/intel/skylake/graphics.c @@ -12,7 +12,7 @@ #include <soc/systemagent.h> #include <types.h>
-void graphics_soc_init(struct device *dev) +void graphics_soc_panel_init(struct device *dev) { struct soc_intel_skylake_config *conf = config_of(dev); struct resource *mmio_res;