From: Alyssa Rosenzweig Date: Thu, 5 Dec 2019 14:06:53 +0000 (-0500) Subject: panfrost: Rename SET_VALUE to WRITE_VALUE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=adf716dc7f17afd841feb86de45dd6bf91678333;p=mesa.git panfrost: Rename SET_VALUE to WRITE_VALUE 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 --- diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index f62d891e196..3b65034b8f8 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -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); diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h index 2a810421caa..c1bee53a610 100644 --- a/src/gallium/drivers/panfrost/pan_job.h +++ b/src/gallium/drivers/panfrost/pan_job.h @@ -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; diff --git a/src/gallium/drivers/panfrost/pan_scoreboard.c b/src/gallium/drivers/panfrost/pan_scoreboard.c index f09e1e6b04a..dfd8bd2e143 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: 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 diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index bb033e3566a..53e4f59f121 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -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; diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 79b3dd9088e..d112f104b43 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -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); }