drm/syncobj: fix DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE
authorjsg <jsg@openbsd.org>
Tue, 21 Nov 2023 02:32:56 +0000 (02:32 +0000)
committerjsg <jsg@openbsd.org>
Tue, 21 Nov 2023 02:32:56 +0000 (02:32 +0000)
From Erik Kurzinger
3bbf06efb8ed88fbafe7b10b79837b8300372f94 in linux-6.1.y/6.1.63
101c9f637efa1655f55876644d4439e552267527 in mainline linux

sys/dev/pci/drm/drm_syncobj.c

index 922fe5d..9a28ae5 100644 (file)
@@ -1078,7 +1078,8 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
                fence = drm_syncobj_fence_get(syncobjs[i]);
                if (!fence || dma_fence_chain_find_seqno(&fence, points[i])) {
                        dma_fence_put(fence);
-                       if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
+                       if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
+                                    DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE)) {
                                continue;
                        } else {
                                timeout = -EINVAL;