From 210db65b1a10429fa109ff7a54a8a230d05575fa Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Fri, 9 Oct 2020 22:39:40 +1300 Subject: [PATCH] panfrost: Add a debug flag to disable AFBC Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_screen.c | 4 ++++ src/panfrost/lib/pan_util.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index e8092afd147..704d129c81c 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -65,6 +65,7 @@ static const struct debug_named_value debug_options[] = { {"nofp16", PAN_DBG_NOFP16, "Disable 16-bit support"}, {"bifrost", PAN_DBG_BIFROST, "Enable experimental Mali G31 and G52 support"}, {"gl3", PAN_DBG_GL3, "Enable experimental GL 3.x implementation, up to 3.3"}, + {"noafbc", PAN_DBG_NO_AFBC, "Disable AFBC support"}, DEBUG_NAMED_VALUE_END }; @@ -695,6 +696,9 @@ panfrost_create_screen(int fd, struct renderonly *ro) dev->debug = debug_get_flags_option("PAN_MESA_DEBUG", debug_options, 0); + if (dev->debug & PAN_DBG_NO_AFBC) + dev->quirks |= MIDGARD_NO_AFBC; + if (ro) { dev->ro = renderonly_dup(ro); if (!dev->ro) { diff --git a/src/panfrost/lib/pan_util.h b/src/panfrost/lib/pan_util.h index 5f40fc93633..740cc26abd0 100644 --- a/src/panfrost/lib/pan_util.h +++ b/src/panfrost/lib/pan_util.h @@ -37,5 +37,6 @@ #define PAN_DBG_NOFP16 0x0040 #define PAN_DBG_BIFROST 0x0080 #define PAN_DBG_GL3 0x0100 +#define PAN_DBG_NO_AFBC 0x0200 #endif /* PAN_UTIL_H */