[Intel-gfx] [PATCH 3/4] drm/i915: Add helpers for managing rps thresholds

Andi Shyti andi.shyti at linux.intel.com
Tue May 23 11:39:53 UTC 2023


Hi Tvrtko,

> > > +	/* Force reset. */
> > > +	rps->last_freq = -1;
> > > +	mutex_lock(&rps->power.mutex);
> > > +	rps->power.mode = -1;
> > > +	mutex_unlock(&rps->power.mutex);
> > > +
> > > +	intel_rps_set(rps, clamp(rps->cur_freq,
> > > +				 rps->min_freq_softlimit,
> > > +				 rps->max_freq_softlimit));
> > 
> > why are you resetting here?
> 
> I want to ensure the next calls to rps_set go past the "if (val ==
> rps->last_freq)" and "if (new_power == rps->power.mode)" checks (second one
> via gen6_rps_set_thresholds->rps_set_power" so new values are immediately
> programmed into the hardware and sw state reset and re-calculated.

thanks! makes sense!

Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com> 

Andi


More information about the dri-devel mailing list