winsys/amdgpu: add uncached flag to the imported DRI_PRIME buffer

There's no point in caching this linear buffer since we're only
ever writing to it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13362>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-10-14 15:16:31 +02:00
parent a905072521
commit 8791e831b1

View file

@ -1558,7 +1558,11 @@ static struct pb_buffer *amdgpu_bo_from_handle(struct radeon_winsys *rws,
if (!bo) if (!bo)
goto error; goto error;
r = amdgpu_bo_va_op(result.buf_handle, 0, result.alloc_size, va, 0, AMDGPU_VA_OP_MAP); r = amdgpu_bo_va_op_raw(ws->dev, result.buf_handle, 0, result.alloc_size, va,
AMDGPU_VM_PAGE_READABLE | AMDGPU_VM_PAGE_WRITEABLE |
AMDGPU_VM_PAGE_EXECUTABLE |
(is_prime_linear_buffer ? AMDGPU_VM_MTYPE_UC : 0),
AMDGPU_VA_OP_MAP);
if (r) if (r)
goto error; goto error;