summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-15 09:17:12 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-15 16:12:56 -0700
commit48f51e9dbbd8cea2759f4cd7efda2ff397afc35d (patch)
treed1e83a6af95282afe83f643cdf5e73a1f85524ba
parentf02278ae8735e013206ce32fc825aa05a47ec1cb (diff)
panfrost: Implement panfrost_bo_cache_evict_all
Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r--src/gallium/drivers/panfrost/pan_bo_cache.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_bo_cache.c b/src/gallium/drivers/panfrost/pan_bo_cache.c
index 4cbec51a2c1..fba495c1dd6 100644
--- a/src/gallium/drivers/panfrost/pan_bo_cache.c
+++ b/src/gallium/drivers/panfrost/pan_bo_cache.c
@@ -127,7 +127,15 @@ void
panfrost_bo_cache_evict_all(
struct panfrost_screen *screen)
{
- /* Stub */
+ for (unsigned i = 0; i < ARRAY_SIZE(screen->bo_cache); ++i) {
+ struct list_head *bucket = &screen->bo_cache[i];
+
+ list_for_each_entry_safe(struct panfrost_bo, entry, bucket, link) {
+ list_del(&entry->link);
+ panfrost_drm_release_bo(screen, entry, false);
+ }
+ }
+
return;
}