[PATCH 0/4] media: wave5: fix runtime PM error handling
From: Jiale Yao
Date: Sat Oct 03 2026 - 04:09:22 EST
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