From 17210c63a91aaf018813b0d336f5f1d4fd87eafb Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 26 Apr 2019 18:52:45 -0700 Subject: 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 --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; -- cgit v1.2.3