[igt-dev] [v2] tests/kms_available_modes_crc: Enable test for ARGB888/ABGR8888

Vandita Kulkarni vandita.kulkarni at intel.com
Fri Jun 22 09:05:23 UTC 2018


icl onwards hw supports bypass for 0xff and 0x00 per-pixel alpha,
fixing the crc mismatch problem.
Hence enabling this test for ARGB8888/ABGR8888 format planes.

v2: Skip the tests on gen9 and gen10 only. (Maarten)

Signed-off-by: Vandita Kulkarni <vandita.kulkarni at intel.com>
---
 tests/kms_available_modes_crc.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index b70ef5d..2fbfc30 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -143,7 +143,7 @@ static const struct {
 	 * and getting crc is skipped.
 	 */
 	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
+	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0xffffffff},
 
 	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
@@ -223,21 +223,25 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		writesize = data->size+data->size/2;
 		break;
 	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
+		ptemp_32_buf = (unsigned int *)data->buf;
+		for (c = 0; c < data->size/4; c++)
+			ptemp_32_buf[c] = fillers[i].value;
+		writesize = data->size;
 		/*
-		 * special for cursor plane where blending works correctly.
+		 * Skip the tests on gen9 and gen10 as there
+		 * is a hw bug causing crc mismatch on non cursor
+		 * planes when per pixel alpha is 0xff or 00.
+		 * HW WA to fix this bug on non cursor planes
+		 * is added from icl onwards.
 		 */
-			ptemp_32_buf = (unsigned int*)data->buf;
-			for (c = 0; c < data->size/4; c++)
-				ptemp_32_buf[c] = fillers[i].value;
-			writesize = data->size;
-			break;
+		if (IS_GEN9(intel_get_drm_devid(data->gfx_fd)) ||
+			IS_GEN10(intel_get_drm_devid(data->gfx_fd)) &&
+			plane->type != DRM_PLANE_TYPE_CURSOR) {
+			igt_info("Format %s CRC comparison skipped by design.\n",
+				 (char *)&fillers[i].fourcc);
+			return false;
 		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
+		break;
 	default:
 		igt_info("Unsupported mode for test %s\n",
 			 (char*)&fillers[i].fourcc);
-- 
1.9.1



More information about the igt-dev mailing list