From: Jiale Yao <yaojiale02@163.com>
To: Nas Chung <nas.chung@chipsnmedia.com>,
Jackson Lee <jackson.lee@chipsnmedia.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Hans Verkuil <hverkuil@kernel.org>,
Sebastian Fricke <sebastian.fricke@collabora.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jiale Yao <yaojiale02@163.com>
Subject: [PATCH 0/4] media: wave5: fix runtime PM error handling
Date: Sat, 3 Oct 2026 16:08:48 +0800 [thread overview]
Message-ID: <20261003080853.430099-1-yaojiale02@163.com> (raw)
The Wave5 decoder, encoder, and close paths assume that
pm_runtime_resume_and_get() always succeeds. Runtime resume can fail while
enabling the VPU clocks, after which firmware commands can access unavailable
registers and cleanup paths can drop references that were not acquired.
The encoder close path also calls pm_runtime_resume_and_get() instead of
pm_runtime_put_sync() on three errors, leaking an additional reference on
each failure.
Check runtime resume results before hardware access, preserve the required
buffer and job cleanup in callbacks that cannot return errors, and correct
the encoder close error-path reference handling.
Jiale Yao (4):
media: wave5: handle decoder runtime resume failures
media: wave5: handle encoder runtime resume failures
media: wave5: handle runtime resume failure when closing
media: wave5: release runtime PM reference on encoder close errors
.../chips-media/wave5/wave5-vpu-dec.c | 55 +++++++++++++++++--
.../chips-media/wave5/wave5-vpu-enc.c | 25 ++++++++-
.../platform/chips-media/wave5/wave5-vpuapi.c | 14 +++--
3 files changed, 80 insertions(+), 14 deletions(-)
--
2.34.1
next reply other threads:[~2026-10-03 8:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 8:08 Jiale Yao [this message]
2026-10-03 8:08 ` [PATCH 1/4] media: wave5: handle decoder runtime resume failures Jiale Yao
2026-10-07 16:24 ` Brandon Brnich
2026-10-03 8:08 ` [PATCH 2/4] media: wave5: handle encoder " Jiale Yao
2026-10-08 7:16 ` jackson.lee
2026-10-03 8:08 ` [PATCH 3/4] media: wave5: handle runtime resume failure when closing Jiale Yao
2026-10-08 7:35 ` jackson.lee
2026-10-03 8:08 ` [PATCH 4/4] media: wave5: release runtime PM reference on encoder close errors Jiale Yao
2026-10-07 16:15 ` Brandon Brnich
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=20261003080853.430099-1-yaojiale02@163.com \
--to=yaojiale02@163.com \
--cc=hverkuil@kernel.org \
--cc=jackson.lee@chipsnmedia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nas.chung@chipsnmedia.com \
--cc=nicolas.dufresne@collabora.com \
--cc=sebastian.fricke@collabora.com \
/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
all inboxes | Powered by JetHome®