From d74cd60b8159c3928dba318e6387f200ff3bb0e7 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Fri, 15 Jan 2021 12:16:05 +0530 Subject: soc/intel/alderlake: Disable Internal Gfx based on SOC_INTEL_DISABLE_IGD Make IGD disable when mainboard user selects SOC_INTEL_DISABLE_IGD. TEST=Able to get depthcharge pre-OS splash screen with AMD Radeon RX 5700 PCI-E DGPU when mainboard user selects SOC_INTEL_DISABLE_IGD. Change-Id: Ibbe9c8c4d77018de83815d7d203284b1fbc0da58 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/49291 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/soc/intel/alderlake/romstage/fsp_params.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/alderlake/romstage/fsp_params.c b/src/soc/intel/alderlake/romstage/fsp_params.c index a615f0bc6a..0154cb4848 100644 --- a/src/soc/intel/alderlake/romstage/fsp_params.c +++ b/src/soc/intel/alderlake/romstage/fsp_params.c @@ -22,12 +22,13 @@ static void soc_memory_init_params(FSP_M_CONFIG *m_cfg, uint32_t mask = 0; const struct device *dev; - /* - * If IGD is enabled, set IGD stolen size to 60MB. - * Otherwise, skip IGD init in FSP. - */ dev = pcidev_path_on_root(SA_DEVFN_IGD); - m_cfg->InternalGfx = is_dev_enabled(dev); + if (!CONFIG(SOC_INTEL_DISABLE_IGD) && is_dev_enabled(dev)) + m_cfg->InternalGfx = 1; + else + m_cfg->InternalGfx = 0; + + /* If IGD is enabled, set IGD stolen size to 60MB. Otherwise, skip IGD init in FSP */ m_cfg->IgdDvmt50PreAlloc = m_cfg->InternalGfx ? IGD_SM_60MB : 0; m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE; -- cgit v1.2.3