From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/3] lib/igt_fb: use blitter for rendercompression on Intel hw with flat ccs
Date: Wed, 31 May 2023 22:21:04 +0300 [thread overview]
Message-ID: <20230531192104.6307-4-juhapekka.heikkila@gmail.com> (raw)
In-Reply-To: <20230531192104.6307-1-juhapekka.heikkila@gmail.com>
When on flat ccs use blitter for doing rc ccs and rc ccs cc instead
of rendercopy
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
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 b3fc3766..fd84ef24 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2486,7 +2486,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++) {
@@ -2833,9 +2835,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);
@@ -2851,7 +2856,7 @@ static void blitcopy(const struct igt_fb *dst_fb,
mem_region) == 0);
}
- 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.25.1
next prev parent reply other threads:[~2023-05-31 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 19:21 [igt-dev] [PATCH i-g-t 0/3] Try to have one less blitter path Juha-Pekka Heikkila
2023-05-31 19:21 ` [igt-dev] [PATCH i-g-t 1/3] lib/i915/i915_blt: Add offset to block and fast copy Juha-Pekka Heikkila
2023-05-31 19:21 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_fb: switch blitcopy to use lib/i915/i915_blt functions Juha-Pekka Heikkila
2023-06-07 6:47 ` Zbigniew Kempczyński
2023-05-31 19:21 ` Juha-Pekka Heikkila [this message]
2023-05-31 21:31 ` [igt-dev] ✓ Fi.CI.BAT: success for Try to have one less blitter path Patchwork
2023-06-02 12:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-03-28 18:30 [igt-dev] [PATCH i-g-t 0/3] switch lib/igt_fb.c to use lib/i915/i915_blt functions for blitter on Intel hw Juha-Pekka Heikkila
2023-03-28 18:30 ` [igt-dev] [PATCH i-g-t 3/3] lib/igt_fb: use blitter for rendercompression on Intel hw with flat ccs Juha-Pekka Heikkila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230531192104.6307-4-juhapekka.heikkila@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox