mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/nouveau/acpi: Don't print error when we get -EINPROGRESS from pm_runtime
       [not found] <20220714174234.949259-1-lyude@redhat.com>
@ 2022-07-14 17:42 ` Lyude Paul
  2022-07-14 17:42 ` [PATCH v2 2/2] drm/nouveau: Don't pm_runtime_put_sync(), only pm_runtime_put_autosuspend() Lyude Paul
  1 sibling, 0 replies; 2+ messages in thread
From: Lyude Paul @ 2022-07-14 17:42 UTC (permalink / raw)
  To: nouveau
  Cc: dri-devel, Ben Skeggs, Karol Herbst, David Airlie, Daniel Vetter,
	open list

Since this isn't actually a failure.

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 drivers/gpu/drm/nouveau/nouveau_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 2cd0932b3d687..9f5a45f24e5be 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -537,7 +537,7 @@ nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val,
 				 * it's own hotplug events.
 				 */
 				pm_runtime_put_autosuspend(drm->dev->dev);
-			} else if (ret == 0) {
+			} else if (ret == 0 || ret == -EINPROGRESS) {
 				/* We've started resuming the GPU already, so
 				 * it will handle scheduling a full reprobe
 				 * itself
-- 
2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v2 2/2] drm/nouveau: Don't pm_runtime_put_sync(), only pm_runtime_put_autosuspend()
       [not found] <20220714174234.949259-1-lyude@redhat.com>
  2022-07-14 17:42 ` [PATCH v2 1/2] drm/nouveau/acpi: Don't print error when we get -EINPROGRESS from pm_runtime Lyude Paul
@ 2022-07-14 17:42 ` Lyude Paul
  1 sibling, 0 replies; 2+ messages in thread
From: Lyude Paul @ 2022-07-14 17:42 UTC (permalink / raw)
  To: nouveau
  Cc: dri-devel, Ben Skeggs, Karol Herbst, David Airlie, Daniel Vetter,
	open list

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()

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 drivers/gpu/drm/nouveau/nouveau_display.c | 2 +-
 drivers/gpu/drm/nouveau/nouveau_fbcon.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 9f5a45f24e5be..a2f5df568ca54 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -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
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 5226323e55d34..3c7e0c9d6baf1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -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);
 	}
 }
 
-- 
2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-14 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220714174234.949259-1-lyude@redhat.com>
2022-07-14 17:42 ` [PATCH v2 1/2] drm/nouveau/acpi: Don't print error when we get -EINPROGRESS from pm_runtime Lyude Paul
2022-07-14 17:42 ` [PATCH v2 2/2] drm/nouveau: Don't pm_runtime_put_sync(), only pm_runtime_put_autosuspend() Lyude Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®