summaryrefslogtreecommitdiffstats
path: root/include/drm/ttm/ttm_bo_driver.h
diff options
context:
space:
mode:
authorThomas Hellstrom2010-11-17 13:28:30 +0100
committerDave Airlie2010-11-22 04:25:20 +0100
commit95762c2b34069bf4adb7929969f1f5f5fc8a38df (patch)
tree5c792e65dbdb4e7cb2c04b5a8058a929e8acc23d /include/drm/ttm/ttm_bo_driver.h
parentdrm/ttm/radeon/nouveau: Kill the bo lock in favour of a bo device fence_lock (diff)
downloadkernel-qcow2-linux-95762c2b34069bf4adb7929969f1f5f5fc8a38df.tar.gz
kernel-qcow2-linux-95762c2b34069bf4adb7929969f1f5f5fc8a38df.tar.xz
kernel-qcow2-linux-95762c2b34069bf4adb7929969f1f5f5fc8a38df.zip
drm/ttm: Improved fencing of buffer object lists
Drastically reduce the number of spin lock / unlock operations by performing unreserving and fencing under global locks. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jerome Glisse <j.glisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/ttm/ttm_bo_driver.h')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index ca8131e98300..cfb9ca4ec1c4 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -910,6 +910,16 @@ extern int ttm_bo_reserve_locked(struct ttm_buffer_object *bo,
extern void ttm_bo_unreserve(struct ttm_buffer_object *bo);
/**
+ * ttm_bo_unreserve_locked
+ *
+ * @bo: A pointer to a struct ttm_buffer_object.
+ *
+ * Unreserve a previous reservation of @bo.
+ * Needs to be called with struct ttm_bo_global::lru_lock held.
+ */
+extern void ttm_bo_unreserve_locked(struct ttm_buffer_object *bo);
+
+/**
* ttm_bo_wait_unreserved
*
* @bo: A pointer to a struct ttm_buffer_object.