mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-09 20:30:14 +01:00
i915: relocate buffers before validation add memory barrier between two
This commit is contained in:
parent
c5f158abbe
commit
a70fe82baf
1 changed files with 7 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue