[Intel-gfx] [PATCH 2/4] drm/i915: Add gt_act_freq_mhz sysfs file

O'Rourke, Tom Tom.O'Rourke at intel.com
Mon Jan 26 12:22:07 PST 2015


On Sun, Jan 25, 2015 at 09:34:33AM +0000, Chris Wilson wrote:
> On Fri, Jan 23, 2015 at 09:04:24PM +0200, ville.syrjala at linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > Currently the 'gt_cur_freq_mhz' file shows the actual GPU frequency on
> > VLV/CHV, and the last requested frequency on other platforms. Change the
> > meaning of the file on VLV/CHV to follow the the other platforms, and
> > introduce a new file 'gt_act_freq_mhz' which shows the actual frequency
> > on all platforms.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> >  drivers/gpu/drm/i915/i915_sysfs.c | 35 ++++++++++++++++++++++++++++++++++-
> >  1 file changed, 34 insertions(+), 1 deletion(-)
> > 
> > +static ssize_t gt_cur_freq_mhz_show(struct device *kdev,
> > +				    struct device_attribute *attr, char *buf)
> > +{
> > +	struct drm_minor *minor = dev_to_drm_minor(kdev);
> > +	struct drm_device *dev = minor->dev;
> > +	struct drm_i915_private *dev_priv = dev->dev_private;
> > +	int ret;
> > +
> > +	flush_delayed_work(&dev_priv->rps.delayed_resume_work);
> 
> Is this required for querying the current value?
> 
> Though probably better to keep it similar to the others.
> -Chris

[TOR:] flush_delayed_work is needed to make sure rps.cur_freq
is valid for non VLV/CHV platforms.

Tom O'Rourke

> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list