[igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc: Enable test for ARGB888/ABGR8888
Vandita Kulkarni
vandita.kulkarni at intel.com
Thu Jun 21 13:32:00 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.
Signed-off-by: Vandita Kulkarni <vandita.kulkarni at intel.com>
---
tests/kms_available_modes_crc.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index b70ef5d..2c6f707 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,21 @@ 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.
+ * HW WA to fix per-pixel alpha 0x00 and 0xff
+ * on non cursor planes is icl onwards only.
*/
- 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 ((intel_gen(intel_get_drm_devid(data->gfx_fd)) < 11) &&
+ 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