[Intel-gfx] [PATCH v2] drm/i915: Set softmin frequency on idle->busy transition

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 16 21:04:31 UTC 2016


On Thu, Jun 16, 2016 at 04:42:30PM +0100, Chris Wilson wrote:
> On Thu, Jun 16, 2016 at 05:19:49PM +0200, Michał Winiarski wrote:
> >  void gen6_rps_busy(struct drm_i915_private *dev_priv)
> >  {
> >  	mutex_lock(&dev_priv->rps.hw_lock);
> >  	if (dev_priv->rps.enabled) {
> 
> /* Ensure we start at the user's desired minimum frequency */
> > +		intel_set_rps(dev_priv, dev_priv->rps.min_freq_softlimit);
> 
> Only if cur_freq < min_freq_softlimit

Actually thinking something like

intel_set_rps(dev_priv,
	      clamp(dev_priv->rps.cur_freq,
		    dev_priv->rps.min_freq_softlimit,
		    dev_priv->rps.max_freq_softlimit));

will do the trick. A request to set cur_freq will be filtered out by
intel_set_rps.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list