Re: [PATCH v7 3/3] soc: qcom: ice: Set ICE clk to TURBO on probe

Abhinaba Rakshit
2026-04-03T18:14:58Z

On Mon, Mar 30, 2026 at 08:14:13PM +0530, Harshal Dev wrote:
> >> diff --git a/drivers/soc/qcom/ice.c b/drivers/soc/qcom/ice.c
> >> index 7976a18d9a4cda1ad6b62b66ce011e244d0f6856..e8ee02a709574afa4ebb8e4395a8d899bf1d4976 100644
> >> --- a/drivers/soc/qcom/ice.c
> >> +++ b/drivers/soc/qcom/ice.c
> >> @@ -659,6 +659,13 @@ static struct qcom_ice *qcom_ice_create(struct device *dev,
> >> dev_info(dev, "ICE OPP table is not registered, please update your DT\n");
> >> }
> >>
> >> + if (engine->has_opp) {
> >> + /* Vote for maximum clock rate for maximum performance */
> >> + err = dev_pm_opp_set_rate(dev, INT_MAX);
> >> + if (err)
> >> + dev_warn(dev, "Failed boosting the ICE clk to TURBO\n");
> >> + }
> >> +
> >> engine->core_clk_freq = clk_get_rate(engine->core_clk);
> >> if (!qcom_ice_check_supported(engine))
> >> return ERR_PTR(-EOPNOTSUPP);
> >
> > Hi Konrad
> >
> > Since you previously reviewed this change, I wanted to share an improved approach
> > that I recently realized for handling ICE clock scaling in the MMC use‑case.
> >
> > So far, we have been voting for the maximum frequency during the ICE device probe
> > to align with MMC requirements.
> > But because the ICE probe is common across different storage clients, applying
> > the MAX vote at probe time may unintentionally impact other storage paths.
> >
> > Now that we have a generic scaling API exposed, we can make this logic
> > MMC‑specific instead. In particular, within sdhci_msm_ice_init().
> > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/mmc/host/sdhci-msm.c#n1966,
> > we can invoke: qcom_ice_scale_clk(ice, INT_MAX, false);
> >
>
> I agree, this is better instead of blindly turning the clk freq to maximum.
>
> I was about to ask you to move this to qcom_ice_probe() as per comments in previous
> commit. However, since you have mentioned this now, I suggest adding a call in
> sdhci_msm_ice_init() to qcom_ice_clk_scale() immediately after it calls qcom_ice_create().

Sure, thanks.
Will update it in patchset v8.

Abinaba Rakshit