From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Hungyu Lin <dennylin0707@gmail.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Stefan Schmidt <stefan.schmidt@linaro.org>,
Hans Verkuil <hverkuil@kernel.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] media: qcom: iris: move OPP handling to VPU power transaction
Date: Wed, 19 Aug 2026 13:28:55 +0200 [thread overview]
Message-ID: <22f01d3e-85ad-43ec-aa01-e5f3eced8703@oss.qualcomm.com> (raw)
In-Reply-To: <20260729011001.16999-1-dennylin0707@gmail.com>
On 7/29/26 3:10 AM, Hungyu Lin wrote:
> The power-domain helpers currently update the OPP for core->dev while
> enabling or disabling one functional power domain. This makes a
> transaction-wide performance state depend on a low-level helper and can
> leave the maximum OPP selected when a later power-domain resume fails.
>
> Move the maximum OPP request to iris_vpu_power_on(), after the ICC vote
> and before powering on the controller and hardware. Unwind the OPP vote
> together with the ICC vote on failures.
>
> Keep the power-domain helpers limited to runtime PM and use
> pm_runtime_resume_and_get() so a failed resume does not leave the usage
> counter incremented.
>
> Fixes: bb8a95aa038e ("media: iris: implement power management")
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
> @@ -472,10 +472,14 @@ int iris_vpu_power_on(struct iris_core *core)
> if (ret)
> goto err;
>
> - ret = core->iris_platform_data->vpu_ops->power_on_controller(core);
> + ret = iris_opp_set_rate(core->dev, ULONG_MAX);
> if (ret)
> goto err_unvote_icc;
>
> + ret = core->iris_platform_data->vpu_ops->power_on_controller(core);
> + if (ret)
> + goto err_opp;
> +
> ret = core->iris_platform_data->vpu_ops->power_on_hw(core);
> if (ret)
> goto err_power_off_ctrl;
> @@ -495,6 +499,8 @@ int iris_vpu_power_on(struct iris_core *core)
>
> err_power_off_ctrl:
> core->iris_platform_data->vpu_ops->power_off_controller(core);
> +err_opp:
> + iris_opp_set_rate(core->dev, 0);
iris_opp_set_rate(0) will almost never do what you want - it will set the
rate to something lower, but not disable the clocks or drop the power
vote. Dropping the vote will happen as the device (runtime) suspends.
This is an existing "issue" in the driver
Konrad
prev parent reply other threads:[~2026-08-19 11:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 1:10 [PATCH v6] media: qcom: iris: move OPP handling to VPU power transaction Hungyu Lin
2026-08-19 11:28 ` Konrad Dybcio [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=22f01d3e-85ad-43ec-aa01-e5f3eced8703@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dennylin0707@gmail.com \
--cc=dikshita.agarwal@oss.qualcomm.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