projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
223217b
)
drm/xe/ufence: Wake up waiters after setting ufence->signalled
author
Nirmoy Das
<nirmoy.das@intel.com>
Thu, 14 Nov 2024 15:05:37 +0000
(16:05 +0100)
committer
Nirmoy Das
<nirmoy.das@intel.com>
Fri, 15 Nov 2024 13:16:09 +0000
(14:16 +0100)
If a previous ufence is not signalled, vm_bind will return -EBUSY.
Delaying the modification of ufence->signalled can cause issues if the
UMD reuses the same ufence so update ufence->signalled before waking up
waiters.
Cc: Matthew Brost <matthew.brost@intel.com>
Link:
https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3233
Fixes:
977e5b82e090
("drm/xe: Expose user fence from xe_sync_entry")
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20241114150537.4161573-1-nirmoy.das@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
drivers/gpu/drm/xe/xe_sync.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/xe/xe_sync.c
b/drivers/gpu/drm/xe/xe_sync.c
index
a90480c
..
42f5beb
100644
(file)
--- a/
drivers/gpu/drm/xe/xe_sync.c
+++ b/
drivers/gpu/drm/xe/xe_sync.c
@@
-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);
}