panfrost: Enable YTR where allowed
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 22 Jul 2020 15:08:06 +0000 (11:08 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 12 Aug 2020 13:59:20 +0000 (09:59 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@keemail.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159>

src/gallium/drivers/panfrost/pan_resource.c

index 7606bfb17b530d52c596c2da22ff472b0334b71a..b282331bddec4fccf08831f70839f558242ffe53 100644 (file)
@@ -481,6 +481,9 @@ panfrost_best_modifier(struct panfrost_device *dev,
                         AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 |
                         AFBC_FORMAT_MOD_SPARSE;
 
+                if (panfrost_afbc_can_ytr(pres->base.format))
+                        afbc |= AFBC_FORMAT_MOD_YTR;
+
                 return DRM_FORMAT_MOD_ARM_AFBC(afbc);
         } else if (panfrost_should_tile(dev, pres))
                 return DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED;