All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Perform an invalidate prior to executing golden renderstate
@ 2017-08-08 13:19 Chris Wilson
  2017-08-08 13:36   ` Mika Kuoppala
  2017-08-08 13:46 ` ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 10+ messages in thread
From: Chris Wilson @ 2017-08-08 13:19 UTC (permalink / raw)
  To: intel-gfx; +Cc: Chris Wilson, Mika Kuoppala, stable

As we may have just bound the renderstate into the GGTT for execution, we
need to ensure that the GTT TLB are also flushed.

On snb-gt2, this would cause a random GPU hang at the start of a new
context (e.g. boot) and on snb-gt1, it was causing the renderstate batch
to take ~10s. It was the GPU hang that revealed the truth, as the CS
gleefully executed beyond the end of the golden renderstate batch, a good
indicator for a GTT TLB miss.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: stable@vger.kernel.org
---
 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 241d827b85fb..3703dc91eeda 100644
--- a/drivers/gpu/drm/i915/i915_gem_render_state.c
+++ b/drivers/gpu/drm/i915/i915_gem_render_state.c
@@ -242,6 +242,10 @@ int i915_gem_render_state_emit(struct drm_i915_gem_request *req)
 			goto err_unpin;
 	}
 
+	ret = req->engine->emit_flush(req, EMIT_INVALIDATE);
+	if (ret)
+		goto err_unpin;
+
 	ret = req->engine->emit_bb_start(req,
 					 so->batch_offset, so->batch_size,
 					 I915_DISPATCH_SECURE);
-- 
2.13.3

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

end of thread, other threads:[~2017-08-08 14:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-08 13:19 [PATCH] drm/i915: Perform an invalidate prior to executing golden renderstate Chris Wilson
2017-08-08 13:36 ` Mika Kuoppala
2017-08-08 13:36   ` Mika Kuoppala
2017-08-08 13:37   ` Mika Kuoppala
2017-08-08 13:37     ` Mika Kuoppala
2017-08-08 13:43     ` Mika Kuoppala
2017-08-08 13:43       ` Mika Kuoppala
2017-08-08 13:52   ` Chris Wilson
2017-08-08 14:00   ` Chris Wilson
2017-08-08 13:46 ` ✓ Fi.CI.BAT: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.