public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Prevent TLB error on first execution on SNB
@ 2015-02-13 12:59 Chris Wilson
  2015-02-13 13:43 ` Daniel Vetter
  2015-02-13 19:42 ` [PATCH] " shuang.he
  0 siblings, 2 replies; 11+ messages in thread
From: Chris Wilson @ 2015-02-13 12:59 UTC (permalink / raw)
  To: intel-gfx

Long ago I found that I was getting sporadic errors when booting SNB,
with the symptom being that the first batch died with IPEHR != *ACTHD,
typically caused by the TLB being invalid. These magically disappeared
if I held the forcewake during the entire ring initialisation sequence.
(It can probably be shortened to a short critical section, but the whole
initialisation is full of register writes and so we would be taking and
releasing forcewake almost continually, and so holding it over the
entire sequence will probably be a net win!)

Note some of the kernels I encounted the issue already had the deferred
forcewake release, so it is still relevant.

I know that there have been a few other reports with similar failure
conditions on SNB, I think such as
References: https://bugs.freedesktop.org/show_bug.cgi?id=80913

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8d15c8110962..2426f6d9b5a5 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4868,6 +4868,7 @@ int i915_gem_init(struct drm_device *dev)
 		dev_priv->gt.stop_ring = intel_logical_ring_stop;
 	}
 
+	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
 	ret = i915_gem_init_userptr(dev);
 	if (ret)
 		goto out_unlock;
@@ -4894,6 +4895,7 @@ int i915_gem_init(struct drm_device *dev)
 	}
 
 out_unlock:
+	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 	mutex_unlock(&dev->struct_mutex);
 
 	return ret;
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-03-10 13:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 12:59 [PATCH] drm/i915: Prevent TLB error on first execution on SNB Chris Wilson
2015-02-13 13:43 ` Daniel Vetter
2015-02-13 14:12   ` Chris Wilson
2015-02-23 22:54     ` Daniel Vetter
2015-02-13 14:35   ` [PATCH v2] " Chris Wilson
2015-02-14  0:19     ` shuang.he
2015-03-10 10:31     ` Daniel Vetter
2015-03-10 10:35       ` Chris Wilson
2015-03-10 12:55         ` Daniel Vetter
2015-03-10 13:31           ` Jani Nikula
2015-02-13 19:42 ` [PATCH] " shuang.he

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox