Re: [PATCH] drm/i915: Organize HSW and BDW Forcewake MT Ack.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux