[Intel-gfx] [PATCH 7/7] drm/i915: Mark elsps submitted when they are pushed to hw

Mika Kuoppala mika.kuoppala at linux.intel.com
Fri Jul 3 07:09:38 PDT 2015


Now when we have requests this deep on call chain, we
can mark the elsp being submitted when it actually is.
While we are it, remove unnecessary temp assignment as
it is already initialized as zero.

Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 67ff460..8bf4acb 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -304,14 +304,16 @@ static void execlists_elsp_write(struct drm_i915_gem_request *rq0,
 	uint32_t desc[4];
 
 	/* XXX: You must always write both descriptors in the order below. */
-	if (rq1)
+	if (rq1) {
 		temp = execlists_ctx_descriptor(rq1);
-	else
-		temp = 0;
+		rq1->elsp_submitted++;
+	}
+
 	desc[1] = (u32)(temp >> 32);
 	desc[0] = (u32)temp;
 
 	temp = execlists_ctx_descriptor(rq0);
+	rq0->elsp_submitted++;
 	desc[3] = (u32)(temp >> 32);
 	desc[2] = (u32)temp;
 
@@ -433,10 +435,6 @@ static void execlists_context_unqueue(struct intel_engine_cs *ring)
 	WARN_ON(req1 && req1->elsp_submitted);
 
 	execlists_submit_requests(req0, req1);
-
-	req0->elsp_submitted++;
-	if (req1)
-		req1->elsp_submitted++;
 }
 
 static bool execlists_check_remove_request(struct intel_engine_cs *ring,
-- 
2.1.4



More information about the Intel-gfx mailing list