Revert "drm/i915: unconditionally use mt forcewake on hsw/ivb"
Subsystems (2)
PATCH 1/1 Revert "drm/i915: unconditionally use mt forcewake on hsw/ivb"
This reverts commit 36ec8f877481449bdfa072e6adf2060869e2b970.
The commit results in repeated 'Timed out waiting for forcewake old ack to clear' messages on a Supermicro C7H61 board (BIOS version 2.00 and 2.00b) with i7-3770K CPU. It ultimately results in a hangup if the system is highly loaded. Reverting the commit fixes the issue.
While I understand that this should be fixed in the BIOS, a more recent BIOS is not available fron the vendor. If/since no better solution is not available, reverting the patch seems to be the way to go (otherwise me and others with the same problem won't be able to run the upstream kernel on affected boards).
--- drivers/gpu/drm/i915/intel_pm.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +27 -4
@@ -4510,12 +4510,35 @@ void intel_gt_init(struct drm_device *dev)if (IS_VALLEYVIEW (dev)) { dev_priv->gt.force_wake_get = vlv_force_wake_get; dev_priv->gt.force_wake_put = vlv_force_wake_put; - }else if (IS_IVYBRIDGE (dev) ||IS_HASWELL (dev)) { - dev_priv->gt.force_wake_get = __gen6_gt_force_wake_mt_get; - dev_priv->gt.force_wake_put = __gen6_gt_force_wake_mt_put; - }else if (IS_GEN6 (dev)) { + }else if (INTEL_INFO (dev)->gen >=6 ) { dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get; dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put; + +/* IVB configs may use multi-threaded forcewake */ +if (IS_IVYBRIDGE (dev) ||IS_HASWELL (dev)) { +u32 ecobus; + +/* A small trick here - if the bios hasn't configured +* MT forcewake, and if the device is in RC6, then +* force_wake_mt_get will not wake the device and the +* ECOBUS read will return zero. Which will be +* (correctly) interpreted by the test below as MT +* forcewake being disabled. +*/ +mutex_lock (&dev->struct_mutex); +__gen6_gt_force_wake_mt_get (dev_priv); + ecobus =I915_READ_NOTRACE (ECOBUS ); +__gen6_gt_force_wake_mt_put (dev_priv); +mutex_unlock (&dev->struct_mutex); + +if (ecobus &FORCEWAKE_MT_ENABLE ) { +DRM_DEBUG_KMS ("Using MT version of forcewake\n" ); + dev_priv->gt.force_wake_get = + __gen6_gt_force_wake_mt_get; + dev_priv->gt.force_wake_put = + __gen6_gt_force_wake_mt_put; + } + } }INIT_DELAYED_WORK (&dev_priv->rps.delayed_resume_work, intel_gen6_powersave_work);
Signature · 1 line
1.7.9.7
Quoted 12 lines · Guenter Roeck
This reverts commit
36ec8f877481449bdfa072e6adf2060869e2b970.The commit results in repeated 'Timed out waiting for forcewake old ack to clear' messages on a Supermicro C7H61 board (BIOS version 2.00 and 2.00b) with i7-3770K CPU. It ultimately results in a hangup if the system is highly loaded. Reverting the commit fixes the issue.
While I understand that this should be fixed in the BIOS, a more recent BIOS is not available fron the vendor. If/since no better solution is not available, reverting the patch seems to be the way to go (otherwise me and others with the same problem won't be able to run the upstream kernel on affected boards).
Quoted 4 lines
Cc Jesse Barnes <[email protected]>Cc Daniel Vetter <[email protected]>Cc Mika Kuoppala <[email protected]>Signed-off-by Guenter Roeck <[email protected]>
Can you please add the bugzilla link here?
Quoted 9 lines
--- drivers/gpu/drm/i915/intel_pm.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c void intel_gt_init(struct drm_device *dev) · line 4515
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +0
-3@@ -4510,12 +4510,35 @@ void intel_gt_init(struct drm_device *dev)if (IS_VALLEYVIEW (dev)) { dev_priv->gt.force_wake_get = vlv_force_wake_get; dev_priv->gt.force_wake_put = vlv_force_wake_put; - }else if (IS_IVYBRIDGE (dev) ||IS_HASWELL (dev)) { - dev_priv->gt.force_wake_get = __gen6_gt_force_wake_mt_get; - dev_priv->gt.force_wake_put = __gen6_gt_force_wake_mt_put;
Please keep the unconditional use of mt forcewake for haswell, afaik we don't have any reports that there are still broken BIOS out there.
Quoted 19 lines
drivers/gpu/drm/i915/intel_pm.c +16
-1- }else if (IS_GEN6 (dev)) { + }else if (INTEL_INFO (dev)->gen >=6 ) { dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get; dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put; + +/* IVB configs may use multi-threaded forcewake */ +if (IS_IVYBRIDGE (dev) ||IS_HASWELL (dev)) { +u32 ecobus; + +/* A small trick here - if the bios hasn't configured +* MT forcewake, and if the device is in RC6, then +* force_wake_mt_get will not wake the device and the +* ECOBUS read will return zero. Which will be +* (correctly) interpreted by the test below as MT +* forcewake being disabled. +*/ +mutex_lock (&dev->struct_mutex); +__gen6_gt_force_wake_mt_get (dev_priv); + ecobus =I915_READ_NOTRACE (ECOBUS );
drivers/gpu/drm/i915/intel_pm.c void intel_gt_init(struct drm_device *dev) · line 4540
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +10
-0+__gen6_gt_force_wake_mt_put (dev_priv); +mutex_unlock (&dev->struct_mutex); + +if (ecobus &FORCEWAKE_MT_ENABLE ) { +DRM_DEBUG_KMS ("Using MT version of forcewake\n" ); + dev_priv->gt.force_wake_get = + __gen6_gt_force_wake_mt_get; + dev_priv->gt.force_wake_put = + __gen6_gt_force_wake_mt_put; + }
This needs a DRM_INFO warning if MT forcewake is not available telling the user telling the user that this might result in hangs with recent DDX version, e.g.: "No MT forcewake available on Ivybridge, this can result in issues when using vblank-synced partial screen updates."
Thanks, Daniel
Quoted 7 lines
drivers/gpu/drm/i915/intel_pm.c +1
-0+ } }INIT_DELAYED_WORK (&dev_priv->rps.delayed_resume_work, intel_gen6_powersave_work);Signature · 1 line
1.7.9.7
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 13 lines · Daniel Vetter
Quoted 12 lines · Guenter Roeck
This reverts commit
36ec8f877481449bdfa072e6adf2060869e2b970.The commit results in repeated 'Timed out waiting for forcewake old ack to clear' messages on a Supermicro C7H61 board (BIOS version 2.00 and 2.00b) with i7-3770K CPU. It ultimately results in a hangup if the system is highly loaded. Reverting the commit fixes the issue.
While I understand that this should be fixed in the BIOS, a more recent BIOS is not available fron the vendor. If/since no better solution is not available, reverting the patch seems to be the way to go (otherwise me and others with the same problem won't be able to run the upstream kernel on affected boards).
Quoted 7 lines
Quoted 4 lines
Cc Jesse Barnes <[email protected]>Cc Daniel Vetter <[email protected]>Cc Mika Kuoppala <[email protected]>Signed-off-by Guenter Roeck <[email protected]>Can you please add the bugzilla link here?
I'll create one and add a reference.
Thanks,
Guenter