Skip to content

Commit b8126f2

Browse files
committed
Merge tag 'drm-xe-next-fixes-2024-11-21' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next
Driver Changes: - Wake up waiters after wait condition set to true (Nirmoy Das) - Mark the preempt fence workqueue as reclaim. (Matthew Brost) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Zz-MiVLFjOZQLrlc@fedora
2 parents 85f720f + ed31ba0 commit b8126f2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/gpu/drm/xe/xe_device.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
360360
INIT_LIST_HEAD(&xe->pinned.external_vram);
361361
INIT_LIST_HEAD(&xe->pinned.evicted);
362362

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);
364365
xe->ordered_wq = alloc_ordered_workqueue("xe-ordered-wq", 0);
365366
xe->unordered_wq = alloc_workqueue("xe-unordered-wq", 0, 0);
366367
xe->destroy_wq = alloc_workqueue("xe-destroy-wq", 0, 0);

drivers/gpu/drm/xe/xe_sync.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,12 @@ static void user_fence_worker(struct work_struct *w)
8787
drm_dbg(&ufence->xe->drm, "mmget_not_zero() failed, ufence wasn't signaled\n");
8888
}
8989

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+
*/
9194
WRITE_ONCE(ufence->signalled, 1);
95+
wake_up_all(&ufence->xe->ufence_wq);
9296
user_fence_put(ufence);
9397
}
9498

0 commit comments

Comments
 (0)