From: Kenneth Graunke Date: Sat, 27 Apr 2019 01:53:57 +0000 (-0700) Subject: iris: Force VMA alignment to be a multiple of the page size. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd4b18d255581e71c152cdef0f475091f6a2a132;p=mesa.git iris: Force VMA alignment to be a multiple of the page size. This should happen regardless, but let's be paranoid. --- diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 221b21d029c..11b3885be29 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -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;