aboutsummaryrefslogtreecommitdiff
path: root/linux-core/i915_execbuf.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2008-04-13 14:49:14 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2008-04-14 12:13:33 +0200
commitc9b73ef6daff75df27d17260a9fc84e68f1b21b4 (patch)
treefdaa75f6dbd1a0c6c7c4b5fc567cd005f5f62f6d /linux-core/i915_execbuf.c
parent65dd0e68ff0e0e354925adb7d5fffeb0ffbb485c (diff)
Unlock the BO mutex while waiting for idle, unmapped, unfenced.
Move unfenced checking into idle checking. Never time out while waiting for software events like unmapped or unfenced.
Diffstat (limited to 'linux-core/i915_execbuf.c')
-rw-r--r--linux-core/i915_execbuf.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/linux-core/i915_execbuf.c b/linux-core/i915_execbuf.c
index 088a2693..804f3ac1 100644
--- a/linux-core/i915_execbuf.c
+++ b/linux-core/i915_execbuf.c
@@ -144,7 +144,7 @@ int i915_apply_reloc(struct drm_file *file_priv, int num_buffers,
relocatee->offset = new_cmd_offset;
if (unlikely(relocatee->idle == I915_RELOC_UNCHECKED)) {
- ret = drm_bo_wait(relocatee->buf, 0, 0, 0);
+ ret = drm_bo_wait(relocatee->buf, 0, 1, 0, 0);
if (ret)
return ret;
relocatee->idle = I915_RELOC_IDLE;
@@ -355,11 +355,9 @@ static int i915_update_relocatee(struct i915_relocatee_info *relocatee,
if (relocatee->idle == I915_RELOC_UNCHECKED) {
preempt_enable();
- ret = mutex_lock_interruptible(&relocatee->buf->mutex);
- if (unlikely(ret))
- return -EAGAIN;
+ mutex_lock(&relocatee->buf->mutex);
- ret = drm_bo_wait(relocatee->buf, 0, 0, 1);
+ ret = drm_bo_wait(relocatee->buf, 0, 1, 1, 0);
if (ret == 0)
relocatee->idle = I915_RELOC_IDLE;
else {
@@ -684,7 +682,7 @@ int i915_validate_buffer_list(struct drm_file *file_priv,
ret = drm_bo_handle_validate(file_priv, req->bo_req.handle,
req->bo_req.flags,
req->bo_req.mask, req->bo_req.hint,
- req->bo_req.fence_class, 0,
+ req->bo_req.fence_class,
NULL, &item->buffer);
if (ret) {
DRM_ERROR("error on handle validate %d\n", ret);