sync with OpenBSD -current
This commit is contained in:
parent
3c7ee3c11c
commit
dd4d2242a5
44 changed files with 850 additions and 587 deletions
|
@ -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]);
|
||||
}
|
||||
|
@ -1444,10 +1446,21 @@ syncobj_eventfd_entry_func(struct drm_syncobj *syncobj,
|
|||
|
||||
/* This happens inside the syncobj lock */
|
||||
fence = dma_fence_get(rcu_dereference_protected(syncobj->fence, 1));
|
||||
if (!fence)
|
||||
return;
|
||||
|
||||
ret = dma_fence_chain_find_seqno(&fence, entry->point);
|
||||
if (ret != 0 || !fence) {
|
||||
if (ret != 0) {
|
||||
/* The given seqno has not been submitted yet. */
|
||||
dma_fence_put(fence);
|
||||
return;
|
||||
} else if (!fence) {
|
||||
/* If dma_fence_chain_find_seqno returns 0 but sets the fence
|
||||
* to NULL, it implies that the given seqno is signaled and a
|
||||
* later seqno has already been submitted. Assign a stub fence
|
||||
* so that the eventfd still gets signaled below.
|
||||
*/
|
||||
fence = dma_fence_get_stub();
|
||||
}
|
||||
|
||||
list_del_init(&entry->node);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue