diff options
author | Vasily Khoruzhick <[email protected]> | 2019-10-24 22:12:30 -0700 |
---|---|---|
committer | Vasily Khoruzhick <[email protected]> | 2019-11-01 13:12:03 -0700 |
commit | ae0b05d8db852cfe4df716e9b6d46c77510214d1 (patch) | |
tree | e09ec26e1b97e38b1560dc19716659dfca284e3b | |
parent | 08d6416a1d6b2165b8f231f391eed0e2a3d4d477 (diff) |
lima: align size before trying to fetch BO from cache
Otherwise we may be looking in wrong bucket
Reviewed-by: Erico Nunes <[email protected]>
Signed-off-by: Vasily Khoruzhick <[email protected]>
-rw-r--r-- | src/gallium/drivers/lima/lima_bo.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, |