Re: [PATCH 2/4] drm/i915: Add gt_act_freq_mhz sysfs file

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

 



On Mon, Jan 26, 2015 at 08:42:56PM +0000, Chris Wilson wrote:
> On Mon, Jan 26, 2015 at 12:22:07PM -0800, O'Rourke, Tom wrote:
> > 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@xxxxxxxxxxxxxxx wrote:
> > > > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > > > 
> > > > 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@xxxxxxxxxxxxxxx>
> > > Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > > 
> > > >  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.
> 
> It is reporting the actual hw frequency. I still fail to see how
> flushing the pending work is important for reporting that instantaneous
> value.

Yeah, I suppose it's not really needed for act_freq, but I don't see any
real harm in having it there.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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