@@ -385,10 +385,20 @@ static int execlist_exec_queue_init(struct xe_exec_queue *q)
385385 return err ;
386386}
387387
388- static void execlist_exec_queue_fini_async (struct work_struct * w )
388+ static void execlist_exec_queue_fini (struct xe_exec_queue * q )
389+ {
390+ struct xe_execlist_exec_queue * exl = q -> execlist ;
391+
392+ drm_sched_entity_fini (& exl -> entity );
393+ drm_sched_fini (& exl -> sched );
394+
395+ kfree (exl );
396+ }
397+
398+ static void execlist_exec_queue_destroy_async (struct work_struct * w )
389399{
390400 struct xe_execlist_exec_queue * ee =
391- container_of (w , struct xe_execlist_exec_queue , fini_async );
401+ container_of (w , struct xe_execlist_exec_queue , destroy_async );
392402 struct xe_exec_queue * q = ee -> q ;
393403 struct xe_execlist_exec_queue * exl = q -> execlist ;
394404 struct xe_device * xe = gt_to_xe (q -> gt );
@@ -401,10 +411,6 @@ static void execlist_exec_queue_fini_async(struct work_struct *w)
401411 list_del (& exl -> active_link );
402412 spin_unlock_irqrestore (& exl -> port -> lock , flags );
403413
404- drm_sched_entity_fini (& exl -> entity );
405- drm_sched_fini (& exl -> sched );
406- kfree (exl );
407-
408414 xe_exec_queue_fini (q );
409415}
410416
@@ -413,10 +419,10 @@ static void execlist_exec_queue_kill(struct xe_exec_queue *q)
413419 /* NIY */
414420}
415421
416- static void execlist_exec_queue_fini (struct xe_exec_queue * q )
422+ static void execlist_exec_queue_destroy (struct xe_exec_queue * q )
417423{
418- INIT_WORK (& q -> execlist -> fini_async , execlist_exec_queue_fini_async );
419- queue_work (system_unbound_wq , & q -> execlist -> fini_async );
424+ INIT_WORK (& q -> execlist -> destroy_async , execlist_exec_queue_destroy_async );
425+ queue_work (system_unbound_wq , & q -> execlist -> destroy_async );
420426}
421427
422428static int execlist_exec_queue_set_priority (struct xe_exec_queue * q ,
@@ -467,6 +473,7 @@ static const struct xe_exec_queue_ops execlist_exec_queue_ops = {
467473 .init = execlist_exec_queue_init ,
468474 .kill = execlist_exec_queue_kill ,
469475 .fini = execlist_exec_queue_fini ,
476+ .destroy = execlist_exec_queue_destroy ,
470477 .set_priority = execlist_exec_queue_set_priority ,
471478 .set_timeslice = execlist_exec_queue_set_timeslice ,
472479 .set_preempt_timeout = execlist_exec_queue_set_preempt_timeout ,
0 commit comments