[Intel-gfx] [PATCH 17/28] drm/i915/gt: Defer engine registration until fully initialised

Mika Kuoppala mika.kuoppala at linux.intel.com
Thu Nov 7 12:22:25 UTC 2019


Chris Wilson <chris at chris-wilson.co.uk> writes:

> Only add the engine to the available set of uabi engines once it has
> been fully initialised and we know we want it in the public set.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: MichaƂ Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Andi Shyti <andi.shyti at intel.com>
> Acked-by: Andi Shyti <andi.shyti at intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_engine_cs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index b38ea44ab761..5e40044478ff 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -344,7 +344,6 @@ static int intel_engine_setup(struct intel_gt *gt, enum intel_engine_id id)
>  	gt->engine_class[info->class][info->instance] = engine;
>  	gt->engine[id] = engine;
>  
> -	intel_engine_add_user(engine);
>  	gt->i915->engine[id] = engine;
>  
>  	return 0;
> @@ -481,6 +480,8 @@ int intel_engines_init(struct intel_gt *gt)
>  		err = init(engine);
>  		if (err)
>  			goto cleanup;
> +
> +		intel_engine_add_user(engine);
>  	}
>  
>  	return 0;
> -- 
> 2.24.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list