mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
winsys/amdgpu: fix non-page-aligned sparse buffer creation
ARB_sparse_buffer does not require sparse buffer size to be
page aligned. So we need to align it before VM ops as KMD
will check whether it's aligned and return EINVAL if not.
Fixes: 667da4eaed ("winsys/amdgpu: sparse buffer creation / destruction / commitment")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7104
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18206>
This commit is contained in:
parent
e767f54f28
commit
4fc9125ca2
1 changed files with 1 additions and 1 deletions
|
|
@ -1145,7 +1145,7 @@ amdgpu_bo_sparse_create(struct amdgpu_winsys *ws, uint64_t size,
|
|||
if (r)
|
||||
goto error_va_alloc;
|
||||
|
||||
r = amdgpu_bo_va_op_raw(ws->dev, NULL, 0, size, bo->va,
|
||||
r = amdgpu_bo_va_op_raw(ws->dev, NULL, 0, map_size, bo->va,
|
||||
AMDGPU_VM_PAGE_PRT, AMDGPU_VA_OP_MAP);
|
||||
if (r)
|
||||
goto error_va_map;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue