diff options
| author | Christian König <christian.koenig@amd.com> | 2014-12-03 09:46:48 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2014-12-03 18:26:52 -0500 |
| commit | aa35071c590461f95d0179cc8e730d49d610f773 (patch) | |
| tree | 72f9c722700be9a265857bff56f3843c7f0e298d /include/drm/ttm | |
| parent | 5e5c21cac1001089007260c48b0c89ebaace0e71 (diff) | |
drm/ttm: optionally move duplicates to a separate list
This patch adds an optional list_head parameter to ttm_eu_reserve_buffers.
If specified duplicates in the execbuf list are no longer reported as errors,
but moved to this list instead.
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/ttm')
| -rw-r--r-- | include/drm/ttm/ttm_execbuf_util.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/drm/ttm/ttm_execbuf_util.h b/include/drm/ttm/ttm_execbuf_util.h index 460441714413..b620c317c772 100644 --- a/include/drm/ttm/ttm_execbuf_util.h +++ b/include/drm/ttm/ttm_execbuf_util.h | |||
| @@ -68,6 +68,7 @@ extern void ttm_eu_backoff_reservation(struct ww_acquire_ctx *ticket, | |||
| 68 | * non-blocking reserves should be tried. | 68 | * non-blocking reserves should be tried. |
| 69 | * @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 | 70 | * @intr: should the wait be interruptible |
| 71 | * @dups: [out] optional list of duplicates. | ||
| 71 | * | 72 | * |
| 72 | * Tries to reserve bos pointed to by the list entries for validation. | 73 | * Tries to reserve bos pointed to by the list entries for validation. |
| 73 | * If the function returns 0, all buffers are marked as "unfenced", | 74 | * If the function returns 0, all buffers are marked as "unfenced", |
| @@ -83,6 +84,11 @@ extern void ttm_eu_backoff_reservation(struct ww_acquire_ctx *ticket, | |||
| 83 | * calling process receives a signal while waiting. In that case, no | 84 | * calling process receives a signal while waiting. In that case, no |
| 84 | * buffers on the list will be reserved upon return. | 85 | * buffers on the list will be reserved upon return. |
| 85 | * | 86 | * |
| 87 | * If dups is non NULL all buffers already reserved by the current thread | ||
| 88 | * (e.g. duplicates) are added to this list, otherwise -EALREADY is returned | ||
| 89 | * on the first already reserved buffer and all buffers from the list are | ||
| 90 | * unreserved again. | ||
| 91 | * | ||
| 86 | * Buffers reserved by this function should be unreserved by | 92 | * Buffers reserved by this function should be unreserved by |
| 87 | * a call to either ttm_eu_backoff_reservation() or | 93 | * a call to either ttm_eu_backoff_reservation() or |
| 88 | * ttm_eu_fence_buffer_objects() when command submission is complete or | 94 | * ttm_eu_fence_buffer_objects() when command submission is complete or |
| @@ -90,7 +96,8 @@ extern void ttm_eu_backoff_reservation(struct ww_acquire_ctx *ticket, | |||
| 90 | */ | 96 | */ |
| 91 | 97 | ||
| 92 | extern int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, | 98 | extern int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, |
| 93 | struct list_head *list, bool intr); | 99 | struct list_head *list, bool intr, |
| 100 | struct list_head *dups); | ||
| 94 | 101 | ||
| 95 | /** | 102 | /** |
| 96 | * function ttm_eu_fence_buffer_objects. | 103 | * function ttm_eu_fence_buffer_objects. |
