diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-12 15:45:28 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-15 08:03:34 -0700 |
commit | bd4986bafaf97c9b7cbef9033b4a5c5b6ddc898d (patch) | |
tree | ba4e0c589f4c23f25a11be80367dcc868f8330be /src/gallium | |
parent | 2f783ede027edc87041c35ac39f66ebca1b2875a (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_screen.h | 22 |
1 files 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 */ |