Commit 83787afe authored by Michal Wajdeczko's avatar Michal Wajdeczko

drm/xe/guc: Initialize GuC ID manager sooner

The GuC submission cleanup code may depend on the GuC ID manager,
thus we can't initialize it after registering a submission cleanup
action, as reverse cleanup sequence will destroy GuC ID manager
prior to a call to guc_submit_fini().

Move GuC ID manager initialization up, right after managed mutex
initialization, to have it available during guc_submit_fini().
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240406143946.979-2-michal.wajdeczko@intel.com
parent 104f7519
......@@ -266,6 +266,10 @@ int xe_guc_submit_init(struct xe_guc *guc)
if (err)
return err;
err = xe_guc_id_mgr_init(&guc->submission_state.idm, ~0);
if (err)
return err;
err = alloc_submit_wq(guc);
if (err)
return err;
......@@ -279,15 +283,7 @@ int xe_guc_submit_init(struct xe_guc *guc)
primelockdep(guc);
err = drmm_add_action_or_reset(&xe->drm, guc_submit_fini, guc);
if (err)
return err;
err = xe_guc_id_mgr_init(&guc->submission_state.idm, ~0);
if (err)
return err;
return 0;
return drmm_add_action_or_reset(&xe->drm, guc_submit_fini, guc);
}
static void __release_guc_id(struct xe_guc *guc, struct xe_exec_queue *q, u32 xa_count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment