[PATCH i-g-t v4 2/2] tests/xe_ccs: Update compression check based on flat-ccs enablement

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Fri Apr 12 08:25:41 UTC 2024


On Fri, Apr 12, 2024 at 06:37:30AM -0700, Akshata Jahagirdar wrote:
> In Xe2+ platforms, we need to run this test regardless of the status of
> flat-ccs. Check if the platform supports compression and has flat ccs enabled,
> and if it doesn't, then update the checks based on  compression
> accordingly and  proceed with the test.
> 
> Additionally, On Xe2 dGPU, compression is only supported with VRAM. When copying from
> VRAM -> system memory the KMD uses mapping with uncompressed PAT
> so the copy in system memory is guaranteed to be uncompressed.
> When restoring such buffers from system memory -> VRAM the KMD can't
> easily know which pages were originally compressed, so we always use
> uncompressed -> uncompressed here.
> so this means that there's no need for extra CCS storage on such
> platforms.
> Thats why we shouldn't need to run suspend-resume on xe2 dgpu.

Use !fmt -w 72 to format the commit message (kernel assumes 72, but in
igt we're not that strict and 80 is fine either).

> 
> Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
> Acked-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
> ---
>  tests/intel/xe_ccs.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/intel/xe_ccs.c b/tests/intel/xe_ccs.c
> index b3bf97af7..ce695c80a 100644
> --- a/tests/intel/xe_ccs.c
> +++ b/tests/intel/xe_ccs.c
> @@ -162,8 +162,11 @@ static void surf_copy(int xe,
>  						      (void *)mid->ptr, mid->size);
>  
>  		munmap(ccsmap2, ccssize);
> -		igt_assert(!strcmp(orig, newsum));
> -		igt_assert(!strcmp(orig2, newsum2));
> +		if (AT_LEAST_GEN(xe, 20) && !is_intel_dgfx(xe) &&
> +		    !blt_platform_has_flat_ccs_enabled(xe)) {
> +			igt_assert(!strcmp(orig, newsum));
> +			igt_assert(!strcmp(orig2, newsum2));
> +		}

If I'm not wrong you're stopping verification on Xe platforms (DG2).

>  		g_free(orig);
>  		g_free(orig2);
>  		g_free(newsum);
> @@ -193,7 +196,8 @@ static void surf_copy(int xe,
>  	intel_ctx_xe_sync(ctx, true);
>  	WRITE_PNG(xe, run_id, "corrupted", &blt.dst, dst->x2, dst->y2, bpp);
>  	result = memcmp(src->ptr, dst->ptr, src->size);
> -	igt_assert(result != 0);
> +	if (AT_LEAST_GEN(xe, 20) && !blt_platform_has_flat_ccs_enabled(xe))
> +		igt_assert(result != 0);

Same here.

>  
>  	/* retrieve back ccs */
>  	memcpy(ccsmap, ccscopy, ccssize);
> @@ -365,7 +369,8 @@ static void block_copy(int xe,
>  	 * occurs and ctrl surface will be filled with some not-zeroed values.
>  	 */
>  	if (mid->compression && FROM_EXP_WH(width, height))
> -		igt_assert(blt_surface_is_compressed(xe, ctx, NULL, ahnd, mid));
> +		if (AT_LEAST_GEN(xe, 20) && !blt_platform_has_flat_ccs_enabled(xe))
> +			igt_assert(blt_surface_is_compressed(xe, ctx, NULL, ahnd, mid));

Same here.

--
Zbigniew

>  
>  	WRITE_PNG(xe, run_id, "mid", &blt.dst, width, height, bpp);
>  
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list