From 8f20b12c95804cd9e390f709b69796979f43df62 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Sun, 14 Feb 2021 13:22:10 +0100 Subject: [PATCH] nb/i945/raminit.c: Don't hard code 'bool integrated_graphics' Change-Id: I735fa6413128cb9c17d99dfe9ffc3ee93ede51ae Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/49597 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph --- src/northbridge/intel/i945/raminit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c index a1a9a9c0b6..acb009f5b1 100644 --- a/src/northbridge/intel/i945/raminit.c +++ b/src/northbridge/intel/i945/raminit.c @@ -2124,6 +2124,9 @@ static void sdram_power_management(struct sys_info *sysinfo) int integrated_graphics = 1; int i; + if (!(pci_read_config8(HOST_BRIDGE, DEVEN) & (DEVEN_D2F0 | DEVEN_D2F1))) + integrated_graphics = false; + reg32 = MCHBAR32(C0DRT2); reg32 &= 0xffffff00; /* Idle timer = 8 clocks, CKE idle timer = 16 clocks */