From f7ed93504a74760f16acb8fb3c6c57ac514b7260 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 10 Nov 2014 13:00:27 -0800 Subject: [PATCH] broadwell: Only do pre-graphics delay when running option rom This changes the broadwell graphics init path to only do the delay before initializing graphics when running chromeos if we are also going to execute the option rom. BUG=chrome-os-partner:33671 BRANCH=samus TEST=build and boot on samus Change-Id: I350f85738efe3d17152de4f025adbfd52ae15b95 Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/228882 Reviewed-by: Aaron Durbin --- src/soc/intel/broadwell/igd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/soc/intel/broadwell/igd.c b/src/soc/intel/broadwell/igd.c index fabc1d9e70..0999cc1467 100644 --- a/src/soc/intel/broadwell/igd.c +++ b/src/soc/intel/broadwell/igd.c @@ -32,6 +32,7 @@ #include #include #include +#include #define GT_RETRY 1000 #define GT_CDCLK_337 0 @@ -475,7 +476,6 @@ static void igd_init(struct device *dev) { int is_broadwell = !!(cpu_family_model() == BROADWELL_FAMILY_ULT); u32 rp1_gfx_freq; - extern int oprom_is_loaded; /* IGD needs to be Bus Master */ u32 reg32 = pci_read_config32(dev, PCI_COMMAND); @@ -487,7 +487,13 @@ static void igd_init(struct device *dev) return; /* Wait for any configured pre-graphics delay */ +#if IS_ENABLED(CONFIG_CHROMEOS) + if (developer_mode_enabled() || recovery_mode_enabled() || + vboot_wants_oprom()) + mdelay(CONFIG_PRE_GRAPHICS_DELAY); +#else mdelay(CONFIG_PRE_GRAPHICS_DELAY); +#endif /* Early init steps */ if (is_broadwell) {