drm/i915: Organize HSW and BDW Forcewake MT Ack.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915: Organize HSW and BDW Forcewake MT Ack.
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.
--- drivers/gpu/drm/i915/i915_reg.h | 3 +-- drivers/gpu/drm/i915/intel_uncore.c | 13 ++++--------- 2 files changed, 5 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -2
@@ -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
drivers/gpu/drm/i915/intel_uncore.c +4 -9
@@ -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" );
Signature · 1 line
1.9.3
Quoted 3 lines · Rodrigo Vivi
0x130040is actually aLCPLL_CTLand 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.
Quoted 66 lines
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +-- drivers/gpu/drm/i915/intel_uncore.c | 13 ++++--------- 2 files changed, 5 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/i915_reg.h +1
-2@@ -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 0xA194drivers/gpu/drm/i915/intel_uncore.c +4
-9@@ -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" );Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC
oh true. Please just ignore it...
Quoted 92 lines · Ville Syrjälä
Quoted 3 lines · Rodrigo Vivi
0x130040is actually aLCPLL_CTLand 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.
0x130040is the forcewake MT ack on IVB.Review
Quoted 8 lines
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +-- drivers/gpu/drm/i915/intel_uncore.c | 13 ++++--------- 2 files changed, 5 insertions(+), 11 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hQuoted 13 lines
index 15c0eaa..edd5485 100644
drivers/gpu/drm/i915/i915_reg.h +1
-1@@ -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)drivers/gpu/drm/i915/i915_reg.h enum punit_power_well { · line 5527
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -5527,7 +5527,6 @@ enum punit_power_well {#define FORCEWAKE_MT 0xa188/* multi-threaded */
Review
Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +0
-1#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(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_uncore.cdrivers/gpu/drm/i915/intel_uncore.c static void __gen7_gt_force_wake_mt_reset(struct
Quoted 4 lines
index 918b761..a38c670 100644
drivers/gpu/drm/i915/intel_uncore.c +0
-0@@ -99,14 +99,8 @@ static void __gen7_gt_force_wake_mt_reset(struct
drm_i915_private*dev_priv)drivers/gpu/drm/i915/intel_uncore.c static void __gen7_gt_force_wake_mt_reset(struct · line 99
Quoted 1 line
drivers/gpu/drm/i915/intel_uncore.c +0
-0static void __gen7_gt_force_wake_mt_get(struct drm_i915_private
*dev_priv,drivers/gpu/drm/i915/intel_uncore.c static void __gen7_gt_force_wake_mt_reset(struct drm_i915_private *dev_priv)
Quoted 10 lines
drivers/gpu/drm/i915/intel_uncore.c +0
-8int 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,drivers/gpu/drm/i915/intel_uncore.c static void __gen7_gt_force_wake_mt_reset(struct drm_i915_private *dev_priv)
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c +2
-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 toclear.\n");
drivers/gpu/drm/i915/intel_uncore.c static void __gen7_gt_force_wake_mt_get(struct
Quoted 2 lines
drivers/gpu/drm/i915/intel_uncore.c +0
-0@@ -115,7 +109,8 @@ static void __gen7_gt_force_wake_mt_get(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/intel_uncore.c static void __gen7_gt_force_wake_mt_get(struct drm_i915_private *dev_priv,
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c +0
-1/* 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),drivers/gpu/drm/i915/intel_uncore.c static void __gen7_gt_force_wake_mt_get(struct drm_i915_private *dev_priv,
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c +2
-0+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 ackrequest.\n");
Quoted 8 lines
drivers/gpu/drm/i915/intel_uncore.c +0
-1--1.9.3
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx