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@collabora.com>
This commit is contained in:
Alyssa Rosenzweig
2019-07-12 15:45:28 -07:00
parent 2f783ede02
commit bd4986bafa
+18 -4
View File
@@ -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 */