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

Akshata Jahagirdar akshata.jahagirdar at intel.com
Thu Apr 4 17:52:35 UTC 2024


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.

Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
---
 tests/intel/xe_ccs.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/intel/xe_ccs.c b/tests/intel/xe_ccs.c
index ad2eeb259..befbbe605 100644
--- a/tests/intel/xe_ccs.c
+++ b/tests/intel/xe_ccs.c
@@ -193,7 +193,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);
 
 	/* retrieve back ccs */
 	memcpy(ccsmap, ccscopy, ccssize);
@@ -365,8 +366,9 @@ static void block_copy(int xe,
 	 * xmajor.
 	 */
 	if (mid->compression && MIN_EXP_WH(width, height)) {
-		if (mid_tiling != T_LINEAR || FROM_EXP_WH(width, height))
-			igt_assert(memcmp(src->ptr, mid->ptr, src->size) != 0);
+		if (AT_LEAST_GEN(xe, 20) && !blt_platform_has_flat_ccs_enabled(xe))
+			if (mid_tiling != T_LINEAR || FROM_EXP_WH(width, height))
+				igt_assert(memcmp(src->ptr, mid->ptr, src->size) != 0);
 	}
 
 	WRITE_PNG(xe, run_id, "mid", &blt.dst, width, height, bpp);
-- 
2.34.1



More information about the igt-dev mailing list