[Intel-gfx] [PATCH 26/49] drm/i915/bdw: Set the request context information correctly in the LRC case

oscar.mateo at intel.com oscar.mateo at intel.com
Thu Mar 27 18:59:55 CET 2014


From: Oscar Mateo <oscar.mateo at intel.com>

We need it (at least) to properly update the last retired head.

Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e3c3c58..e844c50 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2213,7 +2213,10 @@ int __i915_add_request(struct intel_engine *ring,
 	/* Hold a reference to the current context so that we can inspect
 	 * it later in case a hangcheck error event fires.
 	 */
-	request->ctx = ring->last_context;
+	if (dev_priv->lrc_enabled)
+		request->ctx = ctx;
+	else
+		request->ctx = ring->last_context;
 	if (request->ctx)
 		i915_gem_context_reference(request->ctx);
 
@@ -2477,7 +2480,6 @@ i915_gem_retire_requests_ring(struct intel_engine *ring)
 
 		trace_i915_gem_request_retire(ring, request->seqno);
 
-		/* TODO: request->ctx is not correctly updated for LR contexts */
 		ringbuf = intel_ringbuffer_get(ring, request->ctx);
 
 		/* We know the GPU must have read the request to have
-- 
1.9.0




More information about the Intel-gfx mailing list