[coreboot-gerrit] Change in coreboot[master]: nb/intel/sandybridge/gma: Fix S3 resume
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Tue Jun 20 19:14:29 CEST 2017
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/20289
Change subject: nb/intel/sandybridge/gma: Fix S3 resume
......................................................................
nb/intel/sandybridge/gma: Fix S3 resume
The S3 resume path is broken on newer Linux kernel.
Don't run the graphics init when on S3 resume, except
for CONFIG_S3_VGA_ROM_RUN.
Fixes black panel after S3 resume.
Tested on Lenovo T430.
Change-Id: Ifad145c86c2e8f019c507f97c889b70b7aa49882
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/northbridge/intel/sandybridge/gma.c
1 file changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/20289/1
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index 41c48dc..c76d714 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -598,6 +598,7 @@
static void gma_func0_init(struct device *dev)
{
+ bool run_gfx_init;
u32 reg32;
/* IGD needs to be Bus Master */
@@ -608,8 +609,12 @@
/* Init graphics power management */
gma_pm_init_pre_vbios(dev);
- if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) ||
- IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT)) {
+ run_gfx_init = !acpi_is_wakeup_s3() ||
+ (IS_ENABLED(CONFIG_S3_VGA_ROM_RUN) && acpi_is_wakeup_s3());
+
+ if (run_gfx_init &&
+ (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;
@@ -630,7 +635,7 @@
}
if (lightup_ok)
gfx_set_init_done(1);
- } else {
+ } else if (run_gfx_init) {
/* PCI Init, will run VBIOS */
pci_dev_init(dev);
}
--
To view, visit https://review.coreboot.org/20289
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifad145c86c2e8f019c507f97c889b70b7aa49882
Gerrit-Change-Number: 20289
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170620/2a589c45/attachment.html>
More information about the coreboot-gerrit
mailing list