From: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
To: Hungyu Lin <dennylin0707@gmail.com>, 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
Subject: Re: [PATCH v4 2/2] media: qcom: iris: rollback OPP vote on PM resume failure
Date: Mon, 8 Jun 2026 11:59:20 +0530 [thread overview]
Message-ID: <99c109a5-26f4-4bf4-bf3e-941877ce9d0b@oss.qualcomm.com> (raw)
In-Reply-To: <20260607232841.79275-3-dennylin0707@gmail.com>
On 6/8/2026 4:58 AM, Hungyu Lin wrote:
> 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;
Please add a blank line between iris_opp_set_rate(core->dev, 0); and
return ret; to match the coding style used elsewhere in the driver at
end of the function.
> }
>
> int iris_disable_power_domains(struct iris_core *core, struct device *pd_dev)
prev parent reply other threads:[~2026-06-08 6: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 ` [PATCH v4 2/2] media: qcom: iris: rollback OPP vote on PM resume failure Hungyu Lin
2026-06-08 6:29 ` Vishnu Reddy [this message]
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=99c109a5-26f4-4bf4-bf3e-941877ce9d0b@oss.qualcomm.com \
--to=busanna.reddy@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dennylin0707@gmail.com \
--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®