summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/ttm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-06-07 22:15:16 +1000
committerJonathan Gray <jsg@jsg.id.au>2013-08-12 10:42:18 +1000
commit218f55c8c3e24cfb204a3fbf51d8c2e4fece582e (patch)
tree330d1e525f58c6f70e311c411574c990c173c586 /sys/dev/pci/drm/ttm
parent12cdeaa2c786cb5623d06982121541ec83c6d1c6 (diff)
unstub ttm_bo_wait_unreserved
Diffstat (limited to 'sys/dev/pci/drm/ttm')
-rw-r--r--sys/dev/pci/drm/ttm/ttm_bo.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/pci/drm/ttm/ttm_bo.c b/sys/dev/pci/drm/ttm/ttm_bo.c
index 944706b213c..af99b89f58e 100644
--- a/sys/dev/pci/drm/ttm/ttm_bo.c
+++ b/sys/dev/pci/drm/ttm/ttm_bo.c
@@ -193,17 +193,17 @@ ttm_bo_release_list(struct ttm_buffer_object *bo)
int
ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible)
{
- printf("%s stub\n", __func__);
- return -ENOSYS;
-#ifdef notyet
- if (interruptible) {
- return wait_event_interruptible(bo->event_queue,
- !ttm_bo_is_reserved(bo));
- } else {
- wait_event(bo->event_queue, !ttm_bo_is_reserved(bo));
- return 0;
+ int ret = 0;
+
+ while (ret == 0) {
+ if (!ttm_bo_is_reserved(bo))
+ break;
+ ret = -tsleep(&bo->event_queue,
+ PZERO | (interruptible ? PCATCH : 0), "ttmwt", 0);
+
}
-#endif
+
+ return (ret);
}
EXPORT_SYMBOL(ttm_bo_wait_unreserved);