haswell: No need pre-graphics delay when in normal mode or resume from S3

When resume in normal mode, we won't use vgabios.bin. So no need this delay.
It can shorten the resume time ~300 ms to meet the criteria: resume < 1 second.

Per Stefan, the delay should not be enabled for resume from S3, only for
cold boot and only when in dev/recovery mode.

BUG=chrome-os-partner:30639
BRANCH=tricky
TEST=build & test_that IP f:.*power_Resume/control to check if
seconds_system_resume time < 1

Change-Id: I82e06dd351638a829667bee4ee4f34fb0354e1b1
Reviewed-on: https://chromium-review.googlesource.com/245667
Tested-by: Steven Jian <steven.jian@intel.com>
Commit-Queue: Steven Jian <steven.jian@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index f8351e2..aead11b 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -429,6 +429,9 @@
 	struct northbridge_intel_haswell_config *conf = dev->chip_info;
 	struct intel_dp dp;
 #endif
+	/* Default set to 1 since it might be required for
+	   stuff like seabios */
+	unsigned int init_fb = 1;
 	int lightup_ok = 0;
 	u32 reg32;
 	/* IGD needs to be Bus Master */
@@ -444,9 +447,6 @@
 
 #if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT
 	printk(BIOS_SPEW, "NATIVE graphics, run native enable\n");
-	/* Default set to 1 since it might be required for
-	   stuff like seabios */
-	unsigned int init_fb = 1;
 
 	/* the BAR for graphics space is a well known number for
 	 * sandy and ivy. And the resource code renumbers it.
@@ -465,7 +465,8 @@
 #endif
 	if (! lightup_ok) {
 		printk(BIOS_SPEW, "FUI did not run; using VBIOS\n");
-		mdelay(CONFIG_PRE_GRAPHICS_DELAY);
+		if (acpi_slp_type != 3 && init_fb)
+			mdelay(CONFIG_PRE_GRAPHICS_DELAY);
 		pci_dev_init(dev);
 	}