From d2328646b229fc8cadc70d1ec2d2d6df7b5b6090 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 2 Oct 2020 14:12:45 -0400 Subject: [PATCH] pan/bi: Use canonical term dependency Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bi_pack.c | 8 ++++---- src/panfrost/bifrost/bifrost.h | 8 ++++++-- src/panfrost/bifrost/disassemble.c | 31 +++++++++++++++---------------- 3 files changed, 25 insertions(+), 22 deletions(-) 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 @@ bi_pack_header(bi_clause *clause, bi_clause *next_1, bi_clause *next_2, bool is_ /* 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 @@ bi_pack_header(bi_clause *clause, bi_clause *next_1, bi_clause *next_2, bool is_ .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 @@ struct bifrost_header { * 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 @@ struct bifrost_reg_ctrl { 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 @@ static void dump_header(FILE *fp, struct bifrost_header header, bool verbose) 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 @@ static void dump_header(FILE *fp, struct bifrost_header header, bool verbose) 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"); } -- 2.7.4