[Intel-gfx] [PATCH 1/3] drm/i915: Wait for render state init

Mika Kuoppala mika.kuoppala at linux.intel.com
Mon Mar 16 06:46:34 PDT 2015


We are freeing the batch that is just pushed to ring.
Further, other ring inits should assume that the render
context with the workarounds are pushed before their rings
execute anything.

This fixes (or papers over) a problem where with full ppgtt
the blitter ring init sometimes fails, where the blt ring
ACTHD runs wild through the address space until eventually
hangcheck kills it.

With dynamic page table series this problem became more
easily reproduced by just normal boot failing to init blt ring,
instead of torturing init with gem_reset_stats.

Testcase: igt/gem_reset_stats --r ban-blt
Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
---
 drivers/gpu/drm/i915/i915_gem_render_state.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_render_state.c b/drivers/gpu/drm/i915/i915_gem_render_state.c
index 521548a..9484c64 100644
--- a/drivers/gpu/drm/i915/i915_gem_render_state.c
+++ b/drivers/gpu/drm/i915/i915_gem_render_state.c
@@ -175,6 +175,10 @@ int i915_gem_render_state_init(struct intel_engine_cs *ring)
 
 	ret = __i915_add_request(ring, NULL, so.obj);
 	/* __i915_add_request moves object to inactive if it fails */
+	if (ret)
+		goto out;
+
+	ret = intel_ring_idle(ring);
 out:
 	i915_gem_render_state_fini(&so);
 	return ret;
-- 
1.9.1



More information about the Intel-gfx mailing list