Mesa (master): panfrost: Cleanup PAN_ALLOCATE_*
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 15 15:04:04 UTC 2019
Module: Mesa
Branch: master
Commit: bd4986bafaf97c9b7cbef9033b4a5c5b6ddc898d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd4986bafaf97c9b7cbef9033b4a5c5b6ddc898d
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Fri Jul 12 15:45:28 2019 -0700
panfrost: Cleanup PAN_ALLOCATE_*
While we're at it, prompted by a semantics issue around INVISIBLE, also
add a separate DELAY_MMAP flag.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
src/gallium/drivers/panfrost/pan_screen.h | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_screen.h b/src/gallium/drivers/panfrost/pan_screen.h
index 71536798663..026a23b4541 100644
--- a/src/gallium/drivers/panfrost/pan_screen.h
+++ b/src/gallium/drivers/panfrost/pan_screen.h
@@ -43,10 +43,24 @@ struct panfrost_resource;
struct panfrost_screen;
/* Flags for allocated memory */
-#define PAN_ALLOCATE_EXECUTE (1 << 0)
-#define PAN_ALLOCATE_GROWABLE (1 << 1)
-#define PAN_ALLOCATE_INVISIBLE (1 << 2)
-#define PAN_ALLOCATE_COHERENT_LOCAL (1 << 3)
+
+/* This memory region is executable */
+#define PAN_ALLOCATE_EXECUTE (1 << 0)
+
+/* This memory region should be lazily allocated and grow-on-page-fault. Must
+ * be used in conjunction with INVISIBLE */
+#define PAN_ALLOCATE_GROWABLE (1 << 1)
+
+/* This memory region should not be mapped to the CPU */
+#define PAN_ALLOCATE_INVISIBLE (1 << 2)
+
+/* This memory region will be used for varyings and needs to have the cache
+ * bits twiddled accordingly */
+#define PAN_ALLOCATE_COHERENT_LOCAL (1 << 3)
+
+/* This region may not be used immediately and will not mmap on allocate
+ * (semantically distinct from INVISIBLE, which cannot never be mmaped) */
+#define PAN_ALLOCATE_DELAY_MMAP (1 << 4)
/* Transient slab size. This is a balance between fragmentation against cache
* locality and ease of bookkeeping */
More information about the mesa-commit
mailing list