From de4a1a0909488c89682a9fcada2d98c286e86d5b Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 20 Jun 2017 19:13:33 +0200 Subject: nb/intel/sandybridge/gma: Fix S3 resume The S3 resume path is broken on current Linux (4.11.3) and maybe on older kernel, too. Don't run the native graphics init when on S3 resume to fix it. Tested on Lenovo T430. Change-Id: Ifad145c86c2e8f019c507f97c889b70b7aa49882 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/20289 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Paul Menzel Reviewed-by: Nico Huber --- src/northbridge/intel/sandybridge/gma.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c index 2751b3a0ea..01b0e155a8 100644 --- a/src/northbridge/intel/sandybridge/gma.c +++ b/src/northbridge/intel/sandybridge/gma.c @@ -630,8 +630,10 @@ static void gma_func0_init(struct device *dev) /* Post VBIOS init */ gma_pm_init_post_vbios(dev); - if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) || - IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT)) { + /* Running graphics init on S3 breaks Linux drm driver. */ + if (!acpi_is_wakeup_s3() && + (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) || + IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT))) { /* This should probably run before post VBIOS init. */ printk(BIOS_SPEW, "Initializing VGA without OPROM.\n"); u8 *mmiobase; -- cgit v1.2.3