aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/ttm/ttm_execbuf_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/ttm/ttm_execbuf_util.h')
-rw-r--r--include/drm/ttm/ttm_execbuf_util.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/include/drm/ttm/ttm_execbuf_util.h b/include/drm/ttm/ttm_execbuf_util.h
index 16db7d01a336..460441714413 100644
--- a/include/drm/ttm/ttm_execbuf_util.h
+++ b/include/drm/ttm/ttm_execbuf_util.h
@@ -39,19 +39,13 @@
39 * 39 *
40 * @head: list head for thread-private list. 40 * @head: list head for thread-private list.
41 * @bo: refcounted buffer object pointer. 41 * @bo: refcounted buffer object pointer.
42 * @reserved: Indicates whether @bo has been reserved for validation. 42 * @shared: should the fence be added shared?
43 * @removed: Indicates whether @bo has been removed from lru lists.
44 * @put_count: Number of outstanding references on bo::list_kref.
45 * @old_sync_obj: Pointer to a sync object about to be unreferenced
46 */ 43 */
47 44
48struct ttm_validate_buffer { 45struct ttm_validate_buffer {
49 struct list_head head; 46 struct list_head head;
50 struct ttm_buffer_object *bo; 47 struct ttm_buffer_object *bo;
51 bool reserved; 48 bool shared;
52 bool removed;
53 int put_count;
54 void *old_sync_obj;
55}; 49};
56 50
57/** 51/**
@@ -73,6 +67,7 @@ extern void ttm_eu_backoff_reservation(struct ww_acquire_ctx *ticket,
73 * @ticket: [out] ww_acquire_ctx filled in by call, or NULL if only 67 * @ticket: [out] ww_acquire_ctx filled in by call, or NULL if only
74 * non-blocking reserves should be tried. 68 * non-blocking reserves should be tried.
75 * @list: thread private list of ttm_validate_buffer structs. 69 * @list: thread private list of ttm_validate_buffer structs.
70 * @intr: should the wait be interruptible
76 * 71 *
77 * Tries to reserve bos pointed to by the list entries for validation. 72 * Tries to reserve bos pointed to by the list entries for validation.
78 * If the function returns 0, all buffers are marked as "unfenced", 73 * If the function returns 0, all buffers are marked as "unfenced",
@@ -84,9 +79,9 @@ extern void ttm_eu_backoff_reservation(struct ww_acquire_ctx *ticket,
84 * CPU write reservations to be cleared, and for other threads to 79 * CPU write reservations to be cleared, and for other threads to
85 * unreserve their buffers. 80 * unreserve their buffers.
86 * 81 *
87 * This function may return -ERESTART or -EAGAIN if the calling process 82 * If intr is set to true, this function may return -ERESTARTSYS if the
88 * receives a signal while waiting. In that case, no buffers on the list 83 * calling process receives a signal while waiting. In that case, no
89 * will be reserved upon return. 84 * buffers on the list will be reserved upon return.
90 * 85 *
91 * Buffers reserved by this function should be unreserved by 86 * Buffers reserved by this function should be unreserved by
92 * a call to either ttm_eu_backoff_reservation() or 87 * a call to either ttm_eu_backoff_reservation() or
@@ -95,14 +90,14 @@ extern void ttm_eu_backoff_reservation(struct ww_acquire_ctx *ticket,
95 */ 90 */
96 91
97extern int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, 92extern int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,
98 struct list_head *list); 93 struct list_head *list, bool intr);
99 94
100/** 95/**
101 * function ttm_eu_fence_buffer_objects. 96 * function ttm_eu_fence_buffer_objects.
102 * 97 *
103 * @ticket: ww_acquire_ctx from reserve call 98 * @ticket: ww_acquire_ctx from reserve call
104 * @list: thread private list of ttm_validate_buffer structs. 99 * @list: thread private list of ttm_validate_buffer structs.
105 * @sync_obj: The new sync object for the buffers. 100 * @fence: The new exclusive fence for the buffers.
106 * 101 *
107 * This function should be called when command submission is complete, and 102 * This function should be called when command submission is complete, and
108 * it will add a new sync object to bos pointed to by entries on @list. 103 * it will add a new sync object to bos pointed to by entries on @list.
@@ -111,6 +106,7 @@ extern int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,
111 */ 106 */
112 107
113extern void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket, 108extern void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket,
114 struct list_head *list, void *sync_obj); 109 struct list_head *list,
110 struct fence *fence);
115 111
116#endif 112#endif