From a42bf9a29707cf503c56201e90aff2bbc5f685ca Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Wed, 11 Sep 2019 15:34:46 -0700 Subject: [PATCH] gallium/dri2: Report I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS num_planes Return the expected number of planes in a DMA buffer that has the I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS modifier. Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/frontends/dri/dri2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index 43c57c1288a..8c62e8bd3da 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -847,9 +847,10 @@ dri2_get_modifier_num_planes(uint64_t modifier, int fourcc) return 0; switch (modifier) { + case I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS: case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS: case I915_FORMAT_MOD_Y_TILED_CCS: - return 2; + return 2 * util_format_get_num_planes(map->pipe_format); case DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED: case DRM_FORMAT_MOD_ARM_AFBC( AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 |