intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: intel-gfx@lists.freedesktop.org, shashidhar.hiremath@intel.com
Subject: Re: [PATCH v1 1/1] drm/i915: Hold RPM reference while setting freq limits through sysfs
Date: Mon, 8 Feb 2016 17:24:06 +0200	[thread overview]
Message-ID: <20160208152406.GB23290@intel.com> (raw)
In-Reply-To: <1454698501-2188-1-git-send-email-sagar.a.kamble@intel.com>

On Sat, Feb 06, 2016 at 12:25:01AM +0530, Sagar Arun Kamble wrote:
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_sysfs.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index c6188dd..bb2fd78 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -370,6 +370,8 @@ static ssize_t gt_max_freq_mhz_store(struct device *kdev,
>  
>  	flush_delayed_work(&dev_priv->rps.delayed_resume_work);
>  
> +	intel_runtime_pm_get(dev_priv);
> +
>  	mutex_lock(&dev_priv->rps.hw_lock);
>  
>  	val = intel_freq_opcode(dev_priv, val);
> @@ -398,6 +400,8 @@ static ssize_t gt_max_freq_mhz_store(struct device *kdev,
>  
>  	mutex_unlock(&dev_priv->rps.hw_lock);
>  
> +	intel_runtime_pm_put(dev_priv);
> +

There's a return statement somewhere within the function too. You need to drop
the rpm ref there as well.

>  	return count;
>  }
>  
> @@ -433,6 +437,8 @@ static ssize_t gt_min_freq_mhz_store(struct device *kdev,
>  
>  	flush_delayed_work(&dev_priv->rps.delayed_resume_work);
>  
> +	intel_runtime_pm_get(dev_priv);
> +
>  	mutex_lock(&dev_priv->rps.hw_lock);
>  
>  	val = intel_freq_opcode(dev_priv, val);
> @@ -457,6 +463,8 @@ static ssize_t gt_min_freq_mhz_store(struct device *kdev,
>  
>  	mutex_unlock(&dev_priv->rps.hw_lock);
>  
> +	intel_runtime_pm_put(dev_priv);
> +
>  	return count;
>  
>  }
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-02-08 15:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 18:55 [PATCH v1 1/1] drm/i915: Hold RPM reference while setting freq limits through sysfs Sagar Arun Kamble
2016-02-08  9:25 ` Jani Nikula
2016-02-08 12:58 ` ✓ Fi.CI.BAT: success for series starting with [v1,1/1] " Patchwork
2016-02-08 15:24 ` Ville Syrjälä [this message]
2016-02-08 17:17   ` [PATCH v2 1/1] " Sagar Arun Kamble
2016-02-08 17:20     ` Ville Syrjälä
2016-03-02 17:03       ` Ville Syrjälä
2016-02-08 17:44 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/1] drm/i915: Hold RPM reference while setting freq limits through sysfs (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160208152406.GB23290@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sagar.a.kamble@intel.com \
    --cc=shashidhar.hiremath@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).