* [PATCH v8] media: qcom: iris: release OPP constraints on VPU power-on failure
@ 2026-10-01 15:44 Hungyu Lin
[not found] ` <6abe9325.08f94d98.6f30f.894d@mx.google.com>
0 siblings, 1 reply; 2+ messages in thread
From: Hungyu Lin @ 2026-10-01 15:44 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, Hans Verkuil, Akhil P Oommen, linux-media,
linux-arm-msm, linux-kernel, Hungyu Lin
The power-domain helpers update the OPP for core->dev while enabling
or disabling individual functional domains. The zero-rate request
used during cleanup selects the minimum OPP rather than disabling
the OPP constraints, so a failed VPU power-on can leave required-OPP
performance-state requests installed. Supplier reference cleanup
after a failed runtime resume does not itself request supplier
suspension.
Move the maximum OPP request to iris_vpu_power_on(), leaving the
power-domain helpers responsible for runtime PM operations.
When controller or hardware power-on fails after the OPP request
succeeds, run the existing resource cleanup, then disable the OPP
constraints with dev_pm_opp_set_opp(dev, NULL).
Report an OPP-disable failure without replacing the original error,
and continue ICC cleanup. Keep failures of the maximum OPP request on
the ICC-only cleanup path. Recovery from partial failures in the OPP
transition itself and the existing normal-power-off behavior are
outside this change.
Fixes: f6940b79fcb6 ("media: iris: Fix opp scaling of power domains")
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
Changes in v8:
- Rebase onto media-committers.git next.
- Adapt the OPP ownership change to the Media tree's separate
power-domain helpers, preserving their runtime-PM return values.
- Update the commit message to describe the Media helper layout.
Changes in v7:
- Rebase the fix onto the updated power-domain and clock helpers.
- Remove OPP handling from the per-block power-domain and clock helpers.
- Keep the maximum OPP request in iris_vpu_power_on().
- Use the NULL-OPP disable path for failures after a successful maximum
OPP request.
- Keep a separate ICC-only cleanup path when the maximum OPP request
itself fails.
- Preserve the original power-on error if OPP disable fails.
- Update the Fixes tag to the commit that enabled required-OPP scaling
for the supplier domains.
Changes in v6:
- Move OPP handling from the power-domain helpers to
iris_vpu_power_on().
- Request the maximum OPP before powering on the controller and
hardware.
- Add a zero-rate OPP request to the VPU power-on error path.
- Keep the power-domain helpers limited to runtime PM operations.
- Replace pm_runtime_get_sync() with pm_runtime_resume_and_get().
- Rename the patch to reflect the new approach.
Changes in v5:
- Return pm_runtime_resume_and_get() directly.
- Handle pm_runtime_put_sync() failures while preserving an earlier
OPP-update error.
- Add a blank line before the rollback return.
Changes in v4:
- Convert the OPP rollback to a goto-based cleanup path.
.../media/platform/qcom/iris/iris_resources.c | 17 +----------------
.../media/platform/qcom/iris/iris_vpu_common.c | 12 ++++++++++--
2 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_resources.c b/drivers/media/platform/qcom/iris/iris_resources.c
index 883ef7e75291..752b1e81b110 100644
--- a/drivers/media/platform/qcom/iris/iris_resources.c
+++ b/drivers/media/platform/qcom/iris/iris_resources.c
@@ -74,27 +74,12 @@ int iris_opp_set_rate(struct device *dev, unsigned long freq)
int iris_enable_power_domains(struct iris_core *core, struct device *pd_dev)
{
- int ret;
-
- ret = iris_opp_set_rate(core->dev, ULONG_MAX);
- if (ret)
- return ret;
-
return pm_runtime_resume_and_get(pd_dev);
}
int iris_disable_power_domains(struct iris_core *core, struct device *pd_dev)
{
- int ret;
- int pm_ret;
-
- ret = iris_opp_set_rate(core->dev, 0);
-
- pm_ret = pm_runtime_put_sync(pd_dev);
- if (!ret)
- ret = pm_ret;
-
- return ret;
+ return pm_runtime_put_sync(pd_dev);
}
static struct clk *iris_get_clk_by_type(struct iris_core *core, enum platform_clk_type clk_type)
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/media/platform/qcom/iris/iris_vpu_common.c
index 243bd845349f..f277120e80ab 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
@@ -498,16 +498,20 @@ u64 iris_vpu3x_vpu4x_calculate_frequency(struct iris_inst *inst, size_t data_siz
int iris_vpu_power_on(struct iris_core *core)
{
u32 freq;
- int ret;
+ int ret, opp_ret;
ret = iris_set_icc_bw(core, INT_MAX);
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;
@@ -527,6 +531,10 @@ 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:
+ opp_ret = dev_pm_opp_set_opp(core->dev, NULL);
+ if (opp_ret)
+ dev_warn(core->dev, "failed to disable OPP: %d\n", opp_ret);
err_unvote_icc:
iris_unset_icc_bw(core);
err:
base-commit: c6fb304dc0253584cfcb93b6b97970c36850910a
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [v8] media: qcom: iris: release OPP constraints on VPU power-on failure
[not found] ` <6abe9325.08f94d98.6f30f.894d@mx.google.com>
@ 2026-10-01 23:02 ` Hungyu Lin
0 siblings, 0 replies; 2+ messages in thread
From: Hungyu Lin @ 2026-10-01 23:02 UTC (permalink / raw)
To: linux-media; +Cc: Linux Media CI, ribalda
Hi Ricardo and Media CI maintainers,
Thank you for testing v8.
v8 was based on media-committers.git next at:
c6fb304dc0253584cfcb93b6b97970c36850910a
The CI-applied commit e452a7481f23 also has that commit as its parent.
The ancestor log reports "Not a valid commit name" for both the
next and fixes tips. The checked next tip, 4a069a763e8a, is four
commits after the submitted base, with no changes to the two Iris
files touched by this patch.
Could you please check this ancestry failure and reapply v8 onto
the current next branch before running CI again? Please let me
know if a rebased v9 is required instead.
v8:
https://lore.kernel.org/r/20261001154436.20798-1-dennylin0707@gmail.com
CI report:
https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/111575061/artifacts/report.htm
Ancestor error log:
https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/111575054/artifacts/junit/test-valid-ancestor.err.txt
Thanks,
Hungyu Lin
On Thu, Oct 1, 2026 at 10:06 AM Patchwork Integration
<patchwork@media-ci.org> wrote:
>
> Dear Hungyu Lin:
>
> Thanks for your patches! Unfortunately the Media CI robot detected some
> issues:
>
> # Test media-patchstyle:test-valid-ancestor
> ERROR: This code is not based on any of the branches: next fixes
> from https://gitlab.freedesktop.org/linux-media/media-committers.git.
> The output of media-ci will not be reliable, and the code will not
> land upstream as-is. Please rebase your code.
>
>
>
> Please fix your series, and upload a new version. If you have a patchwork
> account, do not forget to mark the current series as Superseded.
>
> For more details, check the full report at:
> https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/111575061/artifacts/report.htm .
>
>
>
> Best regards, and Happy Hacking!
> Media CI robot on behalf of the linux-media community.
>
> ---
> Check the latest rules for contributing your patches at:
> https://docs.kernel.org/driver-api/media/maintainer-entry-profile.html
>
> If you believe that the CI is wrong, kindly open an issue at
> https://gitlab.freedesktop.org/linux-media/media-ci/-/issues or reply-all
> to this message.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-01 23:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 15:44 [PATCH v8] media: qcom: iris: release OPP constraints on VPU power-on failure Hungyu Lin
[not found] ` <6abe9325.08f94d98.6f30f.894d@mx.google.com>
2026-10-01 23:02 ` [v8] " Hungyu Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox