From: jsg Date: Mon, 4 Mar 2024 02:35:45 +0000 (+0000) Subject: drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ad45188d95040f5823a698a9ed6a6bbdfefd2107;p=openbsd 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 --- 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]); }