From 5e7ad65f6f2583b1f8e46848918e36a31928f7c9 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sat, 14 Apr 2018 20:08:54 +0200 Subject: nb/intel/i945/gma: Skip native VGA init for ACPI S3 resume Currently, native VGA initialization takes 90 ms during resume. But, it is not needed. So, skip it to save that time. Note, it is assumed that ACPI aware operating systems ship the appropriate drivers to initialize the graphics device. With Linux, if the module/driver *i915* is not loaded, then the display will stay black. TEST=On Lenovo X60t with Debian and Linux 4.15.11-1~bpo9+1, suspend and resume system and notice display is correctly initialized by the driver i915 after resume. Notice the messages below. ``` PCI: 00:02.0 init ... Skipping native VGA initialization when resuming from ACPI S3. PCI: 00:02.0 init finished in 56 usecs PCI: 00:02.1 init ... ``` Change-Id: I6cc9dde94c18671d077132daf648e8ba557e7887 Signed-off-by: Paul Menzel Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/25676 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/northbridge/intel/i945/gma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/northbridge/intel') diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index 48a0867003..5ca06a9098 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -701,7 +701,11 @@ static void gma_func0_init(struct device *dev) | PCI_COMMAND_IO | PCI_COMMAND_MEMORY); if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) { - gma_ngi(dev); + if (acpi_is_wakeup_s3()) + printk(BIOS_INFO, + "Skipping native VGA initialization when resuming from ACPI S3.\n"); + else + gma_ngi(dev); } else { /* PCI Init, will run VBIOS */ pci_dev_init(dev); -- cgit v1.2.3