summaryrefslogtreecommitdiff
path: root/lib/igt_dummyload.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_dummyload.h')
-rw-r--r--lib/igt_dummyload.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h
index ffa7e351..4103e4ab 100644
--- a/lib/igt_dummyload.h
+++ b/lib/igt_dummyload.h
@@ -61,4 +61,36 @@ void igt_spin_batch_free(int fd, igt_spin_t *spin);
void igt_terminate_spin_batches(void);
+enum igt_cork_type {
+ CORK_SYNC_FD = 1,
+ CORK_VGEM_HANDLE
+};
+
+struct igt_cork_vgem {
+ int device;
+ uint32_t fence;
+};
+
+struct igt_cork_sw_sync {
+ int timeline;
+};
+
+struct igt_cork {
+ enum igt_cork_type type;
+
+ union {
+ int fd;
+
+ struct igt_cork_vgem vgem;
+ struct igt_cork_sw_sync sw_sync;
+ };
+};
+
+#define IGT_CORK(name, cork_type) struct igt_cork name = { .type = cork_type, .fd = -1}
+#define IGT_CORK_HANDLE(name) IGT_CORK(name, CORK_VGEM_HANDLE)
+#define IGT_CORK_FENCE(name) IGT_CORK(name, CORK_SYNC_FD)
+
+uint32_t igt_cork_plug(struct igt_cork *cork, int fd);
+void igt_cork_unplug(struct igt_cork *cork);
+
#endif /* __IGT_DUMMYLOAD_H__ */