From: Alyssa Rosenzweig Date: Fri, 29 May 2020 23:24:45 +0000 (-0400) Subject: panfrost: Probe G31/G52 if PAN_MESA_DEBUG=bifrost X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bccb3deee2995e68a7f8a63d857f2cd298ff8361;p=mesa.git 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: --- 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;