Mesa (master): panfrost: Add pan_bucket helper

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 15 23:14:22 UTC 2019


Module: Mesa
Branch: master
Commit: 9034b5586c61ef04b414fdc433c12943b99b2283
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9034b5586c61ef04b414fdc433c12943b99b2283

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Mon Jul 15 08:51:11 2019 -0700

panfrost: Add pan_bucket helper

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 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




More information about the mesa-commit mailing list