From: Kenneth Graunke Date: Sat, 27 Apr 2019 01:52:45 +0000 (-0700) Subject: i965: Force VMA alignment to be a multiple of the page size. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=17210c63a91aaf018813b0d336f5f1d4fd87eafb;p=mesa.git 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 --- 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;