summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@optimus.(none)>2007-10-25 16:53:18 +1000
committerDave Airlie <airlied@optimus.(none)>2007-10-25 16:53:18 +1000
commita70fe82baf0ca2be98e02680cff489f90b0ea3de (patch)
tree5318423fc677397e815bb0223981da6547b2e985
parentc5f158abbe97492f56eb60ac54679945e9d6ddae (diff)
i915: relocate buffers before validation add memory barrier between two
-rw-r--r--shared-core/i915_dma.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index acbb41dc..1e15e7ce 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -964,6 +964,13 @@ int i915_validate_buffer_list(struct drm_file *file_priv,
buf_handle = req->bo_req.handle;
buf_reloc_handle = arg.reloc_handle;
+ if (buf_reloc_handle) {
+ ret = i915_exec_reloc(file_priv, buf_handle, buf_reloc_handle, buffers, buf_count);
+ if (ret)
+ goto out_err;
+ DRM_MEMORYBARRIER();
+ }
+
rep.ret = drm_bo_handle_validate(file_priv, req->bo_req.handle,
req->bo_req.fence_class,
req->bo_req.flags,
@@ -988,11 +995,6 @@ int i915_validate_buffer_list(struct drm_file *file_priv,
data = next;
buf_count++;
- if (buf_reloc_handle) {
- ret = i915_exec_reloc(file_priv, buf_handle, buf_reloc_handle, buffers, buf_count);
- if (ret)
- goto out_err;
- }
} while (next != 0);
*num_buffers = buf_count;
return 0;