From 9034b5586c61ef04b414fdc433c12943b99b2283 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 15 Jul 2019 08:51:11 -0700 Subject: [PATCH] panfrost: Add pan_bucket helper Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_bo_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.30.2