Re: FAILED: patch "[PATCH] drm/nouveau: only runtime suspend by default in optimus" failed to apply to 3.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Monday 06 January 2014, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> 
> The patch below does not apply to the 3.12-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@xxxxxxxxxxxxxxx>.
[...]

The patch below has been trivially rebased against 3.12.6, I'm 
successfully using it on 3.12.x since mid december.

Regards
        Stefan Lippers-Hollmann

-------------->
From: Ilia Mirkin <imirkin@xxxxxxxxxxxx>
Subject: [PATCH] drm/nouveau: only runtime suspend by default in optimus configuration
Date: Wed, 11 Dec 2013 22:19:01 -0500

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@xxxxxx>
Signed-off-by: Ilia Mirkin <imirkin@xxxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---

See http://lists.freedesktop.org/archives/dri-devel/2013-November/049738.html
for my analysis of the situation. Since this has been around since 3.12, I'm
tagging it for stable.

 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();
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]