* I bet someone just thought that would be a cute pun. At least,
* that's how I'd do it. */
- state->bo = panfrost_bo_create(screen, size, PAN_ALLOCATE_EXECUTE);
+ state->bo = panfrost_bo_create(screen, size, PAN_BO_EXECUTE);
memcpy(state->bo->cpu, dst, size);
meta->shader = state->bo->gpu | program.first_tag;
final.shader.first_tag = shader->first_tag;
/* Upload the shader */
- final.shader.bo = panfrost_bo_create(screen, shader->size, PAN_ALLOCATE_EXECUTE);
+ final.shader.bo = panfrost_bo_create(screen, shader->size, PAN_BO_EXECUTE);
memcpy(final.shader.bo->cpu, shader->buffer, shader->size);
/* Pass BO ownership to job */
size = MAX2(size, 4096);
/* GROWABLE BOs cannot be mmapped */
- if (flags & PAN_ALLOCATE_GROWABLE)
- assert(flags & PAN_ALLOCATE_INVISIBLE);
+ if (flags & PAN_BO_GROWABLE)
+ assert(flags & PAN_BO_INVISIBLE);
unsigned translated_flags = 0;
if (screen->kernel_version->version_major > 1 ||
screen->kernel_version->version_minor >= 1) {
- if (flags & PAN_ALLOCATE_GROWABLE)
+ if (flags & PAN_BO_GROWABLE)
translated_flags |= PANFROST_BO_HEAP;
- if (!(flags & PAN_ALLOCATE_EXECUTE))
+ if (!(flags & PAN_BO_EXECUTE))
translated_flags |= PANFROST_BO_NOEXEC;
}
* never map since we don't care about their contents; they're purely
* for GPU-internal use. But we do trace them anyway. */
- if (!(flags & (PAN_ALLOCATE_INVISIBLE | PAN_ALLOCATE_DELAY_MMAP)))
+ if (!(flags & (PAN_BO_INVISIBLE | PAN_BO_DELAY_MMAP)))
panfrost_bo_mmap(screen, bo);
- else if (flags & PAN_ALLOCATE_INVISIBLE) {
+ else if (flags & PAN_BO_INVISIBLE) {
if (pan_debug & PAN_DBG_TRACE)
pandecode_inject_mmap(bo->gpu, NULL, bo->size, NULL);
}
ctx->scratchpad = panfrost_bo_create(screen, 64 * 4 * 4096, 0);
ctx->tiler_heap = panfrost_bo_create(screen, 4096 * 4096,
- PAN_ALLOCATE_INVISIBLE |
- PAN_ALLOCATE_GROWABLE);
+ PAN_BO_INVISIBLE |
+ PAN_BO_GROWABLE);
ctx->tiler_dummy = panfrost_bo_create(screen, 4096,
- PAN_ALLOCATE_INVISIBLE);
+ PAN_BO_INVISIBLE);
assert(ctx->scratchpad && ctx->tiler_heap && ctx->tiler_dummy);
}
/* Create the BO as invisible, as there's no reason to map */
batch->polygon_list = panfrost_bo_create(screen, size,
- PAN_ALLOCATE_INVISIBLE);
+ PAN_BO_INVISIBLE);
panfrost_batch_add_bo(batch, batch->polygon_list);
/* A BO reference has been retained by panfrost_batch_add_bo(),
/* We create a BO immediately but don't bother mapping, since we don't
* care to map e.g. FBOs which the CPU probably won't touch */
- pres->bo = panfrost_bo_create(screen, bo_size, PAN_ALLOCATE_DELAY_MMAP);
+ pres->bo = panfrost_bo_create(screen, bo_size, PAN_BO_DELAY_MMAP);
}
void
/* If we grew in size, reallocate the BO */
if (new_size > rsrc->bo->size) {
panfrost_bo_release(screen, rsrc->bo, true);
- rsrc->bo = panfrost_bo_create(screen, new_size, PAN_ALLOCATE_DELAY_MMAP);
+ rsrc->bo = panfrost_bo_create(screen, new_size, PAN_BO_DELAY_MMAP);
}
}
/* Flags for allocated memory */
/* This memory region is executable */
-#define PAN_ALLOCATE_EXECUTE (1 << 0)
+#define PAN_BO_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)
+#define PAN_BO_GROWABLE (1 << 1)
/* This memory region should not be mapped to the CPU */
-#define PAN_ALLOCATE_INVISIBLE (1 << 2)
+#define PAN_BO_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)
+#define PAN_BO_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)
+#define PAN_BO_DELAY_MMAP (1 << 4)
/* Transient slab size. This is a balance between fragmentation against cache
* locality and ease of bookkeeping */