Mesa (master): panfrost: Prefix schedule_program to prevent collision

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 15 22:47:26 UTC 2020


Module: Mesa
Branch: master
Commit: 62adb6522b4b4f1f31e0828abbe496ecac5035e3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=62adb6522b4b4f1f31e0828abbe496ecac5035e3

Author: Robert Foss <robert.foss at collabora.com>
Date:   Wed Jan 15 01:14:16 2020 +0100

panfrost: Prefix schedule_program to prevent collision

Currently the schedule_program implementation being used is picked
at compile time, which on the Android platform means that the
bifrost compiler & scheduler is used for all targets, including
midgard based hardware.

This commit disambiguates between the two schedule_program functions.

Signed-off-by: Robert Foss <robert.foss at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/panfrost/bifrost/bifrost_compile.c  | 2 +-
 src/panfrost/bifrost/bifrost_sched.c    | 2 +-
 src/panfrost/bifrost/bifrost_sched.h    | 2 +-
 src/panfrost/midgard/compiler.h         | 2 +-
 src/panfrost/midgard/midgard_compile.c  | 2 +-
 src/panfrost/midgard/midgard_schedule.c | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 2af36ee8668..abc981d87bb 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -1041,7 +1041,7 @@ bifrost_compile_shader_nir(nir_shader *nir, struct bifrost_program *program)
                 }
         } while (progress);
 
-        schedule_program(ctx);
+        bifrost_schedule_program(ctx);
 
 #ifdef BI_DEBUG
         nir_print_shader(nir, stdout);
diff --git a/src/panfrost/bifrost/bifrost_sched.c b/src/panfrost/bifrost/bifrost_sched.c
index f9629f8f957..37ae52bac42 100644
--- a/src/panfrost/bifrost/bifrost_sched.c
+++ b/src/panfrost/bifrost/bifrost_sched.c
@@ -374,7 +374,7 @@ remove_extract_elements(compiler_context *ctx, bifrost_block *block)
 }
 
 
-void schedule_program(compiler_context *ctx)
+void bifrost_schedule_program(compiler_context *ctx)
 {
         // XXX: we should move instructions together before RA that can feed in to each other and be scheduled in the same clause
         allocate_registers(ctx);
diff --git a/src/panfrost/bifrost/bifrost_sched.h b/src/panfrost/bifrost/bifrost_sched.h
index cb9d383010a..7edd95a9dfb 100644
--- a/src/panfrost/bifrost/bifrost_sched.h
+++ b/src/panfrost/bifrost/bifrost_sched.h
@@ -24,6 +24,6 @@
 #define bifrost_ra_h
 #include "compiler_defines.h"
 
-void schedule_program(compiler_context *ctx);
+void bifrost_schedule_program(compiler_context *ctx);
 
 #endif /* bifrost_ra_h */
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index 936d2232bae..172b6d70f69 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src/panfrost/midgard/compiler.h
@@ -650,7 +650,7 @@ mir_has_arg(midgard_instruction *ins, unsigned arg)
 
 /* Scheduling */
 
-void schedule_program(compiler_context *ctx);
+void midgard_schedule_program(compiler_context *ctx);
 
 void mir_ra(compiler_context *ctx);
 void mir_squeeze_index(compiler_context *ctx);
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 56a1138197a..291bb3b2709 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -2733,7 +2733,7 @@ midgard_compile_shader_nir(nir_shader *nir, midgard_program *program, bool is_bl
                 mir_add_writeout_loops(ctx);
 
         /* Schedule! */
-        schedule_program(ctx);
+        midgard_schedule_program(ctx);
         mir_ra(ctx);
 
         /* Now that all the bundles are scheduled and we can calculate block
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index 05a0c74cbf8..2106d0d1ace 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -1148,7 +1148,7 @@ schedule_block(compiler_context *ctx, midgard_block *block)
 }
 
 void
-schedule_program(compiler_context *ctx)
+midgard_schedule_program(compiler_context *ctx)
 {
         midgard_promote_uniforms(ctx);
 



More information about the mesa-commit mailing list