* [PATCH v2] media: qcom: iris: handle runtime PM resume failure in core deinit @ 2026-06-04 5:04 ` Hungyu Lin 2026-07-28 12:52 ` Bryan O'Donoghue 0 siblings, 1 reply; 2+ messages in thread From: Hungyu Lin @ 2026-06-04 5:04 UTC (permalink / raw) To: vikash.garodia Cc: dikshita.agarwal, abhinav.kumar, bod, mchehab, stefan.schmidt, hverkuil, linux-media, linux-arm-msm, linux-kernel, Hungyu Lin Check the return value of pm_runtime_resume_and_get() in iris_core_deinit(). If runtime PM resume fails, skip hardware power-off operations but still perform software teardown and state transition. Also skip the corresponding pm_runtime_put_sync() call to avoid unbalanced runtime PM references. Fixes: bb8a95aa038e ("media: iris: implement power management") Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> --- Changes in v2: - Keep software teardown and state transition when runtime PM resume fails - Skip only hardware power-off operations and pm_runtime_put_sync() drivers/media/platform/qcom/iris/iris_core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_core.c b/drivers/media/platform/qcom/iris/iris_core.c index dbaac01eb15a..bf3c7f722490 100644 --- a/drivers/media/platform/qcom/iris/iris_core.c +++ b/drivers/media/platform/qcom/iris/iris_core.c @@ -12,18 +12,24 @@ void iris_core_deinit(struct iris_core *core) { - pm_runtime_resume_and_get(core->dev); + int ret; + + ret = pm_runtime_resume_and_get(core->dev); mutex_lock(&core->lock); if (core->state != IRIS_CORE_DEINIT) { iris_fw_unload(core); - iris_vpu_power_off(core); + + if (!ret) + iris_vpu_power_off(core); + iris_hfi_queues_deinit(core); core->state = IRIS_CORE_DEINIT; } mutex_unlock(&core->lock); - pm_runtime_put_sync(core->dev); + if (!ret) + pm_runtime_put_sync(core->dev); } static int iris_wait_for_system_response(struct iris_core *core) -- 2.34.1 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] media: qcom: iris: handle runtime PM resume failure in core deinit 2026-06-04 5:04 ` [PATCH v2] media: qcom: iris: handle runtime PM resume failure in core deinit Hungyu Lin @ 2026-07-28 12:52 ` Bryan O'Donoghue 0 siblings, 0 replies; 2+ messages in thread From: Bryan O'Donoghue @ 2026-07-28 12:52 UTC (permalink / raw) To: Hungyu Lin, vikash.garodia Cc: dikshita.agarwal, abhinav.kumar, mchehab, stefan.schmidt, hverkuil, linux-media, linux-arm-msm, linux-kernel On 04/06/2026 06:04, Hungyu Lin wrote: > Check the return value of pm_runtime_resume_and_get() in > iris_core_deinit(). > > If runtime PM resume fails, skip hardware power-off operations but > still perform software teardown and state transition. Also skip the > corresponding pm_runtime_put_sync() call to avoid unbalanced runtime > PM references. > > Fixes: bb8a95aa038e ("media: iris: implement power management") > Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> > --- > Changes in v2: > - Keep software teardown and state transition when runtime PM resume fails > - Skip only hardware power-off operations and pm_runtime_put_sync() > > drivers/media/platform/qcom/iris/iris_core.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/media/platform/qcom/iris/iris_core.c b/drivers/media/platform/qcom/iris/iris_core.c > index dbaac01eb15a..bf3c7f722490 100644 > --- a/drivers/media/platform/qcom/iris/iris_core.c > +++ b/drivers/media/platform/qcom/iris/iris_core.c Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-28 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <tR8w2GUkOUcarBSbnLxQsLPJsDQrGHIxWcizc8oRS0vu5wWNbeqYLWN5I8JKOpgJg61rd7q3XoGBl0KeV4V9JQ==@protonmail.internalid>
2026-06-04 5:04 ` [PATCH v2] media: qcom: iris: handle runtime PM resume failure in core deinit Hungyu Lin
2026-07-28 12:52 ` Bryan O'Donoghue
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®