[PATCH] drm/msm/a6xx: restore previous freq on resume

Rob Clark robdclark at gmail.com
Tue Nov 19 03:28:55 UTC 2019


On Mon, Nov 18, 2019 at 4:32 PM Stephen Boyd <swboyd at chromium.org> wrote:
>
> Quoting Rob Clark (2019-11-18 15:40:38)
> > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h b/drivers/gpu/drm/msm/adreno/a6xx_gmu.h
> > index 39a26dd63674..2af91ed7ed0c 100644
> > --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h
> > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.h
> > @@ -63,6 +63,9 @@ struct a6xx_gmu {
> >         struct clk_bulk_data *clocks;
> >         struct clk *core_clk;
> >
> > +       /* current performance index set externally */
> > +       int current_perf_index;
> > +
>
> Is there a reason this isn't unsigned? It looks like
> __a6xx_gmu_set_freq() takes an int, but maybe it should take a u16 or
> something?
>

no particular reason, other than other things where already using an
int.. this is just an index into the table of opp's so it is never
going to be a large int.

Depending on GMU_DCVS_PERF_SETTING it could probably be a u8 (I'm not
*entirely* sure from the code how large that bitfield is)

BR,
-R


More information about the dri-devel mailing list