diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-04-26 16:00:09 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 04:21:20 -0400 |
commit | 7c5ee5366f79f53de2a11e73953daee6d58df124 (patch) | |
tree | b687002e761917b91e17fed3f327015939b115c8 /include | |
parent | 8f5b5e632cd55d9acf10ba498b858fd996bd1a39 (diff) |
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 'include')
-rw-r--r-- | include/drm/ttm/ttm_bo_api.h | 17 |
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, | |||
362 | extern void ttm_bo_unref(struct ttm_buffer_object **bo); | 362 | extern void ttm_bo_unref(struct ttm_buffer_object **bo); |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * ttm_bo_lock_delayed_workqueue | ||
366 | * | ||
367 | * Prevent the delayed workqueue from running. | ||
368 | * Returns | ||
369 | * True if the workqueue was queued at the time | ||
370 | */ | ||
371 | extern int ttm_bo_lock_delayed_workqueue(struct ttm_bo_device *bdev); | ||
372 | |||
373 | /** | ||
374 | * ttm_bo_unlock_delayed_workqueue | ||
375 | * | ||
376 | * Allows the delayed workqueue to run. | ||
377 | */ | ||
378 | extern void ttm_bo_unlock_delayed_workqueue(struct ttm_bo_device *bdev, | ||
379 | int resched); | ||
380 | |||
381 | /** | ||
365 | * ttm_bo_synccpu_write_grab | 382 | * ttm_bo_synccpu_write_grab |
366 | * | 383 | * |
367 | * @bo: The buffer object: | 384 | * @bo: The buffer object: |