soc/intel/tigerlake: Disable Internal Gfx based on SOC_INTEL_DISABLE_IGD

Make IGD disable when mainboard user selects SOC_INTEL_DISABLE_IGD.

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: Ib297b339ce15ccb9212da32b27022610bc8aa2b3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49854
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
This commit is contained in:
Bora Guvendik 2021-01-22 15:50:26 -08:00 committed by Patrick Georgi
parent 61ab526971
commit 99157c1f4a
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 cpu_id, mask = 0; uint32_t cpu_id, mask = 0;
const struct device *dev; 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); 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 ? 0xFE : 0; m_cfg->IgdDvmt50PreAlloc = m_cfg->InternalGfx ? 0xFE : 0;
m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE; m_cfg->TsegSize = CONFIG_SMM_TSEG_SIZE;