summaryrefslogtreecommitdiff
path: root/vigs/vigs.h
diff options
context:
space:
mode:
Diffstat (limited to 'vigs/vigs.h')
-rw-r--r--vigs/vigs.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/vigs/vigs.h b/vigs/vigs.h
index 681031a0..f44027bd 100644
--- a/vigs/vigs.h
+++ b/vigs/vigs.h
@@ -89,6 +89,21 @@ struct vigs_drm_execbuffer
struct vigs_drm_gem gem;
};
+struct vigs_drm_fence
+{
+ /* VIGS device object. */
+ struct vigs_drm_device *dev;
+
+ /* a handle to fence object. */
+ uint32_t handle;
+
+ /* fence sequence number. */
+ uint32_t seq;
+
+ /* is fence signaled ? updated on 'vigs_drm_fence_check'. */
+ int signaled;
+};
+
/*
* All functions return 0 on success and < 0 on error, i.e. kernel style:
* return -ENOMEM;
@@ -134,6 +149,8 @@ int vigs_drm_gem_map(struct vigs_drm_gem *gem, int track_access);
void vigs_drm_gem_unmap(struct vigs_drm_gem *gem);
+int vigs_drm_gem_wait(struct vigs_drm_gem *gem);
+
/*
* @}
*/
@@ -185,6 +202,33 @@ int vigs_drm_execbuffer_exec(struct vigs_drm_execbuffer *execbuffer);
* @}
*/
+/*
+ * Fence functions.
+ * @{
+ */
+
+int vigs_drm_fence_create(struct vigs_drm_device *dev,
+ int send,
+ struct vigs_drm_fence **fence);
+
+/*
+ * Passing NULL won't hurt, this is for convenience.
+ */
+void vigs_drm_fence_ref(struct vigs_drm_fence *fence);
+
+/*
+ * Passing NULL won't hurt, this is for convenience.
+ */
+void vigs_drm_fence_unref(struct vigs_drm_fence *fence);
+
+int vigs_drm_fence_wait(struct vigs_drm_fence *fence);
+
+int vigs_drm_fence_check(struct vigs_drm_fence *fence);
+
+/*
+ * @}
+ */
+
#ifdef __cplusplus
};
#endif /* __cplusplus */