summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-03-04 02:35:46 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-03-04 02:35:46 +0000
commit0f389498cb4d788de74d33d593d0cdc0ea1e864a (patch)
tree5d7c43c8b243a0312cc179895273b3ba32c4f694
parente57198328e74497b3a10b58b74e92df0bc93efa8 (diff)
drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set
From Erik Kurzinger 716cfee8053e608b4ff8c698e91843bd985f4553 in linux-6.6.y/6.6.19 3c43177ffb54ea5be97505eb8e2690e99ac96bc9 in mainline linux
-rw-r--r--sys/dev/pci/drm/drm_syncobj.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_syncobj.c b/sys/dev/pci/drm/drm_syncobj.c
index 73b7395af11..9d722d5d6a6 100644
--- a/sys/dev/pci/drm/drm_syncobj.c
+++ b/sys/dev/pci/drm/drm_syncobj.c
@@ -1096,7 +1096,8 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
uint64_t *points;
uint32_t signaled_count, i;
- if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT)
+ if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
+ DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE))
lockdep_assert_none_held_once();
points = kmalloc_array(count, sizeof(*points), GFP_KERNEL);
@@ -1169,7 +1170,8 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
* fallthough and try a 0 timeout wait!
*/
- if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
+ if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
+ DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE)) {
for (i = 0; i < count; ++i)
drm_syncobj_fence_add_wait(syncobjs[i], &entries[i]);
}