Re: [PATCH 40/44] drm/i915: Preserve current RPS frequency

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

 



On Thu, Jun 16, 2016 at 12:15:05PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:
> 
> > Select idle frequency during initialisation, then reset the last known
> > frequency when re-enabling. This allows us to preserve the user selected
> > frequency across resets.
> >
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c | 34 +++++++++++++++++-----------------
> >  1 file changed, 17 insertions(+), 17 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index 658a75659657..98f0afa08332 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -5092,6 +5092,7 @@ static void gen6_init_rps_frequencies(struct drm_i915_private *dev_priv)
> >  	}
> >  
> >  	dev_priv->rps.idle_freq = dev_priv->rps.min_freq;
> > +	dev_priv->rps.cur_freq = dev_priv->rps.idle_freq;
> >  
> >  	/* Preserve min/max settings in case of re-init */
> >  	if (dev_priv->rps.max_freq_softlimit == 0)
> > @@ -5108,6 +5109,15 @@ static void gen6_init_rps_frequencies(struct drm_i915_private *dev_priv)
> >  	}
> >  }
> >  
> > +static void reset_rps(struct drm_i915_private *dev_priv,
> > +		      void (*set)(struct drm_i915_private *, u8))
> > +{
> > +	u8 freq = dev_priv->rps.cur_freq; /* force a reset */
> > +	dev_priv->rps.power = -1;
> 
> I didn't find a spot where rps.power == -1 would cause
> a reset.
> 
> For me it seems that gen6_init_rps_frequencies only handles
> the enums thus with -1 we never will update the rps.power.

Which enum has the value of -1?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux