All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Organize HSW and BDW Forcewake MT Ack.
Date: Fri, 26 Sep 2014 21:12:54 +0300	[thread overview]
Message-ID: <20140926181254.GE32511@intel.com> (raw)
In-Reply-To: <1411751726-8681-1-git-send-email-rodrigo.vivi@intel.com>

On Fri, Sep 26, 2014 at 01:15:26PM -0400, Rodrigo Vivi wrote:
> 0x130040 is actually a LCPLL_CTL and never was a Forcewake MT Ack.
> The fixed value was introduced but the wrong one was never removed.
> So let's clean the code and definitions a bit.

NAK. 0x130040 is the forcewake MT ack on IVB.

> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_reg.h     |  3 +--
>  drivers/gpu/drm/i915/intel_uncore.c | 13 ++++---------
>  2 files changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 15c0eaa..edd5485 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -5512,7 +5512,7 @@ enum punit_power_well {
>  #define  FORCEWAKE_ACK_VLV			0x1300b4
>  #define  FORCEWAKE_MEDIA_VLV			0x1300b8
>  #define  FORCEWAKE_ACK_MEDIA_VLV		0x1300bc
> -#define  FORCEWAKE_ACK_HSW			0x130044
> +#define  FORCEWAKE_MT_ACK			0x130044
>  #define  FORCEWAKE_ACK				0x130090
>  #define  VLV_GTLC_WAKE_CTRL			0x130090
>  #define   VLV_GTLC_RENDER_CTX_EXISTS		(1 << 25)
> @@ -5527,7 +5527,6 @@ enum punit_power_well {
>  #define  FORCEWAKE_MT				0xa188 /* multi-threaded */
>  #define   FORCEWAKE_KERNEL			0x1
>  #define   FORCEWAKE_USER			0x2
> -#define  FORCEWAKE_MT_ACK			0x130040
>  #define  ECOBUS					0xa180
>  #define    FORCEWAKE_MT_ENABLE			(1<<5)
>  #define  VLV_SPAREG2H				0xA194
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 918b761..a38c670 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -99,14 +99,8 @@ static void __gen7_gt_force_wake_mt_reset(struct drm_i915_private *dev_priv)
>  static void __gen7_gt_force_wake_mt_get(struct drm_i915_private *dev_priv,
>  							int fw_engine)
>  {
> -	u32 forcewake_ack;
> -
> -	if (IS_HASWELL(dev_priv->dev) || IS_BROADWELL(dev_priv->dev))
> -		forcewake_ack = FORCEWAKE_ACK_HSW;
> -	else
> -		forcewake_ack = FORCEWAKE_MT_ACK;
> -
> -	if (wait_for_atomic((__raw_i915_read32(dev_priv, forcewake_ack) & FORCEWAKE_KERNEL) == 0,
> +	if (wait_for_atomic((__raw_i915_read32(dev_priv, FORCEWAKE_MT_ACK)
> +			     & FORCEWAKE_KERNEL) == 0,
>  			    FORCEWAKE_ACK_TIMEOUT_MS))
>  		DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n");
>  
> @@ -115,7 +109,8 @@ static void __gen7_gt_force_wake_mt_get(struct drm_i915_private *dev_priv,
>  	/* something from same cacheline, but !FORCEWAKE_MT */
>  	__raw_posting_read(dev_priv, ECOBUS);
>  
> -	if (wait_for_atomic((__raw_i915_read32(dev_priv, forcewake_ack) & FORCEWAKE_KERNEL),
> +	if (wait_for_atomic((__raw_i915_read32(dev_priv, FORCEWAKE_MT_ACK)
> +			     & FORCEWAKE_KERNEL),
>  			    FORCEWAKE_ACK_TIMEOUT_MS))
>  		DRM_ERROR("Timed out waiting for forcewake to ack request.\n");
>  
> -- 
> 1.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-09-26 18:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 17:15 [PATCH] drm/i915: Organize HSW and BDW Forcewake MT Ack Rodrigo Vivi
2014-09-26 18:12 ` Ville Syrjälä [this message]
2014-09-26 18:27   ` Rodrigo Vivi

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=20140926181254.GE32511@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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.