diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2012-11-06 08:39:43 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-20 01:17:35 -0500 |
commit | 654aa79259a19f0d5e3cf9cb20aff56dc3b041b7 (patch) | |
tree | 406029f079300aac57d3463cf952b68d122619e9 /include | |
parent | 6c1e963cc5771c93d4ed7aa8bdd4322a7c918e9b (diff) |
drm/ttm: alter cpu_writers to return -EBUSY in ttm_execbuf_util reservations
This is similar to other platforms that don't allow command submission
to buffers locked on the cpu.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/ttm/ttm_bo_api.h | 5 | ||||
-rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 14 |
2 files changed, 3 insertions, 16 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 5ff938df5fce..c6cae733ddef 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -424,8 +424,9 @@ extern void ttm_bo_unlock_delayed_workqueue(struct ttm_bo_device *bdev, | |||
424 | * @no_wait: Return immediately if buffer is busy. | 424 | * @no_wait: Return immediately if buffer is busy. |
425 | * | 425 | * |
426 | * Synchronizes a buffer object for CPU RW access. This means | 426 | * Synchronizes a buffer object for CPU RW access. This means |
427 | * blocking command submission that affects the buffer and | 427 | * command submission that affects the buffer will return -EBUSY |
428 | * waiting for buffer idle. This lock is recursive. | 428 | * until ttm_bo_synccpu_write_release is called. |
429 | * | ||
429 | * Returns | 430 | * Returns |
430 | * -EBUSY if the buffer is busy and no_wait is true. | 431 | * -EBUSY if the buffer is busy and no_wait is true. |
431 | * -ERESTARTSYS if interrupted by a signal. | 432 | * -ERESTARTSYS if interrupted by a signal. |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 4789beee3b77..dd96442cdc2a 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -726,20 +726,6 @@ extern void ttm_bo_mem_put(struct ttm_buffer_object *bo, | |||
726 | extern void ttm_bo_mem_put_locked(struct ttm_buffer_object *bo, | 726 | extern void ttm_bo_mem_put_locked(struct ttm_buffer_object *bo, |
727 | struct ttm_mem_reg *mem); | 727 | struct ttm_mem_reg *mem); |
728 | 728 | ||
729 | /** | ||
730 | * ttm_bo_wait_for_cpu | ||
731 | * | ||
732 | * @bo: Pointer to a struct ttm_buffer_object. | ||
733 | * @no_wait: Don't sleep while waiting. | ||
734 | * | ||
735 | * Wait until a buffer object is no longer sync'ed for CPU access. | ||
736 | * Returns: | ||
737 | * -EBUSY: Buffer object was sync'ed for CPU access. (only if no_wait == 1). | ||
738 | * -ERESTARTSYS: An interruptible sleep was interrupted by a signal. | ||
739 | */ | ||
740 | |||
741 | extern int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait); | ||
742 | |||
743 | extern void ttm_bo_global_release(struct drm_global_reference *ref); | 729 | extern void ttm_bo_global_release(struct drm_global_reference *ref); |
744 | extern int ttm_bo_global_init(struct drm_global_reference *ref); | 730 | extern int ttm_bo_global_init(struct drm_global_reference *ref); |
745 | 731 | ||