mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] media: wave5: fix runtime PM error handling
@ 2026-10-03  8:08 Jiale Yao
  2026-10-03  8:08 ` [PATCH 1/4] media: wave5: handle decoder runtime resume failures Jiale Yao
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jiale Yao @ 2026-10-03  8:08 UTC (permalink / raw)
  To: Nas Chung, Jackson Lee, Mauro Carvalho Chehab, Nicolas Dufresne,
	Hans Verkuil, Sebastian Fricke, linux-media, linux-kernel
  Cc: Jiale Yao

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


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

end of thread, other threads:[~2026-10-07 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-03  8:08 [PATCH 0/4] media: wave5: fix runtime PM error handling Jiale Yao
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-03  8:08 ` [PATCH 3/4] media: wave5: handle runtime resume failure when closing Jiale Yao
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

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®