/*
* 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
};
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));
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 */
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");