From 6e214bff1fae15574f6913dd2b322d89c432ab96 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 19 May 2014 14:04:43 -0400 Subject: [PATCH] vgaswitcheroo: switch the mux to the igp on power down when runpm is enabled (v2) Avoids blank screens on muxed systems when runpm is active. v2: switch the mux before suspending the dGPU to avoid turning the backlight off uncessarily. bug: https://bugs.freedesktop.org/show_bug.cgi?id=75917 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- drivers/gpu/vga/vga_switcheroo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index ec0ae2d..eeee98e 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -620,6 +620,9 @@ static int vga_switcheroo_runtime_suspend(struct device *dev) struct pci_dev *pdev = to_pci_dev(dev); int ret; + if (vgasr_priv.handler->switchto) + vgasr_priv.handler->switchto(VGA_SWITCHEROO_IGD); + ret = dev->bus->pm->runtime_suspend(dev); if (ret) return ret; -- 1.8.3.1