[Intel-gfx] [PATCH 15/29] drm/i915/guc: Replace preempt_client lookup with engine->preempt_context

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Apr 8 14:57:44 UTC 2019


On 08/04/2019 10:17, Chris Wilson wrote:
> 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: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/intel_guc_submission.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index 4361d052a571..7fbfcb3d63e0 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -568,7 +568,7 @@ static void inject_preempt_context(struct work_struct *work)
>   					     preempt_work[engine->id]);
>   	struct intel_guc_client *client = guc->preempt_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];
>   
>   	if (!ce->ring->emit) { /* recreate upon load/resume */
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list