[Freedreno] [PATCH 3/3] drm/msm: Add A6XX device support
Jordan Crouse
jcrouse at codeaurora.org
Mon Mar 5 15:26:32 UTC 2018
On Mon, Mar 05, 2018 at 10:09:38AM +0530, Viresh Kumar wrote:
> On 02-03-18, 14:43, Jordan Crouse wrote:
> > +static int a6xx_gmu_build_freq_table(struct device *dev, unsigned long *freqs,
> > + u32 size)
> > +{
> > + int count = dev_pm_opp_get_opp_count(dev);
> > + struct dev_pm_opp *opp;
> > + int i, index = 0;
> > + unsigned long freq = 1;
> > +
> > + /*
> > + * The OPP table doesn't contain the "off" frequency level so we need to
> > + * add 1 to the table size to account for it
> > + */
> > +
> > + if (WARN(count + 1 > size,
> > + "The GMU frequency table is being truncated\n"))
> > + count = size - 1;
> > +
> > + /* Set the "off" frequency */
> > + freqs[index++] = 0;
> > +
> > + for (i = 0; i < count; i++) {
> > + opp = dev_pm_opp_find_freq_ceil(dev, &freq);
> > + if (IS_ERR(opp))
> > + break;
> > +
> > + freqs[index++] = freq++;
>
> dev_pm_opp_put(opp) ?
>
Yes! Thank you for finding that. I'll fix it in the next go-around.
Jordan
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
More information about the Freedreno
mailing list