drm/i915: Use FORCEWAKE_KERNEL instead of hardcoded number in MT forcewake ACK
Subsystems (2)
PATCH 1/3 drm/i915: Use FORCEWAKE_KERNEL instead of hardcoded number in MT forcewake ACK
From: Ville Syrjälä <[email protected]>
The MT forcewake ACK register also has a corresponding bit to each of the bits in the MT forcewake register. Use the define we have for the bit we care about instead of a hardcoded number.
--- drivers/gpu/drm/i915/intel_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -4
@@ -4308,7 +4308,7 @@ static void __gen6_gt_force_wake_mt_get(struct drm_i915_private *dev_priv)else forcewake_ack =FORCEWAKE_MT_ACK ; -if (wait_for_atomic ((I915_READ_NOTRACE (forcewake_ack) &1 ) ==0 , +if (wait_for_atomic ((I915_READ_NOTRACE (forcewake_ack) &FORCEWAKE_KERNEL ) ==0 ,FORCEWAKE_ACK_TIMEOUT_MS ))DRM_ERROR ("Timed out waiting for forcewake old ack to clear.\n" );
@@ -4316,7 +4316,7 @@ static void __gen6_gt_force_wake_mt_get(struct drm_i915_private *dev_priv)/* something from same cacheline, but !FORCEWAKE_MT */ POSTING_READ (ECOBUS ); -if (wait_for_atomic ((I915_READ_NOTRACE (forcewake_ack) &1 ), +if (wait_for_atomic ((I915_READ_NOTRACE (forcewake_ack) &FORCEWAKE_KERNEL ),FORCEWAKE_ACK_TIMEOUT_MS ))DRM_ERROR ("Timed out waiting for forcewake to ack request.\n" );
@@ -4406,13 +4406,13 @@ static void vlv_force_wake_reset(struct drm_i915_private *dev_priv)static void vlv_force_wake_get (struct drm_i915_private *dev_priv) { -if (wait_for_atomic ((I915_READ_NOTRACE (FORCEWAKE_ACK_VLV ) &1 ) ==0 , +if (wait_for_atomic ((I915_READ_NOTRACE (FORCEWAKE_ACK_VLV ) &FORCEWAKE_KERNEL ) ==0 ,FORCEWAKE_ACK_TIMEOUT_MS ))DRM_ERROR ("Timed out waiting for forcewake old ack to clear.\n" );I915_WRITE_NOTRACE (FORCEWAKE_VLV ,_MASKED_BIT_ENABLE (FORCEWAKE_KERNEL )); -if (wait_for_atomic ((I915_READ_NOTRACE (FORCEWAKE_ACK_VLV ) &1 ), +if (wait_for_atomic ((I915_READ_NOTRACE (FORCEWAKE_ACK_VLV ) &FORCEWAKE_KERNEL ),FORCEWAKE_ACK_TIMEOUT_MS ))DRM_ERROR ("Timed out waiting for forcewake to ack request.\n" );
Signature · 6 lines
1.7.12.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915: Use '1' instead of FORCEWAKE_KERNEL for ST force wake
From: Ville Syrjälä <[email protected]>
Use the number '1' instead of FORCEWAKE_KERNEL when requesting single thread force wake since there is only one bit in the register. Using the FORCEWAKE_KERNEL name might give someone the wrong impression.
--- drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -4282,7 +4282,7 @@ static void __gen6_gt_force_wake_get(struct drm_i915_private *dev_priv) FORCEWAKE_ACK_TIMEOUT_MS)) DRM_ERROR("Timed out waiting for forcewake old ack to clear.\n"); -I915_WRITE_NOTRACE (FORCEWAKE ,FORCEWAKE_KERNEL ); +I915_WRITE_NOTRACE (FORCEWAKE ,1 );POSTING_READ (ECOBUS );/* something from same cacheline, but !FORCEWAKE */ if (wait_for_atomic((I915_READ_NOTRACE(forcewake_ack) & 1),
Signature · 6 lines
1.7.12.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915: Use '1' instead of FORCEWAKE_KERNEL for ST force wake
Quoted 7 lines · On Fri, Mar 01, 2013 at 02:35:38PM +0200, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Use the number '1' instead of
FORCEWAKE_KERNELwhen requesting single thread force wake since there is only one bit in the register. Using theFORCEWAKE_KERNELname might give someone the wrong impression.Signed-off-by Ville Syrjälä <[email protected]>
All 3 Reviewed-by: Chris Wilson <[email protected]> -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 2/3] drm/i915: Use '1' instead of FORCEWAKE_KERNEL for ST force wake
Quoted 10 lines · Chris Wilson
Quoted 7 lines · On Fri, Mar 01, 2013 at 02:35:38PM +0200, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Use the number '1' instead of
FORCEWAKE_KERNELwhen requesting single thread force wake since there is only one bit in the register. Using theFORCEWAKE_KERNELname might give someone the wrong impression.Signed-off-by Ville Syrjälä <[email protected]>All 3 Reviewed-by: Chris Wilson <[email protected]>
Entire series merged, thanks.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 3/3 drm/i915: Single thread force wake isn't used on HSW anymore
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Kill the HSW check from the single thread force wake code. HSW uses MT force wake exclusively these days.
The commit that removed HSW single thread forcewake support:
commit 36ec8f877481449bdfa072e6adf2060869e2b970
Author: Daniel Vetter <[email protected]>
Date: Thu Oct 18 14:44:35 2012 +0200
drm/i915: unconditionally use mt forcewake on hsw/ivb
--- drivers/gpu/drm/i915/intel_pm.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +2 -9
@@ -4271,21 +4271,14 @@ static void __gen6_gt_force_wake_reset(struct drm_i915_private *dev_priv)static void __gen6_gt_force_wake_get (struct drm_i915_private *dev_priv) { -u32 forcewake_ack; - -if (IS_HASWELL (dev_priv->dev)) - forcewake_ack =FORCEWAKE_ACK_HSW ; -else - forcewake_ack =FORCEWAKE_ACK ; - -if (wait_for_atomic ((I915_READ_NOTRACE (forcewake_ack) &1 ) ==0 , +if (wait_for_atomic ((I915_READ_NOTRACE (FORCEWAKE_ACK ) &1 ) ==0 ,FORCEWAKE_ACK_TIMEOUT_MS ))DRM_ERROR ("Timed out waiting for forcewake old ack to clear.\n" );I915_WRITE_NOTRACE (FORCEWAKE ,1 );POSTING_READ (ECOBUS );/* something from same cacheline, but !FORCEWAKE */ -if (wait_for_atomic ((I915_READ_NOTRACE (forcewake_ack) &1 ), +if (wait_for_atomic ((I915_READ_NOTRACE (FORCEWAKE_ACK ) &1 ),FORCEWAKE_ACK_TIMEOUT_MS ))DRM_ERROR ("Timed out waiting for forcewake to ack request.\n" );
Signature · 6 lines
1.7.12.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx