aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-07-09 19:00:31 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-10 02:03:45 -0400
commitc11e5f35ab490bd30591563816fbc83526521777 (patch)
tree281e86f5b2862bb3d3d459ef7680bd1233843bc4 /drivers/gpu
parentd4eead50eb206b875f54f66cc0f6ec7d54122c28 (diff)
Partially revert "drm/i915: unconditionally use mt forcewake on hsw/ivb"
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> Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66139 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-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 ccbdd83f5220..d10e6735771f 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5500,9 +5500,38 @@ void intel_gt_init(struct drm_device *dev)
5500 if (IS_VALLEYVIEW(dev)) { 5500 if (IS_VALLEYVIEW(dev)) {
5501 dev_priv->gt.force_wake_get = vlv_force_wake_get; 5501 dev_priv->gt.force_wake_get = vlv_force_wake_get;
5502 dev_priv->gt.force_wake_put = vlv_force_wake_put; 5502 dev_priv->gt.force_wake_put = vlv_force_wake_put;
5503 } else if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev)) { 5503 } else if (IS_HASWELL(dev)) {
5504 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_mt_get; 5504 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_mt_get;
5505 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_mt_put; 5505 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_mt_put;
5506 } else if (IS_IVYBRIDGE(dev)) {
5507 u32 ecobus;
5508
5509 /* IVB configs may use multi-threaded forcewake */
5510
5511 /* A small trick here - if the bios hasn't configured
5512 * MT forcewake, and if the device is in RC6, then
5513 * force_wake_mt_get will not wake the device and the
5514 * ECOBUS read will return zero. Which will be
5515 * (correctly) interpreted by the test below as MT
5516 * forcewake being disabled.
5517 */
5518 mutex_lock(&dev->struct_mutex);
5519 __gen6_gt_force_wake_mt_get(dev_priv);
5520 ecobus = I915_READ_NOTRACE(ECOBUS);
5521 __gen6_gt_force_wake_mt_put(dev_priv);
5522 mutex_unlock(&dev->struct_mutex);
5523
5524 if (ecobus & FORCEWAKE_MT_ENABLE) {
5525 dev_priv->gt.force_wake_get =
5526 __gen6_gt_force_wake_mt_get;
5527 dev_priv->gt.force_wake_put =
5528 __gen6_gt_force_wake_mt_put;
5529 } else {
5530 DRM_INFO("No MT forcewake available on Ivybridge, this can result in issues\n");
5531 DRM_INFO("when using vblank-synced partial screen updates.\n");
5532 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get;
5533 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put;
5534 }
5506 } else if (IS_GEN6(dev)) { 5535 } else if (IS_GEN6(dev)) {
5507 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get; 5536 dev_priv->gt.force_wake_get = __gen6_gt_force_wake_get;
5508 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put; 5537 dev_priv->gt.force_wake_put = __gen6_gt_force_wake_put;