[PATCH i-g-t 1/1] tests/intel/xe_ccs: fix block-multicopy-inplace subtest

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Fri Jan 12 09:03:10 UTC 2024


On Wed, Jan 10, 2024 at 01:31:26AM -0800, Akshata Jahagirdar wrote:
> Passing correct pat_index based on compression and graphics version,
> fixes the "block-multicopy-inplace" subtest of xe_ccs.
> 
> Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
> ---
>  tests/intel/xe_ccs.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/intel/xe_ccs.c b/tests/intel/xe_ccs.c
> index 596735aaa..ac99ecd1e 100644
> --- a/tests/intel/xe_ccs.c
> +++ b/tests/intel/xe_ccs.c
> @@ -378,8 +378,13 @@ static void block_copy(int xe,
>  	blt_set_object_ext(&ext.src, mid_compression_format, width, height, SURFACE_TYPE_2D);
>  	blt_set_object_ext(&ext.dst, 0, width, height, SURFACE_TYPE_2D);
>  	if (config->inplace) {
> +		uint8_t pat_index = DEFAULT_PAT_INDEX;
> +
> +        if (AT_LEAST_GEN(intel_get_drm_devid(xe), 20) && config->compression)
> +            pat_index = intel_get_pat_idx_uc_comp(xe);
> +		

Please fix whitespacing. Use kernel checkpatch then resubmit.

--
Zbigniew

>  		blt_set_object(&blt.dst, mid->handle, dst->size, mid->region, 0,
> -			       DEFAULT_PAT_INDEX, T_LINEAR, COMPRESSION_DISABLED,
> +			       pat_index, T_LINEAR, COMPRESSION_DISABLED,
>  			       comp_type);
>  		blt.dst.ptr = mid->ptr;
>  	}
> @@ -461,8 +466,13 @@ static void block_multicopy(int xe,
>  	blt_set_copy_object(&blt3.final, final);
>  
>  	if (config->inplace) {
> +		uint8_t pat_index = DEFAULT_PAT_INDEX;
> +
> +        if (AT_LEAST_GEN(intel_get_drm_devid(xe), 20) && config->compression)
> +            pat_index = intel_get_pat_idx_uc_comp(xe);
> +		
>  		blt_set_object(&blt3.dst, mid->handle, dst->size, mid->region,
> -			       mid->mocs_index, DEFAULT_PAT_INDEX, mid_tiling,
> +			       mid->mocs_index, pat_index, mid_tiling,
>  			       COMPRESSION_DISABLED, comp_type);
>  		blt3.dst.ptr = mid->ptr;
>  	}
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list