iris: Force VMA alignment to be a multiple of the page size.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 27 Apr 2019 01:53:57 +0000 (18:53 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 4 May 2019 02:48:37 +0000 (19:48 -0700)
This should happen regardless, but let's be paranoid.

src/gallium/drivers/iris/iris_bufmgr.c

index 221b21d..11b3885 100644 (file)
@@ -410,6 +410,9 @@ vma_alloc(struct iris_bufmgr *bufmgr,
           uint64_t size,
           uint64_t alignment)
 {
+   /* Force alignment to be some number of pages */
+   alignment = ALIGN(alignment, PAGE_SIZE);
+
    if (memzone == IRIS_MEMZONE_BORDER_COLOR_POOL)
       return IRIS_BORDER_COLOR_POOL_ADDRESS;