Mesa (master): panfrost: Remove PAN_BO_DONT_REUSE

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 13 14:59:52 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Tue May 26 13:10:41 2020 -0400

panfrost: Remove PAN_BO_DONT_REUSE

Equivalent to SHARED.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859>

---

 src/panfrost/encoder/pan_bo.c | 6 +++---
 src/panfrost/encoder/pan_bo.h | 7 +++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/panfrost/encoder/pan_bo.c b/src/panfrost/encoder/pan_bo.c
index 3087387d54a..12ca68f8e49 100644
--- a/src/panfrost/encoder/pan_bo.c
+++ b/src/panfrost/encoder/pan_bo.c
@@ -270,7 +270,7 @@ panfrost_bo_cache_put(struct panfrost_bo *bo)
 {
         struct panfrost_device *dev = bo->dev;
 
-        if (bo->flags & PAN_BO_DONT_REUSE)
+        if (bo->flags & PAN_BO_SHARED)
                 return false;
 
         pthread_mutex_lock(&dev->bo_cache.lock);
@@ -477,7 +477,7 @@ panfrost_bo_import(struct panfrost_device *dev, int fd)
                 bo->dev = dev;
                 bo->gpu = (mali_ptr) get_bo_offset.offset;
                 bo->size = lseek(fd, 0, SEEK_END);
-                bo->flags = PAN_BO_DONT_REUSE | PAN_BO_SHARED;
+                bo->flags = PAN_BO_SHARED;
                 bo->gem_handle = gem_handle;
                 assert(bo->size > 0);
                 p_atomic_set(&bo->refcnt, 1);
@@ -517,7 +517,7 @@ panfrost_bo_export(struct panfrost_bo *bo)
         if (ret == -1)
                 return -1;
 
-        bo->flags |= PAN_BO_DONT_REUSE | PAN_BO_SHARED;
+        bo->flags |= PAN_BO_SHARED;
         return args.fd;
 }
 
diff --git a/src/panfrost/encoder/pan_bo.h b/src/panfrost/encoder/pan_bo.h
index 9ce29e1f7d5..0138beffd28 100644
--- a/src/panfrost/encoder/pan_bo.h
+++ b/src/panfrost/encoder/pan_bo.h
@@ -49,11 +49,10 @@
  * (semantically distinct from INVISIBLE, which cannot never be mmaped) */
 #define PAN_BO_DELAY_MMAP         (1 << 4)
 
-/* Some BOs shouldn't be returned back to the reuse BO cache, use this flag to
- * let the BO logic know about this contraint. */
-#define PAN_BO_DONT_REUSE         (1 << 5)
+/* bit 5 unused */
 
-/* BO is shared across processes (imported or exported) */
+/* BO is shared across processes (imported or exported) and therefore cannot be
+ * cached locally */
 #define PAN_BO_SHARED             (1 << 6)
 
 /* GPU access flags */



More information about the mesa-commit mailing list