All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/i915/gen9: Write dc state debugmask bits only once
Date: Thu, 18 Feb 2016 17:46:01 +0200	[thread overview]
Message-ID: <1455810361.7638.12.camel@intel.com> (raw)
In-Reply-To: <1455808874-22089-5-git-send-email-mika.kuoppala@intel.com>

On to, 2016-02-18 at 17:21 +0200, Mika Kuoppala wrote:
> DMC debugmask bits should stick so no need to write them
> everytime dc state is changed.
> 
> v2: Write after firmware has been successfully loaded (Ville)
> 
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>

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

> ---
>  drivers/gpu/drm/i915/intel_csr.c        | 8 +++++---
>  drivers/gpu/drm/i915/intel_drv.h        | 2 +-
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 7 ++-----
>  3 files changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_csr.c
> b/drivers/gpu/drm/i915/intel_csr.c
> index b453fccfa25d..902054efb902 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -220,19 +220,19 @@ static const struct stepping_info
> *intel_get_stepping_info(struct drm_device *de
>   * Everytime display comes back from low power state this function
> is called to
>   * copy the firmware from internal memory to registers.
>   */
> -void intel_csr_load_program(struct drm_i915_private *dev_priv)
> +bool intel_csr_load_program(struct drm_i915_private *dev_priv)
>  {
>  	u32 *payload = dev_priv->csr.dmc_payload;
>  	uint32_t i, fw_size;
>  
>  	if (!IS_GEN9(dev_priv)) {
>  		DRM_ERROR("No CSR support available for this
> platform\n");
> -		return;
> +		return false;
>  	}
>  
>  	if (!dev_priv->csr.dmc_payload) {
>  		DRM_ERROR("Tried to program CSR with empty
> payload\n");
> -		return;
> +		return false;
>  	}
>  
>  	fw_size = dev_priv->csr.dmc_fw_size;
> @@ -245,6 +245,8 @@ void intel_csr_load_program(struct
> drm_i915_private *dev_priv)
>  	}
>  
>  	dev_priv->csr.dc_state = 0;
> +
> +	return true;
>  }
>  
>  static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv,
> diff --git a/drivers/gpu/drm/i915/intel_drv.h
> b/drivers/gpu/drm/i915/intel_drv.h
> index 285b0570be9c..c208ca630e99 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1225,7 +1225,7 @@ u32 skl_plane_ctl_rotation(unsigned int
> rotation);
>  
>  /* intel_csr.c */
>  void intel_csr_ucode_init(struct drm_i915_private *);
> -void intel_csr_load_program(struct drm_i915_private *);
> +bool intel_csr_load_program(struct drm_i915_private *);
>  void intel_csr_ucode_fini(struct drm_i915_private *);
>  
>  /* intel_dp.c */
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 1b490c7e4020..7f0577ca900e 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -526,9 +526,6 @@ static void gen9_set_dc_state(struct
> drm_i915_private *dev_priv, uint32_t state)
>  	else if (i915.enable_dc == 1 && state >
> DC_STATE_EN_UPTO_DC5)
>  		state = DC_STATE_EN_UPTO_DC5;
>  
> -	if (state & DC_STATE_EN_UPTO_DC5_DC6_MASK)
> -		gen9_set_dc_state_debugmask(dev_priv);
> -
>  	val = I915_READ(DC_STATE_EN);
>  	DRM_DEBUG_KMS("Setting DC state from %02x to %02x\n",
>  		      val & mask, state);
> @@ -2119,8 +2116,8 @@ static void skl_display_core_init(struct
> drm_i915_private *dev_priv,
>  
>  	skl_init_cdclk(dev_priv);
>  
> -	if (dev_priv->csr.dmc_payload)
> -		intel_csr_load_program(dev_priv);
> +	if (dev_priv->csr.dmc_payload &&
> intel_csr_load_program(dev_priv))
> +		gen9_set_dc_state_debugmask(dev_priv);
>  }
>  
>  static void skl_display_core_uninit(struct drm_i915_private
> *dev_priv)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-02-18 15:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 15:21 [PATCH 0/4] gen9 dmc state harderning Mika Kuoppala
2016-02-18 15:21 ` [PATCH 1/4] drm/i915/gen9: Check for DC state mismatch Mika Kuoppala
2016-02-18 15:21 ` [PATCH 2/4] drm/i915/gen9: Verify and enforce dc6 state writes Mika Kuoppala
2016-02-18 15:42   ` Imre Deak
2016-02-18 15:52     ` Mika Kuoppala
2016-02-18 15:58   ` Mika Kuoppala
2016-02-18 15:21 ` [PATCH 3/4] drm/i915/gen9: Extend dmc debug mask to include cores Mika Kuoppala
2016-02-18 15:34   ` Imre Deak
2016-02-18 23:43     ` Runyan, Arthur J
2016-02-19 10:26   ` Mika Kuoppala
2016-02-19 10:34     ` Imre Deak
2016-02-18 15:21 ` [PATCH 4/4] drm/i915/gen9: Write dc state debugmask bits only once Mika Kuoppala
2016-02-18 15:46   ` Imre Deak [this message]
2016-02-19 11:35 ` ✗ Fi.CI.BAT: failure for gen9 dmc state harderning (rev3) Patchwork
2016-02-22 15:13   ` Imre Deak
2016-02-22 15:26     ` Imre Deak
2016-02-19 13:29 ` ✗ Fi.CI.BAT: failure for gen9 dmc state harderning (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=1455810361.7638.12.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.