Skip to contentSkip to conversation

drm/nouveau: only runtime suspend by default in optimus configuration

PATCH In review Ilia Mirkin 2 participants 2 messages Dec 12, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: only runtime suspend by default in optimus configuration

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.

---

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(+)
drivers/gpu/drm/nouveau/nouveau_drm.c +6 -0
index 7a3759f..98a22e6 100644
@@ -858,6 +858,12 @@ static int nouveau_pmops_runtime_suspend(struct device *dev)
 	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;
+	}
+
 	nv_debug_level(SILENT);
 	drm_kms_helper_poll_disable(drm_dev);
 	vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
Signature · 1 line
1.8.3.2
Tested-by on v1 1/1
#1 lore raw

Hi

Quoted 4 lines · Ilia Mirkin

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.

Quoted 8 lines

---

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.

[…]

Thanks a lot, this works fine on the affected system[1] (with and without a monitor attached and without the nouveau.runpm=0 workaround); feel free to add

Regards
Stefan Lippers-Hollmann

[1] trivially rebased against 3.12.4
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel