artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bd5896
)
drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence.
author
jsg
<jsg@openbsd.org>
Tue, 14 Dec 2021 13:32:09 +0000
(13:32 +0000)
committer
jsg
<jsg@openbsd.org>
Tue, 14 Dec 2021 13:32:09 +0000
(13:32 +0000)
From Bas Nieuwenhuizen
2737d0bc21b6db199b4145e12b9f1745577d7944
in linux 5.10.y/5.10.85
b19926d4f3a660a8b76e5d989ffd1168e619a5c4
in mainline linux
sys/dev/pci/drm/drm_syncobj.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/drm_syncobj.c
b/sys/dev/pci/drm/drm_syncobj.c
index
2d157a1
..
f792dd1
100644
(file)
--- a/
sys/dev/pci/drm/drm_syncobj.c
+++ b/
sys/dev/pci/drm/drm_syncobj.c
@@
-395,8
+395,17
@@
int drm_syncobj_find_fence(struct drm_file *file_private,
if (*fence) {
ret = dma_fence_chain_find_seqno(fence, point);
- if (!ret)
+ if (!ret) {
+ /* If the requested seqno is already signaled
+ * drm_syncobj_find_fence may return a NULL
+ * fence. To make sure the recipient gets
+ * signalled, use a new fence instead.
+ */
+ if (!*fence)
+ *fence = dma_fence_get_stub();
+
goto out;
+ }
dma_fence_put(*fence);
} else {
ret = -EINVAL;