From: Alyssa Rosenzweig Date: Wed, 4 Dec 2019 13:59:29 +0000 (-0500) Subject: panfrost: Update SET_VALUE with information from igt X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9eae950342fe96c717c740f0827a572cd41d85fc;p=mesa.git panfrost: Update SET_VALUE with information from igt 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 --- diff --git a/src/gallium/drivers/panfrost/pan_scoreboard.c b/src/gallium/drivers/panfrost/pan_scoreboard.c index 02dd7f0b669..f09e1e6b04a 100644 --- a/src/gallium/drivers/panfrost/pan_scoreboard.c +++ b/src/gallium/drivers/panfrost/pan_scoreboard.c @@ -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)); diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index 796be2372ac..bb033e3566a 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -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 */ diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 89992a76a79..79b3dd9088e 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -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");