Re: [PATCH 2/6] drm/i915/gt: Move rps.enabled/active to flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Andi Shyti (2020-04-27 00:15:56)
> Hi Chris,
> 
> >       intel_uncore_forcewake_get(uncore, FORCEWAKE_ALL);
> >       if (IS_CHERRYVIEW(i915))
> > -             rps->enabled = chv_rps_enable(rps);
> > +             enabled = chv_rps_enable(rps);
> >       else if (IS_VALLEYVIEW(i915))
> > -             rps->enabled = vlv_rps_enable(rps);
> > +             enabled = vlv_rps_enable(rps);
> >       else if (INTEL_GEN(i915) >= 9)
> > -             rps->enabled = gen9_rps_enable(rps);
> > +             enabled = gen9_rps_enable(rps);
> >       else if (INTEL_GEN(i915) >= 8)
> > -             rps->enabled = gen8_rps_enable(rps);
> > +             enabled = gen8_rps_enable(rps);
> >       else if (INTEL_GEN(i915) >= 6)
> > -             rps->enabled = gen6_rps_enable(rps);
> > +             enabled = gen6_rps_enable(rps);
> >       else if (IS_IRONLAKE_M(i915))
> > -             rps->enabled = gen5_rps_enable(rps);
> > +             enabled = gen5_rps_enable(rps);
> >       intel_uncore_forcewake_put(uncore, FORCEWAKE_ALL);
> > -     if (!rps->enabled)
> > +     if (!enabled || rps->max_freq <= rps->min_freq)
> 
> isn't this a bit out of context? I don't think the above
> functions have any effect on max_freq and min freq.

The question is whether or not we want to enable dynamic reclocking if
the range is 0. The answer to that, is definitely no -- just look at all
the selftests that do not work (because the frequency cannot be changed)!

An alternative would be to

if (rps->max_freq <= rpq->min_freq)
	/* leave disabled, no room for dynamic reclocking */
else if ...
else
	MISSING_CASE(INTEL_GEN(i915));
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux