| .. | .. |
|---|
| 26 | 26 | #ifndef __DRM_SYNCOBJ_H__ |
|---|
| 27 | 27 | #define __DRM_SYNCOBJ_H__ |
|---|
| 28 | 28 | |
|---|
| 29 | | -#include "linux/dma-fence.h" |
|---|
| 29 | +#include <linux/dma-fence.h> |
|---|
| 30 | +#include <linux/dma-fence-chain.h> |
|---|
| 30 | 31 | |
|---|
| 31 | | -struct drm_syncobj_cb; |
|---|
| 32 | +struct drm_file; |
|---|
| 32 | 33 | |
|---|
| 33 | 34 | /** |
|---|
| 34 | 35 | * struct drm_syncobj - sync object. |
|---|
| .. | .. |
|---|
| 60 | 61 | * @file: A file backing for this syncobj. |
|---|
| 61 | 62 | */ |
|---|
| 62 | 63 | struct file *file; |
|---|
| 63 | | -}; |
|---|
| 64 | | - |
|---|
| 65 | | -typedef void (*drm_syncobj_func_t)(struct drm_syncobj *syncobj, |
|---|
| 66 | | - struct drm_syncobj_cb *cb); |
|---|
| 67 | | - |
|---|
| 68 | | -/** |
|---|
| 69 | | - * struct drm_syncobj_cb - callback for drm_syncobj_add_callback |
|---|
| 70 | | - * @node: used by drm_syncob_add_callback to append this struct to |
|---|
| 71 | | - * &drm_syncobj.cb_list |
|---|
| 72 | | - * @func: drm_syncobj_func_t to call |
|---|
| 73 | | - * |
|---|
| 74 | | - * This struct will be initialized by drm_syncobj_add_callback, additional |
|---|
| 75 | | - * data can be passed along by embedding drm_syncobj_cb in another struct. |
|---|
| 76 | | - * The callback will get called the next time drm_syncobj_replace_fence is |
|---|
| 77 | | - * called. |
|---|
| 78 | | - */ |
|---|
| 79 | | -struct drm_syncobj_cb { |
|---|
| 80 | | - struct list_head node; |
|---|
| 81 | | - drm_syncobj_func_t func; |
|---|
| 82 | 64 | }; |
|---|
| 83 | 65 | |
|---|
| 84 | 66 | void drm_syncobj_free(struct kref *kref); |
|---|
| .. | .. |
|---|
| 131 | 113 | |
|---|
| 132 | 114 | struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private, |
|---|
| 133 | 115 | u32 handle); |
|---|
| 134 | | -void drm_syncobj_add_callback(struct drm_syncobj *syncobj, |
|---|
| 135 | | - struct drm_syncobj_cb *cb, |
|---|
| 136 | | - drm_syncobj_func_t func); |
|---|
| 137 | | -void drm_syncobj_remove_callback(struct drm_syncobj *syncobj, |
|---|
| 138 | | - struct drm_syncobj_cb *cb); |
|---|
| 116 | +void drm_syncobj_add_point(struct drm_syncobj *syncobj, |
|---|
| 117 | + struct dma_fence_chain *chain, |
|---|
| 118 | + struct dma_fence *fence, |
|---|
| 119 | + uint64_t point); |
|---|
| 139 | 120 | void drm_syncobj_replace_fence(struct drm_syncobj *syncobj, |
|---|
| 140 | 121 | struct dma_fence *fence); |
|---|
| 141 | 122 | int drm_syncobj_find_fence(struct drm_file *file_private, |
|---|
| 142 | | - u32 handle, |
|---|
| 123 | + u32 handle, u64 point, u64 flags, |
|---|
| 143 | 124 | struct dma_fence **fence); |
|---|
| 144 | 125 | void drm_syncobj_free(struct kref *kref); |
|---|
| 145 | 126 | int drm_syncobj_create(struct drm_syncobj **out_syncobj, uint32_t flags, |
|---|