From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9B78F10E4A4 for ; Tue, 28 Mar 2023 18:30:51 +0000 (UTC) Received: by mail-lf1-x135.google.com with SMTP id j11so16989946lfg.13 for ; Tue, 28 Mar 2023 11:30:51 -0700 (PDT) From: Juha-Pekka Heikkila To: igt-dev@lists.freedesktop.org Date: Tue, 28 Mar 2023 21:30:43 +0300 Message-Id: <20230328183043.16258-4-juhapekka.heikkila@gmail.com> In-Reply-To: <20230328183043.16258-1-juhapekka.heikkila@gmail.com> References: <20230328183043.16258-1-juhapekka.heikkila@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t 3/3] lib/igt_fb: use blitter for rendercompression on Intel hw with flat ccs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: When on flat ccs use blitter for doing rc ccs and rc ccs cc instead of rendercopy Signed-off-by: Juha-Pekka Heikkila --- lib/igt_fb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 7668fc553..c8ef3b2e6 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -2452,7 +2452,9 @@ static bool blitter_ok(const struct igt_fb *fb) if (!is_i915_device(fb->fd)) return false; - if (is_ccs_modifier(fb->modifier)) + if ((is_ccs_modifier(fb->modifier) && + !HAS_FLATCCS(intel_get_drm_devid(fb->fd))) + || is_gen12_mc_ccs_modifier(fb->modifier)) return false; for (int i = 0; i < fb->num_planes; i++) { @@ -2808,9 +2810,12 @@ static void blitcopy(const struct igt_fb *dst_fb, struct blt_block_copy_data_ext ext = {}, *pext = NULL; uint32_t mem_region = HAS_FLATCCS(intel_get_drm_devid(src_fb->fd)) ? REGION_LMEM(0) : REGION_SMEM; + /* To ignore CC plane */ + uint32_t src_cc = src_fb->modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ? 1 : 0; + uint32_t dst_cc = dst_fb->modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ? 1 : 0; igt_assert_eq(dst_fb->fd, src_fb->fd); - igt_assert_eq(dst_fb->num_planes, src_fb->num_planes); + igt_assert_eq(dst_fb->num_planes - dst_cc, src_fb->num_planes - src_cc); src_tiling = igt_fb_mod_to_tiling(src_fb->modifier); dst_tiling = igt_fb_mod_to_tiling(dst_fb->modifier); @@ -2831,7 +2836,7 @@ static void blitcopy(const struct igt_fb *dst_fb, } } - for (int i = 0; i < dst_fb->num_planes; i++) { + for (int i = 0; i < dst_fb->num_planes - dst_cc; i++) { igt_assert_eq(dst_fb->plane_bpp[i], src_fb->plane_bpp[i]); igt_assert_eq(dst_fb->plane_width[i], src_fb->plane_width[i]); igt_assert_eq(dst_fb->plane_height[i], src_fb->plane_height[i]); -- 2.39.0