panfrost: Implement panfrost_bo_cache_put
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 15 Jul 2019 16:00:54 +0000 (09:00 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 15 Jul 2019 23:12:56 +0000 (16:12 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_bo_cache.c

index bdd7610b4001e5908f3b0b07ba83ae87e2415185..2b7a5d208a66e299f2f90eb513111509e5f5feed 100644 (file)
@@ -94,8 +94,12 @@ panfrost_bo_cache_put(
                 struct panfrost_screen *screen,
                 struct panfrost_bo *bo)
 {
-        /* Stub */
-        return false;
+        struct list_head *bucket = pan_bucket(screen, bo->size);
+
+        /* Add us to the bucket */
+        list_addtail(&bo->link, bucket);
+
+        return true;
 }
 
 /* Evicts all BOs from the cache. Called during context