panfrost: Rename SET_VALUE to WRITE_VALUE
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 5 Dec 2019 14:06:53 +0000 (09:06 -0500)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 6 Dec 2019 14:37:17 +0000 (14:37 +0000)
See
https://lists.freedesktop.org/archives/dri-devel/2019-December/247601.html

Write value emphasises that it's just a generic write primitive.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_job.h
src/gallium/drivers/panfrost/pan_scoreboard.c
src/panfrost/include/panfrost-job.h
src/panfrost/pandecode/decode.c

index f62d891e1964493e0b82a1d0427f699ab91a02a6..3b65034b8f8b938019bf08aa46e60667198d3b48 100644 (file)
@@ -109,7 +109,7 @@ panfrost_emit_midg_tiler(struct panfrost_batch *batch, unsigned vertex_count)
                         t.hierarchy_mask = MALI_TILER_USER;
                         t.polygon_list_size = MALI_TILER_MINIMUM_HEADER_SIZE + 4;
 
-                        /* We don't have a SET_VALUE job, so write the polygon list manually */
+                        /* We don't have a WRITE_VALUE job, so write the polygon list manually */
                         uint32_t *polygon_list_body = (uint32_t *) (tiler_dummy->cpu + header_size);
                         polygon_list_body[0] = 0xa0000000; /* TODO: Just that? */
                 }
@@ -182,7 +182,7 @@ panfrost_clear(
          * the existing batch targeting this FBO has draws. We could probably
          * avoid that by replacing plain clears by quad-draws with a specific
          * color/depth/stencil value, thus avoiding the generation of extra
-         * fragment/set_value jobs.
+         * fragment jobs.
          */
         struct panfrost_batch *batch = panfrost_get_fresh_batch_for_fbo(ctx);
 
index 2a810421caa0c4a0dc300be71d5abc65f1221d56..c1bee53a6101985e0564a912e59cb7dfa4a28c7e 100644 (file)
@@ -100,7 +100,7 @@ struct panfrost_batch {
          * These arrays contain the headers for the "primary batch", our jargon
          * referring to the part of the panfrost_job that actually contains
          * meaningful work. In an OpenGL ES setting, that means the
-         * SET_VALUE/VERTEX/TILER jobs. Excluded is specifically the FRAGMENT
+         * WRITE_VALUE/VERTEX/TILER jobs. Excluded is specifically the FRAGMENT
          * job, which is sent on as a secondary batch containing only a single
          * hardware job. Since there's one and only one FRAGMENT job issued per
          * panfrost_job, there is no need to do any scoreboarding / management;
index f09e1e6b04a5603e8a9fa625bf457bb82bbbaa7d..dfd8bd2e14379942b0ff708900cd5b404b399e8a 100644 (file)
@@ -30,7 +30,7 @@
 /*
  * Within a batch (panfrost_job), there are various types of Mali jobs:
  *
- *  - SET_VALUE: generic write primitive, used to zero tiler field
+ *  - WRITE_VALUE: generic write primitive, used to zero tiler field
  *  - VERTEX: runs a vertex shader
  *  - TILER: runs tiling and sets up a fragment shader
  *  - FRAGMENT: runs fragment shaders and writes out
@@ -267,20 +267,19 @@ panfrost_scoreboard_queue_fused_job_prepend(
         batch->first_tiler = tiler;
 }
 
-/* Generates a set value job, used below as part of TILER job scheduling. */
+/* Generates a write value job, used to initialize the tiler structures. */
 
 static struct panfrost_transfer
-panfrost_set_value_job(struct panfrost_batch *batch, mali_ptr polygon_list)
+panfrost_write_value_job(struct panfrost_batch *batch, mali_ptr polygon_list)
 {
         struct mali_job_descriptor_header job = {
-                .job_type = JOB_TYPE_SET_VALUE,
+                .job_type = JOB_TYPE_WRITE_VALUE,
                 .job_descriptor_size = 1,
         };
 
-        struct mali_payload_set_value payload = {
+        struct mali_payload_write_value payload = {
                 .address = polygon_list,
-                .value_descriptor = MALI_SET_VALUE_ZERO,
-                .immediate = 0
+                .value_descriptor = MALI_WRITE_VALUE_ZERO,
         };
 
         struct panfrost_transfer transfer = panfrost_allocate_transient(batch, sizeof(job) + sizeof(payload));
@@ -290,11 +289,12 @@ panfrost_set_value_job(struct panfrost_batch *batch, mali_ptr polygon_list)
         return transfer;
 }
 
-/* If there are any tiler jobs, there needs to be a corresponding set value job
- * linked to the first vertex job feeding into tiling. */
+/* If there are any tiler jobs, we need to initialize the tiler by writing
+ * zeroes to a magic tiler structure. We do so via a WRITE_VALUE job linked to
+ * the first vertex job feeding into tiling. */
 
 static void
-panfrost_scoreboard_set_value(struct panfrost_batch *batch)
+panfrost_scoreboard_initialize_tiler(struct panfrost_batch *batch)
 {
         /* Check if we even need tiling */
         if (!batch->last_tiler.gpu)
@@ -307,7 +307,7 @@ panfrost_scoreboard_set_value(struct panfrost_batch *batch)
                 MALI_TILER_MINIMUM_HEADER_SIZE);
 
         struct panfrost_transfer job =
-                panfrost_set_value_job(batch, polygon_list);
+                panfrost_write_value_job(batch, polygon_list);
 
         /* Queue it */
         panfrost_scoreboard_queue_compute_job(batch, job);
@@ -350,7 +350,7 @@ void
 panfrost_scoreboard_link_batch(struct panfrost_batch *batch)
 {
         /* Finalize the batch */
-        panfrost_scoreboard_set_value(batch);
+        panfrost_scoreboard_initialize_tiler(batch);
 
         /* Let no_incoming represent the set S described. */
 
@@ -373,7 +373,7 @@ panfrost_scoreboard_link_batch(struct panfrost_batch *batch)
          * Proposition: Given a node N of type T, no more than one other node
          * depends on N.
          *
-         * If type is SET_VALUE: The only dependency added against us is from
+         * If type is WRITE_VALUE: The only dependency added against us is from
          * the first tiler job, so there is 1 dependent.
          *
          * If type is VERTEX: If there is a tiler node, that tiler node depends
index bb033e3566a38447d9927c8189f63fa02d6e1a6d..53e4f59f121c4ecb248d6dbda93bf65f35127a35 100644 (file)
@@ -34,7 +34,7 @@
 enum mali_job_type {
         JOB_NOT_STARTED        = 0,
         JOB_TYPE_NULL = 1,
-        JOB_TYPE_SET_VALUE = 2,
+        JOB_TYPE_WRITE_VALUE = 2,
         JOB_TYPE_CACHE_FLUSH = 3,
         JOB_TYPE_COMPUTE = 4,
         JOB_TYPE_VERTEX = 5,
@@ -657,12 +657,12 @@ enum mali_exception_access {
         MALI_EXCEPTION_ACCESS_WRITE   = 3
 };
 
-/* Details about set_value from panfrost igt tests which use it as a generic
+/* Details about write_value from panfrost igt tests which use it as a generic
  * dword write primitive */
 
-#define MALI_SET_VALUE_ZERO 3
+#define MALI_WRITE_VALUE_ZERO 3
 
-struct mali_payload_set_value {
+struct mali_payload_write_value {
         u64 address;
         u32 value_descriptor;
         u32 reserved;
index 79b3dd9088e85c6b49a1355168d24f68fd0c8887..d112f104b430de35d3bc64e2229e5404d5ef85da 100644 (file)
@@ -309,7 +309,7 @@ pandecode_job_type(enum mali_job_type type)
 
         switch (type) {
                 DEFINE_CASE(NULL);
-                DEFINE_CASE(SET_VALUE);
+                DEFINE_CASE(WRITE_VALUE);
                 DEFINE_CASE(CACHE_FLUSH);
                 DEFINE_CASE(COMPUTE);
                 DEFINE_CASE(VERTEX);
@@ -2901,13 +2901,13 @@ pandecode_jc(mali_ptr jc_gpu_va, bool bifrost, unsigned gpu_id)
                  * reason. */
 
                 switch (h->job_type) {
-                case JOB_TYPE_SET_VALUE: {
-                        struct mali_payload_set_value *s = payload;
-                        pandecode_log("struct mali_payload_set_value payload_%"PRIx64"_%d = {\n", payload_ptr, job_no);
+                case JOB_TYPE_WRITE_VALUE: {
+                        struct mali_payload_write_value *s = payload;
+                        pandecode_log("struct mali_payload_write_value payload_%"PRIx64"_%d = {\n", payload_ptr, job_no);
                         pandecode_indent++;
                         MEMORY_PROP(s, address);
 
-                        if (s->value_descriptor != MALI_SET_VALUE_ZERO) {
+                        if (s->value_descriptor != MALI_WRITE_VALUE_ZERO) {
                                 pandecode_msg("XXX: unknown value descriptor\n");
                                 pandecode_prop("value_descriptor = 0x%" PRIX32, s->value_descriptor);
                         }