i965: Force VMA alignment to be a multiple of the page size.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 27 Apr 2019 01:52:45 +0000 (18:52 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 7 May 2019 22:45:56 +0000 (15:45 -0700)
This should happen regardless, but let's be paranoid.

Fixes: 01058a55229 i965: Add virtual memory allocator infrastructure to brw_bufmgr.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_bufmgr.c

index b8795374880bcc37c69e58b0af6d06d94df0d294..43dc63ce3e54b759b129b64794c74e04bdc7dfc9 100644 (file)
@@ -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;