panfrost: Fix crashes with small BOs

Affects Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671>
This commit is contained in:
Alyssa Rosenzweig 2020-04-21 18:23:00 -04:00 committed by Marge Bot
parent 5c6952108c
commit 133c1aba05
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ panfrost_bo_cache_put(struct panfrost_bo *bo)
return false;
pthread_mutex_lock(&dev->bo_cache.lock);
struct list_head *bucket = pan_bucket(dev, bo->size);
struct list_head *bucket = pan_bucket(dev, MAX2(bo->size, 4096));
struct drm_panfrost_madvise madv;
struct timespec time;