From: Hungyu Lin <dennylin0707@gmail.com>
To: linux-media@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
vikash.garodia@oss.qualcomm.com, abhinav.kumar@linux.dev,
bod@kernel.org, mchehab@kernel.org, hverkuil@kernel.org,
stefan.schmidt@linaro.org, Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH v4 2/2] media: qcom: iris: rollback OPP vote on PM resume failure
Date: Sun, 7 Jun 2026 23:28:41 +0000 [thread overview]
Message-ID: <20260607232841.79275-3-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260607232841.79275-1-dennylin0707@gmail.com>
Rollback the maximum OPP vote when
pm_runtime_resume_and_get() fails in
iris_enable_power_domains().
Use a standard rollback path to release the OPP vote when
power domain enablement does not complete successfully.
Fixes: bb8a95aa038e ("media: iris: implement power management")
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
Changes in v4:
- Addressed Dmitry Baryshkov's review comment.
- Reworked the error handling path to use a standard goto-based
rollback flow.
- Roll back the OPP vote from a dedicated error label when
pm_runtime_resume_and_get() fails.
drivers/media/platform/qcom/iris/iris_resources.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/iris/iris_resources.c b/drivers/media/platform/qcom/iris/iris_resources.c
index f5e3341e1430..9059cbe8fe5f 100644
--- a/drivers/media/platform/qcom/iris/iris_resources.c
+++ b/drivers/media/platform/qcom/iris/iris_resources.c
@@ -80,9 +80,13 @@ int iris_enable_power_domains(struct iris_core *core, struct device *pd_dev)
ret = pm_runtime_resume_and_get(pd_dev);
if (ret)
- return ret;
+ goto err_opp;
return 0;
+
+err_opp:
+ iris_opp_set_rate(core->dev, 0);
+ return ret;
}
int iris_disable_power_domains(struct iris_core *core, struct device *pd_dev)
--
2.34.1
next prev parent reply other threads:[~2026-06-07 23:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 23:28 [PATCH v4 0/2] media: qcom: iris: fix runtime PM reference handling Hungyu Lin
2026-06-07 23:28 ` [PATCH v4 1/2] media: qcom: iris: fix runtime PM reference leaks Hungyu Lin
2026-06-08 7:38 ` Konrad Dybcio
2026-06-07 23:28 ` Hungyu Lin [this message]
2026-06-08 6:29 ` [PATCH v4 2/2] media: qcom: iris: rollback OPP vote on PM resume failure Vishnu Reddy
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=20260607232841.79275-3-dennylin0707@gmail.com \
--to=dennylin0707@gmail.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=hverkuil@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=stefan.schmidt@linaro.org \
--cc=vikash.garodia@oss.qualcomm.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®