Commit 174221e8 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/guc: Replace preempt_client lookup with engine->preempt_context



Circumvent the dance we currently perform to find the preempt_client and
lookup its HW context for this engine, as we know we have already pinned
the preempt_context on the engine.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190408091728.20207-15-chris@chris-wilson.co.uk
parent 64847757
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -567,7 +567,7 @@ static void inject_preempt_context(struct work_struct *work)
					     preempt_work[engine->id]);
					     preempt_work[engine->id]);
	struct intel_guc_client *client = guc->preempt_client;
	struct intel_guc_client *client = guc->preempt_client;
	struct guc_stage_desc *stage_desc = __get_stage_desc(client);
	struct guc_stage_desc *stage_desc = __get_stage_desc(client);
	struct intel_context *ce = intel_context_lookup(client->owner, engine);
	struct intel_context *ce = engine->preempt_context;
	u32 data[7];
	u32 data[7];


	if (!ce->ring->emit) { /* recreate upon load/resume */
	if (!ce->ring->emit) { /* recreate upon load/resume */