aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/dma-fence.h
diff options
context:
space:
mode:
authorDavid Stevens <stevensd@chromium.org>2021-04-08 18:54:28 +0900
committerChristian König <christian.koenig@amd.com>2021-04-08 12:21:13 +0200
commitfd921693fe989afe82600d97b37f54c942a6db6c (patch)
tree890387d4a85df03774b8d5ebc119b77ff15963f9 /include/linux/dma-fence.h
parentdrm/bridge: lt8912b: Add header file <linux/gpio/consumer.h> (diff)
downloadwireguard-linux-fd921693fe989afe82600d97b37f54c942a6db6c.tar.xz
wireguard-linux-fd921693fe989afe82600d97b37f54c942a6db6c.zip
drm/syncobj: use newly allocated stub fences
Allocate a new private stub fence in drm_syncobj_assign_null_handle, instead of using a static stub fence. When userspace creates a fence with DRM_SYNCOBJ_CREATE_SIGNALED or when userspace signals a fence via DRM_IOCTL_SYNCOBJ_SIGNAL, the timestamp obtained when the fence is exported and queried with SYNC_IOC_FILE_INFO should match when the fence's status was changed from the perspective of userspace, which is during the respective ioctl. When a static stub fence started being used in by these ioctls, this behavior changed. Instead, the timestamp returned by SYNC_IOC_FILE_INFO became the first time anything used the static stub fence, which has no meaning to userspace. Signed-off-by: David Stevens <stevensd@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210408095428.3983055-1-stevensd@google.com Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'include/linux/dma-fence.h')
-rw-r--r--include/linux/dma-fence.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h
index 9f12efaaa93a..6ffb4b2c6371 100644
--- a/include/linux/dma-fence.h
+++ b/include/linux/dma-fence.h
@@ -587,6 +587,7 @@ static inline signed long dma_fence_wait(struct dma_fence *fence, bool intr)
}
struct dma_fence *dma_fence_get_stub(void);
+struct dma_fence *dma_fence_allocate_private_stub(void);
u64 dma_fence_context_alloc(unsigned num);
#define DMA_FENCE_TRACE(f, fmt, args...) \