summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2008-02-27 19:46:28 +0100
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2008-02-27 19:46:28 +0100
commit72983ff30183745cd96760aa07b857c44daebde7 (patch)
tree1f0083f81bfb5e81347fed355b9fdea7c1ddf78d
parente87cec19687089f9f268ec0eb81b57e6fb8de6a9 (diff)
Don't wait for buffer idle before applying relocations.
-rw-r--r--shared-core/i915_dma.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index b916441d..2d26fcc1 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -860,6 +860,15 @@ int i915_apply_reloc(struct drm_file *file_priv, int num_buffers,
drm_bo_kunmap(&relocatee->kmap);
relocatee->data_page = NULL;
relocatee->offset = new_cmd_offset;
+
+ /*
+ * Note on buffer idle:
+ * Since we're applying relocations, this part of the
+ * buffer is obviously not used by the GPU and we don't
+ * need to wait for buffer idle. This is an important
+ * consideration for user-space buffer pools.
+ */
+
ret = drm_bo_kmap(relocatee->buf, new_cmd_offset >> PAGE_SHIFT,
1, &relocatee->kmap);
if (ret) {
@@ -1003,10 +1012,6 @@ static int i915_exec_reloc(struct drm_file *file_priv, drm_handle_t buf_handle,
}
mutex_lock (&relocatee.buf->mutex);
- ret = drm_bo_wait (relocatee.buf, 0, 0, FALSE);
- if (ret)
- goto out_err1;
-
while (reloc_user_ptr) {
ret = i915_process_relocs(file_priv, buf_handle, &reloc_user_ptr, &relocatee, buffers, buf_count);
if (ret) {