[Intel-gfx] [PATCH 2/4] drm/i915: Add gt_act_freq_mhz sysfs file
Chris Wilson
chris at chris-wilson.co.uk
Sun Jan 25 01:34:33 PST 2015
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
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list