Mesa (main): panfrost: Don't pretend to support multiplane AFBC

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 26 18:19:26 UTC 2022


Module: Mesa
Branch: main
Commit: e6f3abd5ecb970ccb6cbf446f7a9e2733ac81ffa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e6f3abd5ecb970ccb6cbf446f7a9e2733ac81ffa

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Sat Apr 16 10:28:17 2022 -0400

panfrost: Don't pretend to support multiplane AFBC

This requires tons of driver changes we're not ready for. In the mean time, this
will just get in the way of refactoring AFBC support.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15991>

---

 src/panfrost/lib/pan_layout.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/panfrost/lib/pan_layout.c b/src/panfrost/lib/pan_layout.c
index 8bad94aa995..a5ccdf7692b 100644
--- a/src/panfrost/lib/pan_layout.c
+++ b/src/panfrost/lib/pan_layout.c
@@ -96,15 +96,13 @@ panfrost_afbc_superblock_height(uint64_t modifier)
  * line stride as such.
  */
 static inline unsigned
-panfrost_block_dim(uint64_t modifier, bool width, unsigned plane)
+panfrost_block_dim(uint64_t modifier, bool width)
 {
         if (!drm_is_afbc(modifier)) {
                 assert(modifier == DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED);
                 return 16;
         }
 
-        assert(plane == 0 && "multiplanar formats not supported");
-
         if (width)
                 return panfrost_afbc_superblock_width(modifier);
         else
@@ -211,8 +209,8 @@ pan_image_layout_init(const struct panfrost_device *dev,
         unsigned tile_h = 1, tile_w = 1, tile_shift = 0;
 
         if (tiled || afbc) {
-                tile_w = panfrost_block_dim(layout->modifier, true, 0);
-                tile_h = panfrost_block_dim(layout->modifier, false, 0);
+                tile_w = panfrost_block_dim(layout->modifier, true);
+                tile_h = panfrost_block_dim(layout->modifier, false);
                 if (util_format_is_compressed(format))
                         tile_shift = 2;
         }



More information about the mesa-commit mailing list