diff mbox

[TRIVIAL] drm/i915: Fix HSW debugfs frequency print

Message ID 1391026854-32150-1-git-send-email-benjamin.widawsky@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky Jan. 29, 2014, 8:20 p.m. UTC
We need to do the print after we've done the math.

This was broken when we introduced VLV support. Personally, I think the
interface should go away now that we support it in sysfs. Historically
it has allowed users to do stupid things which we might not allow in the
sysfs interface - so we can keep it I guess.

commit 0a073b843bcd9a660f76e497182aac97cafddc4c
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Apr 17 15:54:58 2013 -0700

    drm/i915: turbo & RC6 support for VLV v7

Reported-by: Rao, Ram R <ram.r.rao@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ben Widawsky Jan. 29, 2014, 8:22 p.m. UTC | #1
Blargh.... this isn't specific to HSW. Title should be s/HSW/gen6|gen7/

On Wed, Jan 29, 2014 at 12:20:54PM -0800, Ben Widawsky wrote:
> We need to do the print after we've done the math.
> 
> This was broken when we introduced VLV support. Personally, I think the
> interface should go away now that we support it in sysfs. Historically
> it has allowed users to do stupid things which we might not allow in the
> sysfs interface - so we can keep it I guess.
> 
> commit 0a073b843bcd9a660f76e497182aac97cafddc4c
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date:   Wed Apr 17 15:54:58 2013 -0700
> 
>     drm/i915: turbo & RC6 support for VLV v7
> 
> Reported-by: Rao, Ram R <ram.r.rao@intel.com>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index bc8707f..3487b71 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -3230,8 +3230,6 @@ i915_max_freq_set(void *data, u64 val)
>  
>  	flush_delayed_work(&dev_priv->rps.delayed_resume_work);
>  
> -	DRM_DEBUG_DRIVER("Manually setting max freq to %llu\n", val);
> -
>  	ret = mutex_lock_interruptible(&dev_priv->rps.hw_lock);
>  	if (ret)
>  		return ret;
> @@ -3249,6 +3247,8 @@ i915_max_freq_set(void *data, u64 val)
>  		gen6_set_rps(dev, val);
>  	}
>  
> +	DRM_DEBUG_DRIVER("Manually set max freq to %llu\n", val);
> +
>  	mutex_unlock(&dev_priv->rps.hw_lock);
>  
>  	return 0;
> -- 
> 1.8.5.3
>
Daniel Vetter Jan. 29, 2014, 8:45 p.m. UTC | #2
On Wed, Jan 29, 2014 at 12:22:44PM -0800, Ben Widawsky wrote:
> Blargh.... this isn't specific to HSW. Title should be s/HSW/gen6|gen7/

Fixed and merged to dinq.
-Daniel

> 
> On Wed, Jan 29, 2014 at 12:20:54PM -0800, Ben Widawsky wrote:
> > We need to do the print after we've done the math.
> > 
> > This was broken when we introduced VLV support. Personally, I think the
> > interface should go away now that we support it in sysfs. Historically
> > it has allowed users to do stupid things which we might not allow in the
> > sysfs interface - so we can keep it I guess.
> > 
> > commit 0a073b843bcd9a660f76e497182aac97cafddc4c
> > Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Date:   Wed Apr 17 15:54:58 2013 -0700
> > 
> >     drm/i915: turbo & RC6 support for VLV v7
> > 
> > Reported-by: Rao, Ram R <ram.r.rao@intel.com>
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> > ---
> >  drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index bc8707f..3487b71 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -3230,8 +3230,6 @@ i915_max_freq_set(void *data, u64 val)
> >  
> >  	flush_delayed_work(&dev_priv->rps.delayed_resume_work);
> >  
> > -	DRM_DEBUG_DRIVER("Manually setting max freq to %llu\n", val);
> > -
> >  	ret = mutex_lock_interruptible(&dev_priv->rps.hw_lock);
> >  	if (ret)
> >  		return ret;
> > @@ -3249,6 +3247,8 @@ i915_max_freq_set(void *data, u64 val)
> >  		gen6_set_rps(dev, val);
> >  	}
> >  
> > +	DRM_DEBUG_DRIVER("Manually set max freq to %llu\n", val);
> > +
> >  	mutex_unlock(&dev_priv->rps.hw_lock);
> >  
> >  	return 0;
> > -- 
> > 1.8.5.3
> > 
> 
> -- 
> Ben Widawsky, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index bc8707f..3487b71 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3230,8 +3230,6 @@  i915_max_freq_set(void *data, u64 val)
 
 	flush_delayed_work(&dev_priv->rps.delayed_resume_work);
 
-	DRM_DEBUG_DRIVER("Manually setting max freq to %llu\n", val);
-
 	ret = mutex_lock_interruptible(&dev_priv->rps.hw_lock);
 	if (ret)
 		return ret;
@@ -3249,6 +3247,8 @@  i915_max_freq_set(void *data, u64 val)
 		gen6_set_rps(dev, val);
 	}
 
+	DRM_DEBUG_DRIVER("Manually set max freq to %llu\n", val);
+
 	mutex_unlock(&dev_priv->rps.hw_lock);
 
 	return 0;