summaryrefslogtreecommitdiff
path: root/include/drm/ttm/ttm_execbuf_util.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-11-22 13:24:40 +1000
committerDave Airlie <airlied@redhat.com>2010-11-22 13:24:40 +1000
commitd6ea88865d3e5b0c62040531310c1f2c6a994f46 (patch)
treeb80a7cbc6eeab003b412e3037fd335ce9d572f67 /include/drm/ttm/ttm_execbuf_util.h
parent27641c3f003e7f3b6585c01d8a788883603eb262 (diff)
drm/ttm: Add a bo list reserve fastpath (v2)
Makes it possible to reserve a list of buffer objects with a single spin lock / unlock if there is no contention. Should improve cpu usage on SMP kernels. v2: Initialize private list members on reserve and don't call ttm_bo_list_ref_sub() with zero put_count. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/ttm/ttm_execbuf_util.h')
-rw-r--r--include/drm/ttm/ttm_execbuf_util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/drm/ttm/ttm_execbuf_util.h b/include/drm/ttm/ttm_execbuf_util.h
index cd2c475da9ea..fd09b8438977 100644
--- a/include/drm/ttm/ttm_execbuf_util.h
+++ b/include/drm/ttm/ttm_execbuf_util.h
@@ -41,7 +41,9 @@
* @bo: refcounted buffer object pointer.
* @new_sync_obj_arg: New sync_obj_arg for @bo, to be used once
* adding a new sync object.
- * @reservied: Indicates whether @bo has been reserved for validation.
+ * @reserved: Indicates whether @bo has been reserved for validation.
+ * @removed: Indicates whether @bo has been removed from lru lists.
+ * @put_count: Number of outstanding references on bo::list_kref.
*/
struct ttm_validate_buffer {
@@ -49,6 +51,8 @@ struct ttm_validate_buffer {
struct ttm_buffer_object *bo;
void *new_sync_obj_arg;
bool reserved;
+ bool removed;
+ int put_count;
};
/**