Skip to content

Commit 95af8f4

Browse files
baluvivekLucas De Marchi
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 <[email protected]> Fixes: d2c5a5a ("drm/xe/guc: Dead CT helper") Signed-off-by: Balasubramani Vivekanandan <[email protected]> Reviewed-by: Stuart Summers <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> (cherry picked from commit 4926713) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 6146a0f commit 95af8f4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)