gallium/dri2: Support Arm modifiers
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 20 Jul 2020 22:50:29 +0000 (18:50 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 12 Aug 2020 13:59:14 +0000 (09:59 -0400)
This is needed to share both Utgard-style tiled and a subset of Arm
FrameBuffer Compression (AFBC) tiled framebuffers across processes in
Wayland.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Icecream95 <ixn@keemail.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6159>

src/gallium/frontends/dri/dri2.c

index 3da3a07cf983213da191b0212911d4648573ea23..b6d7d039e208aa8eb1db87aed5958f54da412121 100644 (file)
@@ -850,6 +850,14 @@ dri2_get_modifier_num_planes(uint64_t modifier, int fourcc)
    case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS:
    case I915_FORMAT_MOD_Y_TILED_CCS:
       return 2;
+   case DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED:
+   case DRM_FORMAT_MOD_ARM_AFBC(
+                        AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 |
+                        AFBC_FORMAT_MOD_SPARSE |
+                        AFBC_FORMAT_MOD_YTR):
+   case DRM_FORMAT_MOD_ARM_AFBC(
+                        AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 |
+                        AFBC_FORMAT_MOD_SPARSE):
    case DRM_FORMAT_MOD_BROADCOM_UIF:
    case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
    case DRM_FORMAT_MOD_LINEAR: