panfrost: Update SET_VALUE with information from igt
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 4 Dec 2019 13:59:29 +0000 (08:59 -0500)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 6 Dec 2019 14:37:17 +0000 (14:37 +0000)
It's not a tiler specific initialization; it's a generic GPU-side write
primitive that may be used for tiler reset on midgard.

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

index 02dd7f0b66925eb9117a69d20e0664d8e5d9df62..f09e1e6b04a5603e8a9fa625bf457bb82bbbaa7d 100644 (file)
@@ -30,7 +30,7 @@
 /*
  * Within a batch (panfrost_job), there are various types of Mali jobs:
  *
- *  - SET_VALUE: initializes tiler
+ *  - SET_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
@@ -278,8 +278,9 @@ panfrost_set_value_job(struct panfrost_batch *batch, mali_ptr polygon_list)
         };
 
         struct mali_payload_set_value payload = {
-                .out = polygon_list,
-                .unknown = 0x3,
+                .address = polygon_list,
+                .value_descriptor = MALI_SET_VALUE_ZERO,
+                .immediate = 0
         };
 
         struct panfrost_transfer transfer = panfrost_allocate_transient(batch, sizeof(job) + sizeof(payload));
index 796be2372ac270cdf8b6392bb267aec61a65fd88..bb033e3566a38447d9927c8189f63fa02d6e1a6d 100644 (file)
@@ -657,9 +657,16 @@ enum mali_exception_access {
         MALI_EXCEPTION_ACCESS_WRITE   = 3
 };
 
+/* Details about set_value from panfrost igt tests which use it as a generic
+ * dword write primitive */
+
+#define MALI_SET_VALUE_ZERO 3
+
 struct mali_payload_set_value {
-        u64 out;
-        u64 unknown;
+        u64 address;
+        u32 value_descriptor;
+        u32 reserved;
+        u64 immediate;
 } __attribute__((packed));
 
 /* Special attributes have a fixed index */
index 89992a76a79abf953f80d6cfe082715eb98c0876..79b3dd9088e85c6b49a1355168d24f68fd0c8887 100644 (file)
@@ -2905,8 +2905,19 @@ pandecode_jc(mali_ptr jc_gpu_va, bool bifrost, unsigned gpu_id)
                         struct mali_payload_set_value *s = payload;
                         pandecode_log("struct mali_payload_set_value payload_%"PRIx64"_%d = {\n", payload_ptr, job_no);
                         pandecode_indent++;
-                        MEMORY_PROP(s, out);
-                        pandecode_prop("unknown = 0x%" PRIX64, s->unknown);
+                        MEMORY_PROP(s, address);
+
+                        if (s->value_descriptor != MALI_SET_VALUE_ZERO) {
+                                pandecode_msg("XXX: unknown value descriptor\n");
+                                pandecode_prop("value_descriptor = 0x%" PRIX32, s->value_descriptor);
+                        }
+
+                        if (s->reserved) {
+                                pandecode_msg("XXX: set value tripped\n");
+                                pandecode_prop("reserved = 0x%" PRIX32, s->reserved);
+                        }
+
+                        pandecode_prop("immediate = 0x%" PRIX64, s->immediate);
                         pandecode_indent--;
                         pandecode_log("};\n");