Re: [PATCH] opp: Return genpd virtual devices from dev_pm_opp_attach_genpd()
From: Viresh Kumar
Date: Wed Jul 17 2019 - 06:14:10 EST
On 17-07-19, 15:34, Rajendra Nayak wrote:
>
>
> On 7/17/2019 11:17 AM, Viresh Kumar wrote:
> > On 11-07-19, 15:09, Rajendra Nayak wrote:
> > > Sorry for the delay
> >
> > Same here :)
> >
> > > I seem to have completely missed this patch.
> > > I just gave this a try and here are some observations,
> > >
> > > I have a case where I have one device with 2 power domains, one of them
> > > is scale-able (supports perf state) and the other one supports only being
> > > turned on and off.
> > >
> > > 1. In the driver I now need to use dev_pm_domain_attach_by_name/id to attach the
> > > power domain which supports only on/off and then use dev_pm_opp_attach_genpd()
> > > for the one which supports perf states.
> > >
> > > 2. My OPP table has only 1 required_opps, so the required_opp_count for the OPP table is 1.
> > > Now if my device tree has my scale-able powerdomain at index 1 (it works if its at index 0)
> > > then I end up with this error
> > >
> > > [ 2.858628] ufshcd-qcom 1d84000.ufshc: Index can't be greater than required-opp-count - 1, rpmh_pd (1 : 1)
> > >
> > > so it looks like a lot of the OPP core today just assumes that if a device has multiple power domains,
> > > all of them are scale-able which isn't necessarily true.
> >
> > I don't think a lot of OPP core has these problems, but maybe only
> > this place. I was taking care of this since the beginning just forgot
> > it now.
> >
> > What about this over this commit:
>
> Yes, this does seem to fix my concern mentioned in 2. above.
Great. I will include your Tested-by:, Lemme know if you have any
objections.
--
viresh