From: Tvrtko Ursulin Date: Thu, 28 Apr 2016 08:56:57 +0000 (+0100) Subject: drm/i915: Store LRC hardware id in the request X-Git-Tag: v5.15~13124^2~45^2~152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3d127616eef78d0e4a677b6634dbc914ff4fd0a;p=platform%2Fkernel%2Flinux-starfive.git drm/i915: Store LRC hardware id in the request This way in the following patch we can disconnect requests from contexts. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1461833819-3991-23-git-send-email-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index eb4a95b..e2abbcc 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2352,6 +2352,8 @@ struct drm_i915_gem_request { /** Execlists no. of times this request has been sent to the ELSP */ int elsp_submitted; + /** Execlists context hardware id. */ + unsigned ctx_hw_id; }; struct drm_i915_gem_request * __must_check diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index b7a3e7e..dc25cfe 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -481,7 +481,7 @@ execlists_check_remove_request(struct intel_engine_cs *engine, u32 request_id) if (!head_req) return 0; - if (unlikely(head_req->ctx->hw_id != request_id)) + if (unlikely(head_req->ctx_hw_id != request_id)) return 0; WARN(head_req->elsp_submitted == 0, "Never submitted head request\n"); @@ -619,6 +619,7 @@ static void execlists_context_queue(struct drm_i915_gem_request *request) } list_add_tail(&request->execlist_link, &engine->execlist_queue); + request->ctx_hw_id = request->ctx->hw_id; if (num_elements == 0) execlists_context_unqueue(engine);