public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Maíra Canal <mcanal@igalia.com>
To: Melissa Wen <mwen@igalia.com>, Iago Toral <itoral@igalia.com>,
	Maxime Ripard <mripard@kernel.org>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Boris Brezillon <bbrezillon@kernel.org>
Cc: kernel-dev@igalia.com, dri-devel@lists.freedesktop.org,
	Maíra Canal <mcanal@igalia.com>
Subject: [PATCH 1/6] drm/vc4: Release runtime PM reference after binding V3D
Date: Mon, 30 Mar 2026 14:51:43 -0300	[thread overview]
Message-ID: <20260330-vc4-misc-fixes-v1-1-92defc940a29@igalia.com> (raw)
In-Reply-To: <20260330-vc4-misc-fixes-v1-0-92defc940a29@igalia.com>

The vc4_v3d_bind() function acquires a runtime PM reference via
pm_runtime_resume_and_get() to access V3D registers during setup.
However, this reference is never released after a successful bind.
This prevents the device from ever runtime suspending, since the
reference count never reaches zero.

Release the runtime PM reference by adding pm_runtime_put_autosuspend()
after autosuspend is configured, allowing the device to runtime suspend
after the delay.

Fixes: 266cff37d7fc ("drm/vc4: v3d: Rework the runtime_pm setup")
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
---
 drivers/gpu/drm/vc4/vc4_v3d.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
index 3ffe09bc89d273c2ec598f391147425d9f6785bf..d31b906cb8e787517ba3ff72c236ffcf810522b1 100644
--- a/drivers/gpu/drm/vc4/vc4_v3d.c
+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
@@ -481,6 +481,7 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)
 
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_set_autosuspend_delay(dev, 40); /* a little over 2 frames. */
+	pm_runtime_put_autosuspend(dev);
 
 	return 0;
 

-- 
2.53.0


  reply	other threads:[~2026-03-30 17:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 17:51 [PATCH 0/6] drm/vc4: Miscellaneous fixes and improvements Maíra Canal
2026-03-30 17:51 ` Maíra Canal [this message]
2026-03-31  7:01   ` Claude review: drm/vc4: Release runtime PM reference after binding V3D Claude Code Review Bot
2026-03-30 17:51 ` [PATCH 2/6] drm/vc4: Fix memory leak of BO array in hang state Maíra Canal
2026-03-31  7:02   ` Claude review: " Claude Code Review Bot
2026-03-30 17:51 ` [PATCH 3/6] drm/vc4: Fix a memory leak in hang state error path Maíra Canal
2026-03-31  7:02   ` Claude review: " Claude Code Review Bot
2026-03-30 17:51 ` [PATCH 4/6] drm/vc4: Protect madv read in vc4_gem_object_mmap() with madv_lock Maíra Canal
2026-03-31  7:02   ` Claude review: " Claude Code Review Bot
2026-03-30 17:51 ` [PATCH 5/6] drm/vc4: Use devm_request_irq() for automatic cleanup Maíra Canal
2026-03-31  7:02   ` Claude review: " Claude Code Review Bot
2026-03-30 17:51 ` [PATCH 6/6] drm/vc4: Clean-up UAPI header inclusion Maíra Canal
2026-03-31  7:02   ` Claude review: " Claude Code Review Bot
2026-03-31  7:01 ` Claude review: drm/vc4: Miscellaneous fixes and improvements Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260330-vc4-misc-fixes-v1-1-92defc940a29@igalia.com \
    --to=mcanal@igalia.com \
    --cc=airlied@gmail.com \
    --cc=bbrezillon@kernel.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=itoral@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=kernel-list@raspberrypi.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox