<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20289">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">nb/intel/sandybridge/gma: Fix S3 resume<br><br>The S3 resume path is broken on newer Linux kernel.<br>Don't run the graphics init when on S3 resume, except<br>for CONFIG_S3_VGA_ROM_RUN.<br><br>Fixes black panel after S3 resume.<br><br>Tested on Lenovo T430.<br><br>Change-Id: Ifad145c86c2e8f019c507f97c889b70b7aa49882<br>Signed-off-by: Patrick Rudolph <siro@das-labor.org><br>---<br>M src/northbridge/intel/sandybridge/gma.c<br>1 file changed, 8 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/20289/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c<br>index 41c48dc..c76d714 100644<br>--- a/src/northbridge/intel/sandybridge/gma.c<br>+++ b/src/northbridge/intel/sandybridge/gma.c<br>@@ -598,6 +598,7 @@<br> <br> static void gma_func0_init(struct device *dev)<br> {<br>+     bool run_gfx_init;<br>    u32 reg32;<br> <br>         /* IGD needs to be Bus Master */<br>@@ -608,8 +609,12 @@<br>        /* Init graphics power management */<br>  gma_pm_init_pre_vbios(dev);<br> <br>-       if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) ||<br>-           IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT)) {<br>+   run_gfx_init = !acpi_is_wakeup_s3() ||<br>+               (IS_ENABLED(CONFIG_S3_VGA_ROM_RUN) && acpi_is_wakeup_s3());<br>+<br>+       if (run_gfx_init &&<br>+      (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) ||<br>+          IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT))) {<br>           /* This should probably run before post VBIOS init. */<br>                printk(BIOS_SPEW, "Initializing VGA without OPROM.\n");<br>             u8 *mmiobase;<br>@@ -630,7 +635,7 @@<br>            }<br>             if (lightup_ok)<br>                       gfx_set_init_done(1);<br>-        } else {<br>+     } else if (run_gfx_init) {<br>            /* PCI Init, will run VBIOS */<br>                pci_dev_init(dev);<br>    }<br></pre><p>To view, visit <a href="https://review.coreboot.org/20289">change 20289</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20289"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ifad145c86c2e8f019c507f97c889b70b7aa49882 </div>
<div style="display:none"> Gerrit-Change-Number: 20289 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>