pan/midgard: Move midgard_is_branch_unit to helpers
authorAfonso Bordado <afonsobordado@az8.co>
Fri, 27 Dec 2019 20:36:36 +0000 (20:36 +0000)
committerAfonso Bordado <afonsobordado@az8.co>
Tue, 31 Dec 2019 20:01:12 +0000 (20:01 +0000)
Signed-off-by: Afonso Bordado <afonsobordado@az8.co>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/helpers.h
src/panfrost/midgard/midgard_compile.c

index 2511a8140c23130925664dfae310e74a5a2c7b56..c41b6ed23c53988c6059c41899c87fc7c514adec 100644 (file)
@@ -337,4 +337,10 @@ midgard_ldst_reg(unsigned reg, unsigned component)
         return packed;
 }
 
+static inline bool
+midgard_is_branch_unit(unsigned unit)
+{
+        return (unit == ALU_ENAB_BRANCH) || (unit == ALU_ENAB_BR_COMPACT);
+}
+
 #endif
index 9afe96f0cfc12bb95493cca3f3d81e65457d754a..b57291dad05a687cf249c11c27016dd553722dc8 100644 (file)
@@ -69,13 +69,6 @@ int midgard_debug = 0;
                do { if (midgard_debug & MIDGARD_DBG_MSGS) \
                        fprintf(stderr, "%s:%d: "fmt, \
                                __FUNCTION__, __LINE__, ##__VA_ARGS__); } while (0)
-
-static bool
-midgard_is_branch_unit(unsigned unit)
-{
-        return (unit == ALU_ENAB_BRANCH) || (unit == ALU_ENAB_BR_COMPACT);
-}
-
 static midgard_block *
 create_empty_block(compiler_context *ctx)
 {