0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _LINUX_SYNC_H
0014 #define _LINUX_SYNC_H
0015
0016 #include <linux/list.h>
0017 #include <linux/rbtree.h>
0018 #include <linux/spinlock.h>
0019 #include <linux/dma-fence.h>
0020
0021 #include <linux/sync_file.h>
0022 #include <uapi/linux/sync_file.h>
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 struct sync_timeline {
0034 struct kref kref;
0035 char name[32];
0036
0037
0038 u64 context;
0039 int value;
0040
0041 struct rb_root pt_tree;
0042 struct list_head pt_list;
0043 spinlock_t lock;
0044
0045 struct list_head sync_timeline_list;
0046 };
0047
0048 static inline struct sync_timeline *dma_fence_parent(struct dma_fence *fence)
0049 {
0050 return container_of(fence->lock, struct sync_timeline, lock);
0051 }
0052
0053
0054
0055
0056
0057
0058
0059 struct sync_pt {
0060 struct dma_fence base;
0061 struct list_head link;
0062 struct rb_node node;
0063 };
0064
0065 extern const struct file_operations sw_sync_debugfs_fops;
0066
0067 void sync_timeline_debug_add(struct sync_timeline *obj);
0068 void sync_timeline_debug_remove(struct sync_timeline *obj);
0069 void sync_file_debug_add(struct sync_file *fence);
0070 void sync_file_debug_remove(struct sync_file *fence);
0071
0072 #endif