pan/bi: Use canonical term dependency
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7081>
diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c
index 235b580..01c4a79 100644
--- a/src/panfrost/bifrost/bi_pack.c
+++ b/src/panfrost/bifrost/bi_pack.c
@@ -41,8 +41,8 @@
/* next_dependencies are the union of the dependencies of successors'
* dependencies */
- unsigned scoreboard_deps = next_1 ? next_1->dependencies : 0;
- scoreboard_deps |= next_2 ? next_2->dependencies : 0;
+ unsigned dependency_wait = next_1 ? next_1->dependencies : 0;
+ dependency_wait |= next_2 ? next_2->dependencies : 0;
struct bifrost_header header = {
.back_to_back = clause->back_to_back,
@@ -51,8 +51,8 @@
.next_clause_prefetch = clause->next_clause_prefetch,
.staging_barrier = clause->staging_barrier,
.staging_register = clause->staging_register,
- .scoreboard_deps = scoreboard_deps,
- .scoreboard_index = clause->scoreboard_id,
+ .dependency_wait = dependency_wait,
+ .dependency_slot = clause->scoreboard_id,
.message_type = clause->message_type,
.next_message_type = next_1 ? next_1->message_type : 0,
.suppress_inf = true,
diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h
index 633136d..497dc3b 100644
--- a/src/panfrost/bifrost/bifrost.h
+++ b/src/panfrost/bifrost/bifrost.h
@@ -103,8 +103,12 @@
* that it is safe for the next clause to write them. */
unsigned staging_barrier: 1;
unsigned staging_register : 6;
- unsigned scoreboard_deps: 8;
- unsigned scoreboard_index: 3;
+
+ /* Slots to wait on and slot to be used for message passing
+ * instructions respectively */
+ unsigned dependency_wait : 8;
+ unsigned dependency_slot : 3;
+
enum bifrost_message_type message_type : 5;
enum bifrost_message_type next_message_type : 5;
} __attribute__((packed));
diff --git a/src/panfrost/bifrost/disassemble.c b/src/panfrost/bifrost/disassemble.c
index f610c29..3183d3a 100644
--- a/src/panfrost/bifrost/disassemble.c
+++ b/src/panfrost/bifrost/disassemble.c
@@ -75,7 +75,7 @@
static void dump_header(FILE *fp, struct bifrost_header header, bool verbose)
{
- fprintf(fp, "id(%du) ", header.scoreboard_index);
+ fprintf(fp, "ds(%du) ", header.dependency_slot);
if (header.message_type != 0) {
const char *name = bi_message_type_name(header.message_type);
@@ -86,21 +86,6 @@
fprintf(fp, "%s ", name);
}
- if (header.scoreboard_deps != 0) {
- fprintf(fp, "next-wait(");
- bool first = true;
- for (unsigned i = 0; i < 8; i++) {
- if (header.scoreboard_deps & (1 << i)) {
- if (!first) {
- fprintf(fp, ", ");
- }
- fprintf(fp, "%d", i);
- first = false;
- }
- }
- fprintf(fp, ") ");
- }
-
if (header.staging_barrier)
fprintf(fp, "osrb ");
@@ -146,6 +131,20 @@
if (header.next_message_type)
fprintf(fp, "next_%s ", bi_message_type_name(header.next_message_type));
+ if (header.dependency_wait != 0) {
+ fprintf(fp, "dwb(");
+ bool first = true;
+ for (unsigned i = 0; i < 8; i++) {
+ if (header.dependency_wait & (1 << i)) {
+ if (!first) {
+ fprintf(fp, ", ");
+ }
+ fprintf(fp, "%d", i);
+ first = false;
+ }
+ }
+ fprintf(fp, ") ");
+ }
fprintf(fp, "\n");
}