From: Alyssa Rosenzweig Date: Mon, 15 Jul 2019 15:51:11 +0000 (-0700) Subject: panfrost: Add pan_bucket helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9034b5586c61ef04b414fdc433c12943b99b2283;p=mesa.git panfrost: Add pan_bucket helper Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/pan_bo_cache.c b/src/gallium/drivers/panfrost/pan_bo_cache.c index 4fb96c8efb5..bdd7610b400 100644 --- a/src/gallium/drivers/panfrost/pan_bo_cache.c +++ b/src/gallium/drivers/panfrost/pan_bo_cache.c @@ -66,6 +66,12 @@ pan_bucket_index(unsigned size) return (bucket_index - MIN_BO_CACHE_BUCKET); } +static struct list_head * +pan_bucket(struct panfrost_screen *screen, unsigned size) +{ + return &screen->bo_cache[pan_bucket_index(size)]; +} + /* Tries to fetch a BO of sufficient size with the appropriate flags from the * BO cache. If it succeeds, it returns that BO and removes the BO from the * cache. If it fails, it returns NULL signaling the caller to allocate a new