From bccb3deee2995e68a7f8a63d857f2cd298ff8361 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 29 May 2020 19:24:45 -0400 Subject: [PATCH] panfrost: Probe G31/G52 if PAN_MESA_DEBUG=bifrost We're not *quite* ready to open the flood gates on Bifrost (a major blocker is CI, which is itself blocked on the lockdowns - expected to be resolved in the coming months..) Nevertheless, let's add a debug option to probe on compatible Bifrost devices to avoid keeping out-of-tree patches around. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_screen.c | 7 +++++++ src/panfrost/encoder/pan_util.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 72cc7e03635..96d5b0d2c19 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -64,6 +64,7 @@ static const struct debug_named_value debug_options[] = { {"precompile", PAN_DBG_PRECOMPILE, "Precompile shaders for shader-db"}, {"gles3", PAN_DBG_GLES3, "Enable experimental GLES3 implementation"}, {"fp16", PAN_DBG_FP16, "Enable buggy experimental (don't use!) fp16"}, + {"bifrost", PAN_DBG_BIFROST, "Enable experimental Mali G31 and G52 support"}, DEBUG_NAMED_VALUE_END }; @@ -705,6 +706,12 @@ panfrost_create_screen(int fd, struct renderonly *ro) case 0x820: /* T820 */ case 0x860: /* T860 */ break; + case 0x7093: /* G31 */ + case 0x7212: /* G52 */ + if (pan_debug & PAN_DBG_BIFROST) + break; + + /* fallthrough */ default: /* Fail to load against untested models */ debug_printf("panfrost: Unsupported model %X", dev->gpu_id); diff --git a/src/panfrost/encoder/pan_util.h b/src/panfrost/encoder/pan_util.h index 320a608e36f..721f0436682 100644 --- a/src/panfrost/encoder/pan_util.h +++ b/src/panfrost/encoder/pan_util.h @@ -36,6 +36,7 @@ #define PAN_DBG_PRECOMPILE 0x0020 #define PAN_DBG_GLES3 0x0040 #define PAN_DBG_FP16 0x0080 +#define PAN_DBG_BIFROST 0x0100 extern int pan_debug; -- 2.30.2