From: Vasily Khoruzhick Date: Fri, 25 Oct 2019 05:12:30 +0000 (-0700) Subject: lima: align size before trying to fetch BO from cache X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae0b05d8db852cfe4df716e9b6d46c77510214d1;p=mesa.git lima: align size before trying to fetch BO from cache Otherwise we may be looking in wrong bucket Reviewed-by: Erico Nunes Signed-off-by: Vasily Khoruzhick --- diff --git a/src/gallium/drivers/lima/lima_bo.c b/src/gallium/drivers/lima/lima_bo.c index f0015396217..779e23ce1c8 100644 --- a/src/gallium/drivers/lima/lima_bo.c +++ b/src/gallium/drivers/lima/lima_bo.c @@ -289,13 +289,13 @@ struct lima_bo *lima_bo_create(struct lima_screen *screen, { struct lima_bo *bo; + size = align(size, LIMA_PAGE_SIZE); + /* Try to get bo from cache first */ bo = lima_bo_cache_get(screen, size, flags); if (bo) return bo; - size = align(size, LIMA_PAGE_SIZE); - struct drm_lima_gem_create req = { .size = size, .flags = flags,