summaryrefslogtreecommitdiffstats
path: root/include/drm/ttm/ttm_bo_api.h
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2010-04-26 22:00:09 +0200
committerDave Airlie <airlied@redhat.com>2010-05-18 10:21:20 +0200
commit7c5ee5366f79f53de2a11e73953daee6d58df124 (patch)
treeb687002e761917b91e17fed3f327015939b115c8 /include/drm/ttm/ttm_bo_api.h
parentradeon: Take drm struct_mutex over reclocking (diff)
downloadlinux-7c5ee5366f79f53de2a11e73953daee6d58df124.tar.xz
linux-7c5ee5366f79f53de2a11e73953daee6d58df124.zip
ttm: Provide an API for starting and stopping the delayed workqueue
We want to be able to prevent the delayed workqueue from changing state while we're reclocking, so add an API to block and unblock it. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to '')
-rw-r--r--include/drm/ttm/ttm_bo_api.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index 3e273e0b9417..267a86c74e2e 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -362,6 +362,23 @@ extern int ttm_bo_validate(struct ttm_buffer_object *bo,
extern void ttm_bo_unref(struct ttm_buffer_object **bo);
/**
+ * ttm_bo_lock_delayed_workqueue
+ *
+ * Prevent the delayed workqueue from running.
+ * Returns
+ * True if the workqueue was queued at the time
+ */
+extern int ttm_bo_lock_delayed_workqueue(struct ttm_bo_device *bdev);
+
+/**
+ * ttm_bo_unlock_delayed_workqueue
+ *
+ * Allows the delayed workqueue to run.
+ */
+extern void ttm_bo_unlock_delayed_workqueue(struct ttm_bo_device *bdev,
+ int resched);
+
+/**
* ttm_bo_synccpu_write_grab
*
* @bo: The buffer object: