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? */
}
* 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);
* 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;
/*
* 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
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));
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)
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);
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. */
* 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
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,
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;
switch (type) {
DEFINE_CASE(NULL);
- DEFINE_CASE(SET_VALUE);
+ DEFINE_CASE(WRITE_VALUE);
DEFINE_CASE(CACHE_FLUSH);
DEFINE_CASE(COMPUTE);
DEFINE_CASE(VERTEX);
* 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);
}