public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Arun R Murthy <arun.r.murthy@intel.com>
To: "Ville Syrjälä" <ville.syrjala@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: Intel-gfx Digest, Vol 85, Issue 280
Date: Tue, 03 Mar 2015 13:12:14 +0530	[thread overview]
Message-ID: <54F565D6.8080307@intel.com> (raw)
In-Reply-To: <E1F41119A09A1C4EACAB7A4603D2A6C91907D652@BGSMSX104.gar.corp.intel.com>


> -----------------------------
>
> Message: 2
> Date: Thu, 26 Feb 2015 21:01:04 +0200
> From: ville.syrjala@linux.intel.com
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH v2 12/12] drm/i915: Enable the maxfifo PM5
> 	mode	when appropriate on CHV
> Message-ID:
> 	<1424977264-24764-1-git-send-email-ville.syrjala@linux.intel.com>
> Content-Type: text/plain; charset=UTF-8
>
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> CHV has a new knob in Punit to select between some memory power savings modes PM2 and PM5. We can allow the deeper PM5 when maxfifo mode is enabled, so let's do so in the hopes for moar power savings.
>
> v2: Put the thing into a separate function to avoid churn later
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/i915_reg.h |  3 +++  drivers/gpu/drm/i915/intel_pm.c | 19 ++++++++++++++++++-
>   2 files changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 145f0d4..5a20f58 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -552,6 +552,9 @@
>   #define   DSPFREQSTAT_MASK			(0x3 << DSPFREQSTAT_SHIFT)
>   #define   DSPFREQGUAR_SHIFT			14
>   #define   DSPFREQGUAR_MASK			(0x3 << DSPFREQGUAR_SHIFT)
> +#define   DSP_MAXFIFO_PM5_STATUS		(1 << 22) /* chv */
> +#define   DSP_AUTO_CDCLK_GATE_DISABLE		(1 << 7) /* chv */
> +#define   DSP_MAXFIFO_PM5_ENABLE		(1 << 6) /* chv */
>   #define   _DP_SSC(val, pipe)			((val) << (2 * (pipe)))
>   #define   DP_SSC_MASK(pipe)			_DP_SSC(0x3, (pipe))
>   #define   DP_SSC_PWR_ON(pipe)			_DP_SSC(0x0, (pipe))
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index e6cbc24..f603dac 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -235,13 +235,30 @@ static const struct cxsr_latency *intel_get_cxsr_latency(int is_desktop,
>   	return NULL;
>   }
>   
> +static void chv_set_memory_pm5(struct drm_i915_private *dev_priv, bool
> +enable) {
> +	u32 val;
> +
> +	mutex_lock(&dev_priv->rps.hw_lock);
> +
> +	val = vlv_punit_read(dev_priv, PUNIT_REG_DSPFREQ);
> +	if (enable)
> +		val |= DSP_MAXFIFO_PM5_ENABLE;
> +	else
> +		val &= ~DSP_MAXFIFO_PM5_ENABLE;
> +	vlv_punit_write(dev_priv, PUNIT_REG_DSPFREQ, val);
> +
> +	mutex_unlock(&dev_priv->rps.hw_lock);
> +}
> +
>   void intel_set_memory_cxsr(struct drm_i915_private *dev_priv, bool enable)  {
>   	struct drm_device *dev = dev_priv->dev;
>   	u32 val;
>   
> -	if (IS_VALLEYVIEW(dev)) {
> +	if (IS_CHERRYVIEW(dev)) {
>   		I915_WRITE(FW_BLC_SELF_VLV, enable ? FW_CSPWRDWNEN : 0);
> +		chv_set_memory_pm5(dev_priv, enable);
>   	} else if (IS_G4X(dev) || IS_CRESTLINE(dev)) {
>   		I915_WRITE(FW_BLC_SELF, enable ? FW_BLC_SELF_EN : 0);
>   	} else if (IS_PINEVIEW(dev)) {
> --
> 2.0.5
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>

Thanks and Regards,
Arun R Murthy
-------------------
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

           reply	other threads:[~2015-03-03  7:42 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <E1F41119A09A1C4EACAB7A4603D2A6C91907D652@BGSMSX104.gar.corp.intel.com>]

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=54F565D6.8080307@intel.com \
    --to=arun.r.murthy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@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