summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x/fence.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/host1x/fence.h')
-rw-r--r--drivers/gpu/host1x/fence.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/fence.h b/drivers/gpu/host1x/fence.h
new file mode 100644
index 000000000000..f3c644c73cad
--- /dev/null
+++ b/drivers/gpu/host1x/fence.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2020, NVIDIA Corporation.
+ */
+
+#ifndef HOST1X_FENCE_H
+#define HOST1X_FENCE_H
+
+struct host1x_syncpt_fence {
+ struct dma_fence base;
+
+ atomic_t signaling;
+
+ struct host1x_syncpt *sp;
+ u32 threshold;
+ bool timeout;
+
+ struct delayed_work timeout_work;
+
+ struct list_head list;
+};
+
+struct host1x_fence_list {
+ spinlock_t lock;
+ struct list_head list;
+};
+
+void host1x_fence_signal(struct host1x_syncpt_fence *fence);
+
+#endif