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 v2 1/1] drm/i915: Hold RPM reference while setting freq limits through sysfs
Date: Mon, 8 Feb 2016 19:20:11 +0200 [thread overview]
Message-ID: <20160208172011.GE23290@intel.com> (raw)
In-Reply-To: <1454951831-11778-1-git-send-email-sagar.a.kamble@intel.com>
On Mon, Feb 08, 2016 at 10:47:11PM +0530, Sagar Arun Kamble wrote:
> This changes ensures device is active when frequency limits are changed.
> This is needed as we are writing to register RPNSWREQ in intel_set_rps.
> If not done, might lead to undesired errors like:
> [ 1965.189137] [drm:fw_domains_get] *ERROR* blitter: timed out waiting for forcewake ack to clear.
>
> v2: Added elaborate commit message. (Jani)
> Fixing RPM reference drop in early exit paths. (Ville)
>
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_sysfs.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index c6188dd..2d576b7 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);
> @@ -378,6 +380,7 @@ static ssize_t gt_max_freq_mhz_store(struct device *kdev,
> val > dev_priv->rps.max_freq ||
> val < dev_priv->rps.min_freq_softlimit) {
> mutex_unlock(&dev_priv->rps.hw_lock);
> + intel_runtime_pm_put(dev_priv);
> return -EINVAL;
> }
>
> @@ -398,6 +401,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);
> +
> return count;
> }
>
> @@ -433,6 +438,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);
> @@ -441,6 +448,7 @@ static ssize_t gt_min_freq_mhz_store(struct device *kdev,
> val > dev_priv->rps.max_freq ||
> val > dev_priv->rps.max_freq_softlimit) {
> mutex_unlock(&dev_priv->rps.hw_lock);
> + intel_runtime_pm_put(dev_priv);
> return -EINVAL;
> }
>
> @@ -457,6 +465,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
> https://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
next prev parent reply other threads:[~2016-02-08 17:20 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 ` [PATCH v1 1/1] " Ville Syrjälä
2016-02-08 17:17 ` [PATCH v2 " Sagar Arun Kamble
2016-02-08 17:20 ` Ville Syrjälä [this message]
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=20160208172011.GE23290@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).