Driver Changes:

- Wake up waiters after wait condition set to true (Nirmoy Das)
 - Mark the preempt fence workqueue as reclaim. (Matthew Brost)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCZz+JwgAKCRC4FpNVCsYG
 vywEAP4ojMpqRpqVhZLKHXECgVodqzRJ2ywrIL1pOgjI+gCnVwD/WPAObalAqFxV
 9iVZQ7pjQWfkfhJGQ53s0q8C5RXkQwk=
 =p4BW
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Dave Airlie 2024-11-27 11:04:47 +10:00
commit b8126f24b4
2 changed files with 7 additions and 2 deletions

View File

@ -360,7 +360,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
INIT_LIST_HEAD(&xe->pinned.external_vram);
INIT_LIST_HEAD(&xe->pinned.evicted);
xe->preempt_fence_wq = alloc_ordered_workqueue("xe-preempt-fence-wq", 0);
xe->preempt_fence_wq = alloc_ordered_workqueue("xe-preempt-fence-wq",
WQ_MEM_RECLAIM);
xe->ordered_wq = alloc_ordered_workqueue("xe-ordered-wq", 0);
xe->unordered_wq = alloc_workqueue("xe-unordered-wq", 0, 0);
xe->destroy_wq = alloc_workqueue("xe-destroy-wq", 0, 0);

View File

@ -87,8 +87,12 @@ static void user_fence_worker(struct work_struct *w)
drm_dbg(&ufence->xe->drm, "mmget_not_zero() failed, ufence wasn't signaled\n");
}
wake_up_all(&ufence->xe->ufence_wq);
/*
* Wake up waiters only after updating the ufence state, allowing the UMD
* to safely reuse the same ufence without encountering -EBUSY errors.
*/
WRITE_ONCE(ufence->signalled, 1);
wake_up_all(&ufence->xe->ufence_wq);
user_fence_put(ufence);
}