Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: David Airlie <airlied@linux.ie>
Fixes: 3a6536c51d5d ("drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE")
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: <stable@vger.kernel.org> # v4.10+
Link: https://patchwork.freedesktop.org/patch/msgid/20220714174234.949259-3-lyude@redhat.com

+2 -2
+1 -1
drivers/gpu/drm/nouveau/nouveau_display.c
··· 515 515 516 516 pm_runtime_mark_last_busy(drm->dev->dev); 517 517 noop: 518 - pm_runtime_put_sync(drm->dev->dev); 518 + pm_runtime_put_autosuspend(dev->dev); 519 519 } 520 520 521 521 #ifdef CONFIG_ACPI
+1 -1
drivers/gpu/drm/nouveau/nouveau_fbcon.c
··· 467 467 if (state == FBINFO_STATE_RUNNING) { 468 468 nouveau_fbcon_hotplug_resume(drm->fbcon); 469 469 pm_runtime_mark_last_busy(drm->dev->dev); 470 - pm_runtime_put_sync(drm->dev->dev); 470 + pm_runtime_put_autosuspend(drm->dev->dev); 471 471 } 472 472 } 473 473