File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -360,7 +360,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
360
360
INIT_LIST_HEAD (& xe -> pinned .external_vram );
361
361
INIT_LIST_HEAD (& xe -> pinned .evicted );
362
362
363
- xe -> preempt_fence_wq = alloc_ordered_workqueue ("xe-preempt-fence-wq" , 0 );
363
+ xe -> preempt_fence_wq = alloc_ordered_workqueue ("xe-preempt-fence-wq" ,
364
+ WQ_MEM_RECLAIM );
364
365
xe -> ordered_wq = alloc_ordered_workqueue ("xe-ordered-wq" , 0 );
365
366
xe -> unordered_wq = alloc_workqueue ("xe-unordered-wq" , 0 , 0 );
366
367
xe -> destroy_wq = alloc_workqueue ("xe-destroy-wq" , 0 , 0 );
Original file line number Diff line number Diff line change @@ -87,8 +87,12 @@ static void user_fence_worker(struct work_struct *w)
87
87
drm_dbg (& ufence -> xe -> drm , "mmget_not_zero() failed, ufence wasn't signaled\n" );
88
88
}
89
89
90
- wake_up_all (& ufence -> xe -> ufence_wq );
90
+ /*
91
+ * Wake up waiters only after updating the ufence state, allowing the UMD
92
+ * to safely reuse the same ufence without encountering -EBUSY errors.
93
+ */
91
94
WRITE_ONCE (ufence -> signalled , 1 );
95
+ wake_up_all (& ufence -> xe -> ufence_wq );
92
96
user_fence_put (ufence );
93
97
}
94
98
You can’t perform that action at this time.
0 commit comments