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

oscar.mateo at intel.com oscar.mateo at intel.com
Fri May 9 14:09:01 CEST 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 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f8acf3d..f9ed89e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2224,7 +2224,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);
 
-- 
1.9.0




More information about the Intel-gfx mailing list