Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/nouveau: Don't pm_runtime_put_sync(), only" failed to apply to 5.4-stable tree

PATCH [email protected] 1 participant 1 message Aug 13, 2022

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.4-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 <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From c96cfaf8fc02d4bb70727dfa7ce7841a3cff9be2 Mon Sep 17 00:00:00 2001
From: Lyude Paul <[email protected]>
Date: Thu, 14 Jul 2022 13:42:34 -0400
Subject: [PATCH] drm/nouveau: Don't pm_runtime_put_sync(), only
pm_runtime_put_autosuspend()

While trying to fix another issue, it occurred to me that I don't actually think there is any situation where we want pm_runtime_put() in nouveau to be synchronous. In fact, this kind of just seems like it would cause issues where we may unexpectedly block a thread we don't expect to be blocked.

So, let's only use pm_runtime_put_autosuspend().

Changes since v1:
* Use pm_runtime_put_autosuspend(), not pm_runtime_put()

Fixes 3a6536c51d5d ("drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE")
Cc Hans de Goede <[email protected]>
Cc <[email protected]> # v4.10+
drivers/gpu/drm/nouveau/nouveau_display.c +1 -1
index 9f5a45f24e5b..a2f5df568ca5 100644
@@ -515,7 +515,7 @@ nouveau_display_hpd_work(struct work_struct *work)
 
 	pm_runtime_mark_last_busy(drm->dev->dev);
 noop:
-	pm_runtime_put_sync(drm->dev->dev);
+	pm_runtime_put_autosuspend(dev->dev);
 }
 
 #ifdef CONFIG_ACPI
drivers/gpu/drm/nouveau/nouveau_fbcon.c +1 -1
index 5226323e55d3..3c7e0c9d6baf 100644
@@ -467,7 +467,7 @@ nouveau_fbcon_set_suspend_work(struct work_struct *work)
 	if (state == FBINFO_STATE_RUNNING) {
 		nouveau_fbcon_hotplug_resume(drm->fbcon);
 		pm_runtime_mark_last_busy(drm->dev->dev);
-		pm_runtime_put_sync(drm->dev->dev);
+		pm_runtime_put_autosuspend(drm->dev->dev);
 	}
 }