Skip to content

Commit 95af8f4

Browse files
baluviveklucasdemarchi
authored andcommitted
drm/xe/guc: Synchronize Dead CT worker with unbind
Cancel and wait for any Dead CT worker to complete before continuing with device unbinding. Else the worker will end up using resources freed by the undind operation. Cc: Zhanjun Dong <zhanjun.dong@intel.com> Fixes: d2c5a5a ("drm/xe/guc: Dead CT helper") Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> Reviewed-by: Stuart Summers <stuart.summers@intel.com> Link: https://patch.msgid.link/20251103123144.3231829-6-balasubramani.vivekanandan@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit 4926713) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 6146a0f commit 95af8f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/xe/xe_guc_ct.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ static void guc_ct_fini(struct drm_device *drm, void *arg)
200200
{
201201
struct xe_guc_ct *ct = arg;
202202

203+
#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
204+
cancel_work_sync(&ct->dead.worker);
205+
#endif
203206
ct_exit_safe_mode(ct);
204207
destroy_workqueue(ct->g2h_wq);
205208
xa_destroy(&ct->fence_lookup);

0 commit comments

Comments
 (0)