Mesa (master): panfrost: Split bit out of format.unk3

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 1 15:27:08 UTC 2020


Module: Mesa
Branch: master
Commit: 28902ba87e7166688157ea3ba0593eb1a60a5d9b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=28902ba87e7166688157ea3ba0593eb1a60a5d9b

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Fri Apr 24 11:30:03 2020 +0200

panfrost: Split bit out of format.unk3

On Bifrost traces, we can observe that this bit is always enabled.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4832>

---

 src/gallium/drivers/panfrost/pan_mfbd.c | 4 ++++
 src/panfrost/include/panfrost-job.h     | 3 ++-
 src/panfrost/pandecode/decode.c         | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c
index 562a05ff2df..2c011fda002 100644
--- a/src/gallium/drivers/panfrost/pan_mfbd.c
+++ b/src/gallium/drivers/panfrost/pan_mfbd.c
@@ -31,6 +31,9 @@
 static struct mali_rt_format
 panfrost_mfbd_format(struct pipe_surface *surf)
 {
+        struct panfrost_device *dev = pan_device(surf->context->screen);
+        bool is_bifrost = dev->quirks & IS_BIFROST;
+
         /* Explode details on the format */
 
         const struct util_format_description *desc =
@@ -48,6 +51,7 @@ panfrost_mfbd_format(struct pipe_surface *surf)
                 .unk2 = 0x1,
                 .nr_channels = MALI_POSITIVE(desc->nr_channels),
                 .unk3 = 0x4,
+                .unk4 = is_bifrost,
                 .flags = 0x8,
                 .swizzle = panfrost_translate_swizzle_4(swizzle),
                 .no_preload = true
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index d3a538ab53a..827f9287d4f 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -1637,7 +1637,8 @@ struct mali_rt_format {
 
         unsigned nr_channels : 2; /* MALI_POSITIVE */
 
-        unsigned unk3 : 5;
+        unsigned unk3 : 4;
+        unsigned unk4 : 1;
         enum mali_block_format block : 2;
         unsigned flags : 4;
 
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 48b179ab69e..743abc00d13 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -991,6 +991,7 @@ pandecode_rt_format(struct mali_rt_format format)
         pandecode_prop("unk1 = 0x%" PRIx32, format.unk1);
         pandecode_prop("unk2 = 0x%" PRIx32, format.unk2);
         pandecode_prop("unk3 = 0x%" PRIx32, format.unk3);
+        pandecode_prop("unk4 = 0x%" PRIx32, format.unk4);
 
         pandecode_prop("block = %s", pandecode_block_format(format.block));
 



More information about the mesa-commit mailing list