aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-07-09 19:00:31 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-04 04:51:10 -0400
commit8cdbac3c4f987bd260009d3a7b8c3c8c37b5acdb (patch)
treeb85b65f2c34b2fb479d11febf86eda338bff0a32
parentc33535efc0e1a637a7dbad918e1a0bf5a692dcdd (diff)
Partially revert "drm/i915: unconditionally use mt forcewake on hsw/ivb"
commit c11e5f35ab490bd30591563816fbc83526521777 upstream. This patch partially reverts commit 36ec8f877481449bdfa072e6adf2060869e2b970 for IvyBridge CPUs. The original 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 for IvyBridge CPUs fixes the issue. Issue a warning if the CPU is IvyBridge and mt forcewake is disabled, since this condition can result in secondary issues. v2: Only revert patch for Ivybridge CPUs Issue info message if mt forcewake is disabled on Ivybridge Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60541 Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66139 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index aa01128ff192..0392c288324b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4510,9 +4510,38 @@ void intel_gt_init(struct drm_device *dev)
4510 if (IS_VALLEYVIEW(dev)) { 4510 if (IS_VALLEYVIEW(dev)) {
4511 dev_priv->gt.force_wake_get = vlv_force_wake_get; 4511 dev_priv->gt.force_wake_get = vlv_force_wake_get;
4512 dev_priv->gt.force_wake_put = vlv_force_wake_put; 4512 dev_priv->gt.force_wake_put = vlv_force_wake_put;
4513 } else if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) { 4513 } else if (IS_HASWELL(dev)) {
4514 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_mt_get; 4514 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_mt_get;
4515 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_mt_put; 4515 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_mt_put;
4516 } else if (IS_IVYBRIDGE(dev)) {
4517 u32 ecobus;
4518
4519 /* IVB configs may use multi-threaded forcewake */
4520
4521 /* A small trick here - if the bios hasn't configured
4522 * MT forcewake, and if the device is in RC6, then
4523 * force_wake_mt_get will not wake the device and the
4524 * ECOBUS read will return zero. Which will be
4525 * (correctly) interpreted by the test below as MT
4526 * forcewake being disabled.
4527 */
4528 mutex_lock(&dev->struct_mutex);
4529 __gen6_gt_force_wake_mt_get(dev_priv);
4530 ecobus = I915_READ_NOTRACE(ECOBUS);
4531 __gen6_gt_force_wake_mt_put(dev_priv);
4532 mutex_unlock(&dev->struct_mutex);
4533
4534 if (ecobus & FORCEWAKE_MT_ENABLE) {
4535 dev_priv->gt.force_wake_get =
4536 __gen6_gt_force_wake_mt_get;
4537 dev_priv->gt.force_wake_put =
4538 __gen6_gt_force_wake_mt_put;
4539 } else {
4540 DRM_INFO("No MT forcewake available on Ivybridge, this can result in issues\n");
4541 DRM_INFO("when using vblank-synced partial screen updates.\n");
4542 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get;
4543 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put;
4544 }
4516 } else if (IS_GEN6(dev)) { 4545 } else if (IS_GEN6(dev)) {
4517 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get; 4546 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get;
4518 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put; 4547 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put;