panfrost: s/PAN_ALLOCATE_/PAN_BO_/
authorBoris Brezillon <boris.brezillon@collabora.com>
Sat, 14 Sep 2019 11:24:47 +0000 (13:24 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 18 Sep 2019 08:28:55 +0000 (10:28 +0200)
Change the prefix for BO allocation flags to make it consistent with
the rest of the BO API.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_assemble.c
src/gallium/drivers/panfrost/pan_blend_cso.c
src/gallium/drivers/panfrost/pan_bo.c
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_resource.c
src/gallium/drivers/panfrost/pan_screen.h

index de73cf8839a70f0b2f04902fb7510dd62214fd06..cc4822a2361536a66161e78dde525c715488767e 100644 (file)
@@ -82,7 +82,7 @@ panfrost_shader_compile(
          * 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;
 
index 82527a5602ae6ee2af0f11f42dd9eb82955379e8..c61ffe203c4cdb80468e4fa5d5fc9f97b869b9bd 100644 (file)
@@ -272,7 +272,7 @@ panfrost_get_blend_for_context(struct panfrost_context *ctx, unsigned rti)
         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 */
index 9b0e8d943b430dc2c2b03c31b1e9bdf04e2acb91..7f14b3e3638bc94008bb48e1397c94cefec986fa 100644 (file)
@@ -228,16 +228,16 @@ panfrost_bo_create(struct panfrost_screen *screen, size_t size,
         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;
         }
 
@@ -276,9 +276,9 @@ panfrost_bo_create(struct panfrost_screen *screen, size_t size,
          * 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);
         }
index cadb462c5b01b0a7a644b20fd02ca57b5818aa74..f01ddf18b105d7e520185ba8ce2e7cdff3667c71 100644 (file)
@@ -2613,10 +2613,10 @@ panfrost_setup_hardware(struct panfrost_context *ctx)
 
         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);
 }
 
index 7bd062936dd76bd807e32bdd86402943d4be0156..839e19c16442d71844614e5e65fdd9c5ef369108 100644 (file)
@@ -158,7 +158,7 @@ panfrost_batch_get_polygon_list(struct panfrost_batch *batch, unsigned size)
                 /* 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(),
index 766edee3ca6f8f58dd8322c60d8b32e4c8dd5807..91f30450e54cb301f2f51d26302c5c957ba6c98b 100644 (file)
@@ -412,7 +412,7 @@ panfrost_resource_create_bo(struct panfrost_screen *screen, struct panfrost_reso
 
         /* 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
@@ -843,7 +843,7 @@ panfrost_resource_hint_layout(
         /* 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);
         }
 }
 
index 2f0ebd452d53394140ea476c0410ee0777c942be..c93064ad9685721572fdc3fe565ee960bd1c0f04 100644 (file)
@@ -50,22 +50,22 @@ struct panfrost_screen;
 /* 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 */