aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-04-26 18:52:45 -0700
committerKenneth Graunke <[email protected]>2019-05-07 15:45:56 -0700
commit17210c63a91aaf018813b0d336f5f1d4fd87eafb (patch)
tree79ec7a9452a2b69c89a9b92e22a56e7d0bf81657 /src
parent15f134c62853ed6679435a9e4ae40e3308fc7453 (diff)
i965: Force VMA alignment to be a multiple of the page size.
This should happen regardless, but let's be paranoid. Fixes: 01058a55229 i965: Add virtual memory allocator infrastructure to brw_bufmgr. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_bufmgr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index b8795374880..43dc63ce3e5 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -402,6 +402,8 @@ vma_alloc(struct brw_bufmgr *bufmgr,
/* Without softpin support, we let the kernel assign addresses. */
assert(brw_using_softpin(bufmgr));
+ alignment = ALIGN(alignment, PAGE_SIZE);
+
struct bo_cache_bucket *bucket = get_bucket_allocator(bufmgr, size);
uint64_t addr;