xref: /openbmc/linux/drivers/gpu/host1x/fence.h (revision c4c3c32d)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2020, NVIDIA Corporation.
4  */
5 
6 #ifndef HOST1X_FENCE_H
7 #define HOST1X_FENCE_H
8 
9 struct host1x_syncpt_fence {
10 	struct dma_fence base;
11 
12 	atomic_t signaling;
13 
14 	struct host1x_syncpt *sp;
15 	u32 threshold;
16 	bool timeout;
17 
18 	struct delayed_work timeout_work;
19 
20 	struct list_head list;
21 };
22 
23 struct host1x_fence_list {
24 	spinlock_t lock;
25 	struct list_head list;
26 };
27 
28 void host1x_fence_signal(struct host1x_syncpt_fence *fence);
29 
30 #endif
31