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 <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49291
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Subrata Banik 2021-01-15 12:16:05 +05:30
parent 0591348833
commit d74cd60b81
1 changed files with 6 additions and 5 deletions

View File

@ -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;