From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v3 1/6] lib/igt_fb: fix intel modifiers for fb copying on xe driver
Date: Wed, 8 May 2024 22:17:52 +0300 [thread overview]
Message-ID: <1eb0f28c-76cf-4760-bce2-1ad04e547578@gmail.com> (raw)
In-Reply-To: <20240508145401.y6mng4gxv4rbsle7@kamilkon-DESK.igk.intel.com>
On 8.5.2024 17.54, Kamil Konieczny wrote:
> Hi Juha-Pekka,
> On 2024-04-30 at 19:29:34 +0300, Juha-Pekka Heikkila wrote:
>> mc ccs need to go to vebox copy, blitter doesn't do mc ccs hence
> - ^^^^^^
> Could you decipher here (or even better as a comment in source and
> here) what does 'mc ccs' mean?
It hasn't been common practice to explain any framebuffer modifiers in
detail at this level because they are comprehensively documented in
include/drm-uapi/drm_fourcc.h which is copy from kernel sources.
Leaving comment here now could cause confusion if there come changes,
it's better they're documented in same place where they are defined.
>> on all platforms with ccs modifiers use engine copy for those.
>> Use render engine for x-tile on legacy platforms where x-tile
>> would otherwise endup on fastblit patch which is known to have
>> limitations.
>>
>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>> ---
>> lib/igt_fb.c | 22 +++++++++++++++++-----
>> 1 file changed, 17 insertions(+), 5 deletions(-)
>>
>> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
>> index cc70cb91c..5df5cb08f 100644
>> --- a/lib/igt_fb.c
>> +++ b/lib/igt_fb.c
>> @@ -2508,9 +2508,12 @@ static bool blitter_ok(const struct igt_fb *fb)
>> if (!is_intel_device(fb->fd))
>> return false;
>>
>> - if ((is_ccs_modifier(fb->modifier) &&
>> - !HAS_FLATCCS(intel_get_drm_devid(fb->fd))) ||
>> - is_gen12_mc_ccs_modifier(fb->modifier))
>> + if ((!HAS_FLATCCS(intel_get_drm_devid(fb->fd)) &&
>> + is_ccs_modifier(fb->modifier)) ||
>> + is_gen12_mc_ccs_modifier(fb->modifier) ||
>> + (!blt_uses_extended_block_copy(fb->fd) &&
>> + fb->modifier == I915_FORMAT_MOD_X_TILED &&
>> + is_xe_device(fb->fd)))
>> return false;
>>
>> if (is_xe_device(fb->fd))
>> @@ -2551,6 +2554,7 @@ static bool use_enginecopy(const struct igt_fb *fb)
>> return false;
>>
>> return fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
>> + fb->modifier == I915_FORMAT_MOD_X_TILED ||
>> (!HAS_FLATCCS(intel_get_drm_devid(fb->fd)) && is_ccs_modifier(fb->modifier)) ||
>> is_gen12_mc_ccs_modifier(fb->modifier);
>> }
>> @@ -3062,7 +3066,12 @@ static void free_linear_mapping(struct fb_blit_upload *blit)
>> igt_nouveau_delete_bo(&linear->fb);
>> } else if (is_xe_device(fd)) {
>> gem_munmap(linear->map, linear->fb.size);
>> - blitcopy(fb, &linear->fb);
>> +
>> + if (blit->ibb)
>> + copy_with_engine(blit, fb, &linear->fb);
>> + else
>> + blitcopy(fb, &linear->fb);
>> +
>> gem_close(fd, linear->fb.gem_handle);
>> } else {
>> gem_munmap(linear->map, linear->fb.size);
>> @@ -3142,7 +3151,10 @@ static void setup_linear_mapping(struct fb_blit_upload *blit)
>>
>> linear->map = igt_nouveau_mmap_bo(&linear->fb, PROT_READ | PROT_WRITE);
>> } else if (is_xe_device(fd)) {
>> - blitcopy(&linear->fb, fb);
>> + if (blit->ibb)
>> + copy_with_engine(blit, &linear->fb, fb);
>> + else
>> + blitcopy(&linear->fb, fb);
>
> This is repeated code, what about a function like:
>
> copy_with_engine_or_blit(blit, &linear->fb, fb);
That's good idea, this type restructuring will go into a new patch. Most
of this set already is just about restructuring blitter path to be more
readable. But scope of this patch is about fixing mc ccs and x-tile path
on all platforms.
/Juha-Pekka
>
>>
>> linear->map = xe_bo_mmap_ext(fd, linear->fb.gem_handle,
>> linear->fb.size, PROT_READ | PROT_WRITE);
>> --
>> 2.25.1
>>
next prev parent reply other threads:[~2024-05-08 19:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 16:29 [PATCH i-g-t v3 0/6] Intel blitter framebuffer copying sanitizing Juha-Pekka Heikkila
2024-04-30 16:29 ` [PATCH i-g-t v3 1/6] lib/igt_fb: fix intel modifiers for fb copying on xe driver Juha-Pekka Heikkila
2024-05-08 14:54 ` Kamil Konieczny
2024-05-08 19:17 ` Juha-Pekka Heikkila [this message]
2024-05-09 9:47 ` Zbigniew Kempczyński
2024-05-13 16:46 ` Juha-Pekka Heikkila
2024-04-30 16:29 ` [PATCH i-g-t v3 2/6] lib/igt_fb: make blt_compression_format function more readable Juha-Pekka Heikkila
2024-05-09 10:12 ` Zbigniew Kempczyński
2024-04-30 16:29 ` [PATCH i-g-t v3 3/6] lib/igt_fb: Sanitize blt_fb_init Juha-Pekka Heikkila
2024-05-09 10:21 ` Zbigniew Kempczyński
2024-04-30 16:29 ` [PATCH i-g-t v3 4/6] lib/igt_fb: separate intel blitter context setup from blitter function Juha-Pekka Heikkila
2024-05-09 10:28 ` Zbigniew Kempczyński
2024-04-30 16:29 ` [PATCH i-g-t v3 5/6] lib/igt_fb: put intel blt cleanup into its own function Juha-Pekka Heikkila
2024-05-09 10:31 ` Zbigniew Kempczyński
2024-04-30 16:29 ` [PATCH i-g-t v3 6/6] lib/igt_fb: unify intel blitter fb block copies between xe and i915 Juha-Pekka Heikkila
2024-05-09 10:36 ` Zbigniew Kempczyński
2024-04-30 20:17 ` ✓ Fi.CI.BAT: success for Intel blitter framebuffer copying sanitizing (rev6) Patchwork
2024-04-30 20:34 ` ✗ CI.xeBAT: failure " Patchwork
2024-05-01 0:47 ` ✗ CI.xeFULL: " Patchwork
2024-05-07 13:18 ` Juha-Pekka Heikkila
2024-05-09 5:38 ` Illipilli, TejasreeX
2024-05-01 4:42 ` ✗ Fi.CI.IGT: " Patchwork
2024-05-09 10:04 ` ✓ Fi.CI.IGT: success " Patchwork
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=1eb0f28c-76cf-4760-bce2-1ad04e547578@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
/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