Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] lib/igt_fb: fix intel modifiers for fb copying on xe driver
Date: Tue, 26 Mar 2024 15:37:37 +0530	[thread overview]
Message-ID: <df8ea083-6c18-41cf-9912-7f0a80d648da@intel.com> (raw)
In-Reply-To: <20240322120914.205342-1-juhapekka.heikkila@gmail.com>


On 22-03-2024 05:39 pm, Juha-Pekka Heikkila wrote:
> legacy blitter doesn't handle x-tile well so use rendercopy instead.
> mc ccs need to go to vebox copy, blitter doesn't do mc ccs hence
> on all platforms with ccs modifiers use engine copy for those.

Do we need to split this patch into two (1: x-tile, 2: mc ccs)?

Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

- Bhanu

> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>   lib/igt_fb.c | 25 ++++++++++++++++++-------
>   1 file changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index cc70cb91c..9557492cf 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -2508,11 +2508,13 @@ 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 (is_ccs_modifier(fb->modifier))
>   		return false;
>   
> +	if (!blt_uses_extended_block_copy(fb->fd) &&
> +	    fb->modifier == I915_FORMAT_MOD_X_TILED)
> +	    return false;
> +
>   	if (is_xe_device(fb->fd))
>   		return true;
>   
> @@ -2551,8 +2553,9 @@ static bool use_enginecopy(const struct igt_fb *fb)
>   		return false;
>   
>   	return fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
> -	       (!HAS_FLATCCS(intel_get_drm_devid(fb->fd)) && is_ccs_modifier(fb->modifier)) ||
> -	       is_gen12_mc_ccs_modifier(fb->modifier);
> +	       is_ccs_modifier(fb->modifier) ||
> +	       (!blt_uses_extended_block_copy(fb->fd) &&
> +	       fb->modifier == I915_FORMAT_MOD_X_TILED);
>   }
>   
>   static bool use_blitter(const struct igt_fb *fb)
> @@ -3062,7 +3065,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 +3150,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);
>   
>   		linear->map = xe_bo_mmap_ext(fd, linear->fb.gem_handle,
>   					     linear->fb.size, PROT_READ | PROT_WRITE);

  parent reply	other threads:[~2024-03-26 10:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 12:09 [PATCH i-g-t] lib/igt_fb: fix intel modifiers for fb copying on xe driver Juha-Pekka Heikkila
2024-03-22 13:03 ` ✓ CI.xeBAT: success for " Patchwork
2024-03-22 13:17 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-22 14:21 ` ✓ CI.xeBAT: success for lib/igt_fb: fix intel modifiers for fb copying on xe driver (rev3) Patchwork
2024-03-22 14:35 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-25 10:24 ` ✓ Fi.CI.BAT: success for lib/igt_fb: fix intel modifiers for fb copying on xe driver (rev4) Patchwork
2024-03-25 10:48 ` ✓ CI.xeBAT: " Patchwork
2024-03-25 13:54 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-26 10:07 ` Modem, Bhanuprakash [this message]
2024-03-26 15:10   ` [PATCH i-g-t] lib/igt_fb: fix intel modifiers for fb copying on xe driver 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=df8ea083-6c18-41cf-9912-7f0a80d648da@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.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