]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jan 2014 18:45:35 +0000 (10:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jan 2014 18:45:35 +0000 (10:45 -0800)
added patches:
drm-nouveau-only-runtime-suspend-by-default-in-optimus-configuration.patch

queue-3.12/drm-nouveau-only-runtime-suspend-by-default-in-optimus-configuration.patch [new file with mode: 0644]
queue-3.12/series

diff --git a/queue-3.12/drm-nouveau-only-runtime-suspend-by-default-in-optimus-configuration.patch b/queue-3.12/drm-nouveau-only-runtime-suspend-by-default-in-optimus-configuration.patch
new file mode 100644 (file)
index 0000000..d08025e
--- /dev/null
@@ -0,0 +1,38 @@
+From b25b4427e9dfba073cf9bc86603956ed395eb6e3 Mon Sep 17 00:00:00 2001
+From: Ilia Mirkin <imirkin@alum.mit.edu>
+Date: Wed, 11 Dec 2013 22:19:01 -0500
+Subject: drm/nouveau: only runtime suspend by default in optimus configuration
+
+From: Ilia Mirkin <imirkin@alum.mit.edu>
+
+commit b25b4427e9dfba073cf9bc86603956ed395eb6e3 upstream.
+
+The intent was to only enable it by default for optimus, e.g. see the
+runtime_idle callback. The suspend callback may be called directly, e.g.
+as a result of nouveau_crtc_set_config.
+
+Reported-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
+Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
+Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/nouveau/nouveau_drm.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
++++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
+@@ -879,6 +879,12 @@ static int nouveau_pmops_runtime_suspend
+       if (nouveau_runtime_pm == 0)
+               return -EINVAL;
++      /* are we optimus enabled? */
++      if (nouveau_runtime_pm == -1 && !nouveau_is_optimus() && !nouveau_is_v1_dsm()) {
++              DRM_DEBUG_DRIVER("failing to power off - not optimus\n");
++              return -EINVAL;
++      }
++
+       drm_kms_helper_poll_disable(drm_dev);
+       vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
+       nouveau_switcheroo_optimus_dsm();
index 9f9b2b5bb852912f81ea0e41c78d34836d4c1338..288429a7b5d8788f3fd85a5efab26d73e2a17adf 100644 (file)
@@ -93,3 +93,4 @@ powerpc-fix-bad-stack-check-in-exception-entry.patch
 powerpc-align-p_end.patch
 cpupower-fix-segfault-due-to-incorrect-getopt_long-arugments.patch
 power_supply-fix-oops-from-null-pointer-dereference-from-wakeup_source_activate.patch
+drm-nouveau-only-runtime-suspend-by-default-in-optimus-configuration.patch