From 48f51e9dbbd8cea2759f4cd7efda2ff397afc35d Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 15 Jul 2019 09:17:12 -0700 Subject: [PATCH] panfrost: Implement panfrost_bo_cache_evict_all Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_bo_cache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; } -- 2.30.2