From: Alyssa Rosenzweig Date: Fri, 12 Jul 2019 22:45:28 +0000 (-0700) Subject: panfrost: Cleanup PAN_ALLOCATE_* X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd4986bafaf97c9b7cbef9033b4a5c5b6ddc898d;p=mesa.git 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 --- 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 */