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

When resume in normal, 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=panther
TEST=build & test_that IP f:.*power_Resume/control to check if
seconds_system_resume time < 1

Change-Id: Ibcaa64ecd3c3265486bee6a2ea9f09d8fc1d49ef
Reviewed-on: https://chromium-review.googlesource.com/245216
Reviewed-by: Shawn N <shawnn@chromium.org>
Tested-by: Steven Jian <steven.jian@intel.com>
Commit-Queue: Steven Jian <steven.jian@intel.com>
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index c42932f..bd0a05d 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -425,6 +425,9 @@
 
 static void gma_func0_init(struct device *dev)
 {
+	/* Default set to 1 since it might be required for
+	   stuff like seabios */
+	unsigned int init_fb = 1;
 	int lightup_ok = 0;
 	u32 reg32;
 	u32 graphics_base; //, graphics_size;
@@ -445,13 +448,9 @@
 
 	/* Post VBIOS init */
 	gma_setup_panel(dev);
-
 #if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT
 	printk(BIOS_SPEW, "NATIVE graphics, run native enable\n");
 	u32 mmiobase, physbase;
-	/* Default set to 1 since it might be required for
-	   stuff like seabios */
-	unsigned int init_fb = 1;
 	mmiobase = dev->resource_list[0].base;
 	physbase = pci_read_config32(dev, 0x5c) & ~0xf;
 #ifdef CONFIG_CHROMEOS
@@ -461,7 +460,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);
 	}