public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Animesh Manna <animesh.manna@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 6/8] Implement enable/disable for Display C6 state
Date: Thu, 30 Apr 2015 16:45:00 +0300	[thread overview]
Message-ID: <1430401500.9584.23.camel@intel.com> (raw)
In-Reply-To: <1429174334-12089-7-git-send-email-animesh.manna@intel.com>

On to, 2015-04-16 at 14:22 +0530, Animesh Manna wrote:
> From: "A.Sunil Kamath" <sunil.kamath@intel.com>
> 
> This patch just implements the basic enable and disable
> functions of DC6 state which is needed for SKL platform.
> 
> Its important to load SKL CSR program before calling enable.
> 
> DC6 is a deeper power saving state where hardware dynamically
> disables power well 0 and saves the associated registers.
> DC6 can be entered when software allows it, the conditions
> for DC5 are met, and the PCU allows DC6.
> DC6 cannot be used if the backlight is being driven from the
> display utility pin.
> 
> Its better to configure display engine to have power well 2
> disabled before getting into DC6 enable function. Hence rpm
> framework will ensure to check status of power well 2 and DC5
> before calling skl_enable_dc6.
> 
> v2: Replace HAS_ with IS_ check as per Daniel's review comments
> 
> v3: Cleared the bits dc5/dc6 enable of DC_STATE_EN register
> before setting them as per Satheesh's review comments.
> 
> v4: No need to call gen9_disable_dc5 inside enable sequence of
> DC6, as its already take care above.
> 
> v5: call POSTING_READ for every write to a register to ensure that
> its written immediately.
> Call intel_prepare_ddi during DC6 exit as it's required on low-power exit.
> 
> v6: Protect DC6-enabling-disabling functionality with locks to synchronize
> with CSR-loading code.
> 
> v7: Remove grabbing CSR-related mutex in skl_enable/disable_dc6 functions as
>     deferred DC5-enabling functionality is now removed.
> 
> v8: Remove 'Disabling DC5' from the debug comment during DC6 enabling as when
>     DC6 is allowed, DC5 is not programmed at all.
> 
> v9:
> 1] Rebase to latest.
> 2] Move all DC6-related functions from intel_display.c to intel_runtime_pm.c.
> 
> v10: After adding dmc ver 1.0 support rebased on top of nightly. (Animesh)
> 
> Issue: VIZ-2819
> Signed-off-by: A.Sunil Kamath <sunil.kamath@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 27 +++++++++++++++++++++++++--
>  1 file changed, 25 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 7e6908e..ba49795 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -400,12 +400,35 @@ static void gen9_disable_dc5(struct drm_i915_private *dev_priv)
>  
>  static void skl_enable_dc6(struct drm_i915_private *dev_priv)
>  {
> -	/* TODO: Implementation to be done. */
> +	struct drm_device *dev = dev_priv->dev;
> +	uint32_t val;
> +
> +	WARN_ON(!IS_SKYLAKE(dev));
> +
> +	DRM_DEBUG_KMS("Enabling DC6\n");
> +
> +	gen9_set_dc_state_debugmask_memory_up(dev_priv);
> +
> +	val = I915_READ(DC_STATE_EN);
> +	val &= ~DC_STATE_EN_UPTO_DC5_DC6_MASK;
> +	val |= DC_STATE_EN_UPTO_DC6;
> +	I915_WRITE(DC_STATE_EN, val);
> +	POSTING_READ(DC_STATE_EN);
>  }
>  
>  static void skl_disable_dc6(struct drm_i915_private *dev_priv)
>  {
> -	/* TODO: Implementation to be done. */
> +	struct drm_device *dev = dev_priv->dev;
> +	uint32_t val;
> +
> +	WARN_ON(!IS_SKYLAKE(dev));
> +
> +	DRM_DEBUG_KMS("Disabling DC6\n");
> +
> +	val = I915_READ(DC_STATE_EN);
> +	val &= ~DC_STATE_EN_UPTO_DC6;
> +	I915_WRITE(DC_STATE_EN, val);
> +	POSTING_READ(DC_STATE_EN);
>  }
>  
>  static void skl_set_power_well(struct drm_i915_private *dev_priv,


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-04-30 13:45 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16  8:52 [PATCH v4 0/8] Enable DC states for skl Animesh Manna
2015-04-16  8:52 ` [PATCH v4 1/8] drm/i915/skl: Add support to load SKL CSR firmware Animesh Manna
2015-04-16  9:18   ` Damien Lespiau
2015-04-16  9:21   ` Imre Deak
2015-04-16 11:59     ` Animesh Manna
2015-04-16 11:25       ` Imre Deak
2015-04-16 14:23         ` Animesh Manna
2015-04-16 15:20           ` Imre Deak
2015-04-28 14:45   ` Imre Deak
2015-04-29 17:29     ` [PATCH v5 " Animesh Manna
2015-04-30 13:02       ` Imre Deak
2015-05-04  9:30         ` Daniel Vetter
2015-05-04 10:31           ` Imre Deak
2015-05-04 12:54       ` Daniel Vetter
2015-04-16  8:52 ` [PATCH v4 2/8] drm/i915/skl: Add DC5 Trigger Sequence Animesh Manna
2015-04-16  9:25   ` Imre Deak
2015-04-16  9:48     ` Imre Deak
2015-04-17  5:59       ` Animesh Manna
2015-04-17  7:15         ` Imre Deak
2015-04-17 14:16           ` [PATCH v5 2/2] " Animesh Manna
2015-04-30 13:18             ` Imre Deak
2015-05-04  9:39             ` Daniel Vetter
2015-04-16  8:52 ` [PATCH v4 3/8] drm/i915/skl: Implement enable/disable for Display C5 state Animesh Manna
2015-04-30 13:21   ` Imre Deak
2015-04-16  8:52 ` [PATCH v4 4/8] drm/i915/skl: Assert the requirements to enter or exit DC5 Animesh Manna
2015-04-30 13:26   ` Imre Deak
2015-04-16  8:52 ` [PATCH v4 5/8] drm/i915/skl: Add DC6 Trigger sequence Animesh Manna
2015-04-30 13:41   ` Imre Deak
2015-05-04  9:44   ` Daniel Vetter
2015-05-04 13:05   ` Daniel Vetter
2015-04-16  8:52 ` [PATCH v4 6/8] Implement enable/disable for Display C6 state Animesh Manna
2015-04-30 13:45   ` Imre Deak [this message]
2015-04-16  8:52 ` [PATCH v4 7/8] drm/i915/skl: Assert the requirements to enter or exit DC6 Animesh Manna
2015-04-16  8:52 ` [PATCH v4 8/8] drm/i915/skl: Enable runtime PM Animesh Manna
2015-04-17  1:52   ` shuang.he
2015-04-30 13:47   ` Imre Deak
2015-05-04 13:12 ` [PATCH v4 0/8] Enable DC states for skl Daniel Vetter

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=1430401500.9584.23.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=animesh.manna@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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