From 7caaed94eade788e79618685a52e223f23786e0d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 7 Nov 2019 08:12:41 +0000 Subject: [PATCH] drm/i915/gt: Defer engine registration until fully initialised MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Cc: Tvrtko Ursulin Cc: Michał Wajdeczko Cc: Andi Shyti Acked-by: Andi Shyti Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191107081252.10542-17-chris@chris-wilson.co.uk --- 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 f8113bc..bf20305 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.7.4