[PATCH i-g-t v2 16/18] tests/kms_ccs: Fix planar blits for xe2

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Mon Sep 23 16:53:02 UTC 2024


Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

On 18.9.2024 15.05, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Try to handle each color plane of planar formats
> correctly in the xe2 blitter code.
> 
> TODO: combine with the blitter code in igt_fb.c
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>   tests/intel/kms_ccs.c | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
> index 971d9fe0fcae..bb18784e6fac 100644
> --- a/tests/intel/kms_ccs.c
> +++ b/tests/intel/kms_ccs.c
> @@ -629,9 +629,10 @@ static struct blt_copy_object *blt_fb_init(const struct igt_fb *fb,
>   	return blt;
>   }
>   
> -static enum blt_color_depth blt_get_bpp(const struct igt_fb *fb)
> +static enum blt_color_depth blt_get_bpp(const struct igt_fb *fb,
> +					int color_plane)
>   {
> -	switch (fb->plane_bpp[0]) {
> +	switch (fb->plane_bpp[color_plane]) {
>   	case 8:
>   		return CD_8bit;
>   	case 16:
> @@ -706,18 +707,18 @@ static void xe2_ccs_blit(data_t *data, struct igt_fb *fb, struct igt_fb *temp_fb
>   		dst = blt_fb_init(dst_fb, i, mem_region, intel_get_pat_idx_wt(dst_fb->fd));
>   
>   		blt_copy_init(src_fb->fd, &blt);
> -		blt.color_depth = blt_get_bpp(src_fb);
> +		blt.color_depth = blt_get_bpp(src_fb, i);
>   		blt_set_copy_object(&blt.src, src);
>   		blt_set_copy_object(&blt.dst, dst);
>   
>   		blt_set_object_ext(&ext.src,
>   				blt_compression_format(&blt, src_fb),
> -				src_fb->width, src_fb->height,
> +				src_fb->plane_width[i], src_fb->plane_height[i],
>   				SURFACE_TYPE_2D);
>   
>   		blt_set_object_ext(&ext.dst,
>   				blt_compression_format(&blt, dst_fb),
> -				dst_fb->width, dst_fb->height,
> +				dst_fb->plane_width[i], dst_fb->plane_height[i],
>   				SURFACE_TYPE_2D);
>   
>   		pext = &ext;



More information about the igt-dev mailing list