Re: [PATCH 2/2] OPP: Disallow "opp-hz" property without a corresponding clk

From: Manivannan Sadhasivam
Date: Thu Feb 16 2023 - 01:47:41 EST


+ Rob Clark

On Wed, Jan 25, 2023 at 09:51:45AM +0530, Viresh Kumar wrote:
> On 21-11-22, 13:09, Manivannan Sadhasivam wrote:
> > That's right. I have proposed to do the similar change to other SoCs as well
> > once the series was completely merged. I thought of doing so for 6.3.
> >
> > Btw, there seems to be one more candidate:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/qcom/sm8250.dtsi#n2537
> >
> > Looks like newer SoCs that has the GMU within the GPU block doesn't have clock
> > property. This is because, GMU is the one supplying clocks to the GPU unlike the
> > old SoCs where the clocks used to come from GCC itself.
> >
> > But we do have a GMU devicetree node, so it should be a matter of adding the
> > clock provider support as done for cpufreq and represent it in devicetree.
> >
> > I'll ping Rob Clark and see how to get it done.
>
> Any update on this Mani ? I want to get the hack removed if possible.
>

Hi Viresh,

Sorry for the delay. I've submitted the dts changes [1] to handle the CPU clocks
for the rest of the Qcom SoCs.

For the Qcom GPUs, I've CCed Rob Clark who is the maintainer.

Rob, here is the background on the issue that is being discussed in this
thread:

Viresh submitted a series [2] back in July to improve the OPP framework, but
that ended up breaking cpufreq on multiple Qcom SoCs. After investigation, it
was found that the series was expecting the clocks supplied to the OPP end
devices like CPUs/GPUs to be modeled in DT. But on Qcom platforms even though
the clocks for these nodes are supplied by a separate entity, like CPUFreq
(EPSS/OSM) for CPUs and GMU for GPUs, there was no clock property present in
the respective nodes. And these nodes are using OPP table to switch frequencies
dynamically.

While the series was merged with a hack that still allows the OPP nodes without
clock property in DT, we came to an agreement that the clock hierarchy should
be modeled properly.

So I submitted a series [3] that added clock provider support to cpufreq driver
and sourced the clock from cpufreq node to CPU nodes in DT.

Likewise, it should be handled for the adreno GPUs whose clock is managed by
GMU on newer SoCs. Can you take a look at this?

Thanks,
Mani

[1] https://lore.kernel.org/linux-arm-msm/20230215070400.5901-1-manivannan.sadhasivam@xxxxxxxxxx/
[2] https://lore.kernel.org/lkml/cover.1657003420.git.viresh.kumar@xxxxxxxxxx/
[3] https://lore.kernel.org/linux-arm-msm/20221117053145.10409-1-manivannan.sadhasivam@xxxxxxxxxx/

> --
> viresh

--
மணிவண்ணன் சதாசிவம்