public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Reset CSB read pointer when enabling contexts
@ 2015-01-07 16:09 Thomas Daniel
  2015-01-07 16:56 ` Daniel Vetter
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Thomas Daniel @ 2015-01-07 16:09 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

During a suspend/resume cycle the hardware Context Status Buffer write pointer
is reset.  However since recent changes to the init sequence the software CSB
read pointer is no longer reset.  This means that context status events are not
handled correctly and new contexts are not written to the ELSP, resulting in an
apparent GPU hang.

Pending further changes to the ring init code, just move the
ring->next_context_status_buffer initialization into i915_gem_context_enable to
fix this regression.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88097
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Thomas Daniel <thomas.daniel@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_context.c |    1 +
 drivers/gpu/drm/i915/intel_lrc.c        |    1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index bf9778e..cc100c9 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -412,6 +412,7 @@ int i915_gem_context_enable(struct drm_i915_private *dev_priv)
 
 	if (i915.enable_execlists) {
 		for_each_ring(ring, dev_priv, i) {
+			ring->next_context_status_buffer = 0;
 			if (ring->init_context) {
 				ret = ring->init_context(ring,
 						ring->default_context);
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 7670a0f..4580267 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1394,7 +1394,6 @@ static int logical_ring_init(struct drm_device *dev, struct intel_engine_cs *rin
 	INIT_LIST_HEAD(&ring->execlist_queue);
 	INIT_LIST_HEAD(&ring->execlist_retired_req_list);
 	spin_lock_init(&ring->execlist_lock);
-	ring->next_context_status_buffer = 0;
 
 	ret = i915_cmd_parser_init_ring(ring);
 	if (ret)
-- 
1.7.9.5

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

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

end of thread, other threads:[~2015-01-09 16:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 16:09 [PATCH] drm/i915: Reset CSB read pointer when enabling contexts Thomas Daniel
2015-01-07 16:56 ` Daniel Vetter
2015-01-07 20:39 ` shuang.he
2015-01-08  8:01 ` Daniel Vetter
2015-01-09 11:09 ` [PATCH v2] drm/i915: Reset CSB read pointer in ring init Thomas Daniel
2015-01-09 16:31   ` shuang.he
2015-01-09 16:54   ` Dave Gordon

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