summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIcecream95 <ixn@keemail.me>2020-10-09 22:39:40 +1300
committerMarge Bot <eric+marge@anholt.net>2020-10-10 00:39:21 +0000
commit210db65b1a10429fa109ff7a54a8a230d05575fa (patch)
treeef6b824eb54f92cab142485db4e3bf2947d8beb0
parent205f1d79e2464bf565dd02a9cb86ad7e5a3bf29d (diff)
panfrost: Add a debug flag to disable AFBC
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7076>
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.c4
-rw-r--r--src/panfrost/lib/pan_util.h1
2 files changed, 5 insertions, 0 deletions
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 */