All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-22 14:28 Juha-Pekka Heikkila
  2019-02-22 15:07 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev13) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-22 14:28 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 242 ++++++++++++++++------------------------
 1 file changed, 95 insertions(+), 147 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..8d68880 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -57,15 +57,14 @@ typedef struct {
 } data_t;
 
 
-static int do_write(int fd, int handle, void *buf, int size)
-{
-	struct drm_i915_gem_pwrite write;
-	memset(&write, 0x00, sizeof(write));
-	write.handle = handle;
-	write.data_ptr = (uintptr_t)buf;
-	write.size = size;
-	write.offset = 0;
-	return igt_ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write);
+static void do_write(int fd, int handle, void *buf, int size)
+{	void *screenbuf;
+
+	gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
+	screenbuf = gem_mmap__gtt(fd, handle, size, PROT_WRITE);
+	memcpy(screenbuf, buf, size);
+	gem_munmap(screenbuf, size);
+	gem_sync(fd, handle);
 }
 
 
@@ -101,17 +100,17 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
 	cairo_destroy(cr);
@@ -121,49 +120,12 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
-	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+	enum		{ BYTES_PP_1 = 1,
+				BYTES_PP_4 = 4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,11 +137,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
-		if( fillers[i].fourcc == format )
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == format)
 			break;
 	}
 
@@ -190,57 +151,12 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
-		igt_info("Unsupported mode for test %s\n",
-			 (char*)&fillers[i].fourcc);
-		return false;
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	do_write(data->gfx_fd, data->gem_handle, (void*)data->buf, writesize);
@@ -271,26 +187,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
 		if (fillers[i].fourcc == format)
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +209,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +285,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == mode)
+			break;
+	}
+
+	if (fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -407,34 +317,37 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 		igt_display_commit2(&data->display, data->commit);
 
 		if (do_crc) {
+			igt_wait_for_vblank(data->gfx_fd, pipe);
+			igt_pipe_crc_drain(data->pipe_crc);
 			igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
 
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -445,14 +358,44 @@ test_available_modes(data_t* data)
 	igt_plane_t *plane;
 	int modeindex;
 	enum pipe pipe;
-	int invalids = 0;
+	int invalids = 0, i, lut_size;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
+
+	struct {
+		uint16_t red;
+		uint16_t green;
+		uint16_t blue;
+		uint16_t reserved;
+	} *lut = NULL;
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
 
+		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
+			lut_size = igt_pipe_get_prop(&data->display, pipe,
+						     IGT_CRTC_GAMMA_LUT_SIZE);
+
+			lut = calloc(sizeof(*lut), lut_size);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+			}
+
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			igt_display_commit2(&data->display, data->commit);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = i * 0xffff / (lut_size - 1);
+				lut[i].green = i * 0xffff / (lut_size - 1);
+				lut[i].blue = i * 0xffff / (lut_size - 1);
+			}
+		}
+
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -467,29 +410,34 @@ test_available_modes(data_t* data)
 			modePlane = drmModeGetPlane(data->gfx_fd,
 						    plane->drm_plane->plane_id);
 
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+
 			for (modeindex = 0;
 			     modeindex < modePlane->count_formats;
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
+
+		if (lut != NULL) {
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			free(lut);
+			lut = NULL;
+		}
+
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev13)
  2019-02-22 14:28 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
@ 2019-02-22 15:07 ` Patchwork
  2019-02-23  0:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2019-02-22 15:07 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: tests/kms_available_modes_crc limit tested fb formats (rev13)
URL   : https://patchwork.freedesktop.org/series/56491/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5654 -> IGTPW_2491
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56491/revisions/13/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2491 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@memory-alloc:
    - fi-ivb-3520m:       NOTRUN -> SKIP [fdo#109271] +48

  * igt@kms_busy@basic-flip-c:
    - fi-skl-6770hq:      PASS -> SKIP [fdo#109271] / [fdo#109278] +2

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-skl-6700k2:      NOTRUN -> SKIP [fdo#109271] +41

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       PASS -> FAIL [fdo#109485]

  * igt@kms_flip@basic-flip-vs-dpms:
    - fi-skl-6770hq:      PASS -> SKIP [fdo#109271] +33

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - {fi-icl-y}:         INCOMPLETE [fdo#108840] -> PASS

  * igt@i915_selftest@live_evict:
    - fi-bsw-kefka:       DMESG-WARN [fdo#107709] -> PASS

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
  [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720


Participating hosts (43 -> 38)
------------------------------

  Additional (2): fi-ivb-3520m fi-skl-6700k2 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u fi-bdw-samus 


Build changes
-------------

    * IGT: IGT_4851 -> IGTPW_2491

  CI_DRM_5654: 30c7f283790b433aa311ef7a7d2b6b428886fb9a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2491: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2491/
  IGT_4851: 2b7dd10a4e2ea0cabff68421fd15e96c99be3cad @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2491/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_available_modes_crc limit tested fb formats (rev13)
  2019-02-22 14:28 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
  2019-02-22 15:07 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev13) Patchwork
@ 2019-02-23  0:31 ` Patchwork
  2019-02-23  1:42 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev14) Patchwork
  2019-02-23  8:47 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2019-02-23  0:31 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: tests/kms_available_modes_crc limit tested fb formats (rev13)
URL   : https://patchwork.freedesktop.org/series/56491/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5654_full -> IGTPW_2491_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56491/revisions/13/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2491_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_eio@reset-stress:
    - shard-glk:          PASS -> FAIL [fdo#105957]

  * igt@gem_exec_big:
    - shard-hsw:          PASS -> TIMEOUT [fdo#107937]

  * igt@gem_userptr_blits@process-exit-gtt:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +23

  * igt@kms_busy@basic-flip-e:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_busy@extended-modeset-hang-oldfb-with-reset-render-f:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_busy@extended-pageflip-hang-newfb-render-a:
    - shard-snb:          PASS -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_busy@extended-pageflip-hang-newfb-render-e:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
    - shard-glk:          PASS -> DMESG-WARN [fdo#107956]

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
    - shard-glk:          PASS -> FAIL [fdo#108145]

  * igt@kms_chv_cursor_fail@pipe-c-256x256-bottom-edge:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +10

  * igt@kms_content_protection@legacy:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108597] / [fdo#108739]

  * igt@kms_cursor_crc@cursor-256x85-random:
    - shard-kbl:          PASS -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x21-onscreen:
    - shard-apl:          NOTRUN -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +4

  * igt@kms_cursor_crc@cursor-alpha-opaque:
    - shard-apl:          PASS -> FAIL [fdo#109350]

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render:
    - shard-snb:          PASS -> SKIP [fdo#109271]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
    - shard-glk:          PASS -> FAIL [fdo#103167] +1
    - shard-apl:          PASS -> FAIL [fdo#103167]
    - shard-kbl:          PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-pwrite:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +64

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-mmap-gtt:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +48

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-fullscreen:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +22

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
    - shard-apl:          PASS -> DMESG-WARN [fdo#108566]

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-kbl:          NOTRUN -> INCOMPLETE [fdo#103665]
    - shard-glk:          PASS -> INCOMPLETE [fdo#103359] / [k.org#198133]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
    - shard-apl:          PASS -> FAIL [fdo#108145]

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
    - shard-glk:          PASS -> FAIL [fdo#103166] +3
    - shard-apl:          PASS -> FAIL [fdo#103166] +4

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
    - shard-kbl:          PASS -> FAIL [fdo#103166] +1

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
    - shard-kbl:          PASS -> FAIL [fdo#109016]

  * igt@kms_setmode@basic:
    - shard-kbl:          PASS -> FAIL [fdo#99912]

  * igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
    - shard-apl:          PASS -> FAIL [fdo#104894] +1

  * igt@kms_vblank@pipe-c-ts-continuation-dpms-rpm:
    - shard-kbl:          PASS -> FAIL [fdo#104894]

  
#### Possible fixes ####

  * igt@kms_color@pipe-a-degamma:
    - shard-kbl:          FAIL [fdo#104782] / [fdo#108145] -> PASS

  * igt@kms_color@pipe-a-gamma:
    - shard-kbl:          FAIL [fdo#104782] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-dpms:
    - shard-kbl:          FAIL [fdo#103232] -> PASS +2

  * igt@kms_cursor_crc@cursor-256x256-random:
    - shard-apl:          FAIL [fdo#103232] -> PASS +2

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
    - shard-glk:          FAIL [fdo#103167] -> PASS +3
    - shard-kbl:          FAIL [fdo#103167] -> PASS +1

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          FAIL [fdo#103167] -> PASS +3

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-snb:          INCOMPLETE [fdo#105411] -> PASS

  * igt@kms_plane@pixel-format-pipe-a-planes-source-clamping:
    - shard-glk:          FAIL [fdo#108948] -> PASS

  * igt@kms_plane@plane-position-covered-pipe-c-planes:
    - shard-apl:          FAIL [fdo#103166] -> PASS +1
    - shard-glk:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_vblank@pipe-b-query-idle-hang:
    - shard-apl:          INCOMPLETE [fdo#103927] -> PASS

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105957]: https://bugs.freedesktop.org/show_bug.cgi?id=105957
  [fdo#107937]: https://bugs.freedesktop.org/show_bug.cgi?id=107937
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108597]: https://bugs.freedesktop.org/show_bug.cgi?id=108597
  [fdo#108739]: https://bugs.freedesktop.org/show_bug.cgi?id=108739
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * IGT: IGT_4851 -> IGTPW_2491
    * Piglit: piglit_4509 -> None

  CI_DRM_5654: 30c7f283790b433aa311ef7a7d2b6b428886fb9a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2491: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2491/
  IGT_4851: 2b7dd10a4e2ea0cabff68421fd15e96c99be3cad @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2491/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev14)
  2019-02-22 14:28 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
  2019-02-22 15:07 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev13) Patchwork
  2019-02-23  0:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-02-23  1:42 ` Patchwork
  2019-02-23  8:47 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2019-02-23  1:42 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: tests/kms_available_modes_crc limit tested fb formats (rev14)
URL   : https://patchwork.freedesktop.org/series/56491/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5655 -> IGTPW_2498
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56491/revisions/14/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2498 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_evict:
    - fi-bsw-kefka:       PASS -> DMESG-WARN [fdo#107709]

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  * igt@runner@aborted:
    - fi-bsw-kefka:       NOTRUN -> FAIL [fdo#107709]

  
#### Possible fixes ####

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-kbl-7567u:       DMESG-WARN [fdo#105602] / [fdo#108529] -> PASS +1

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-bsw-kefka:       SKIP [fdo#109271] -> PASS

  * igt@i915_pm_rpm@basic-rte:
    - fi-bsw-kefka:       FAIL [fdo#108800] -> PASS

  * igt@i915_pm_rpm@module-reload:
    - fi-kbl-7567u:       DMESG-WARN [fdo#108529] -> PASS
    - {fi-icl-y}:         INCOMPLETE [fdo#108840] -> PASS

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-7567u:       DMESG-WARN [fdo#103558] / [fdo#105079] / [fdo#105602] -> PASS

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       FAIL [fdo#109485] -> PASS

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c:
    - fi-kbl-7567u:       SKIP [fdo#109271] -> PASS +33

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
  [fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108529]: https://bugs.freedesktop.org/show_bug.cgi?id=108529
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
  [fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485


Participating hosts (45 -> 37)
------------------------------

  Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-peppy fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-gdg-551 fi-bdw-samus 


Build changes
-------------

    * IGT: IGT_4853 -> IGTPW_2498

  CI_DRM_5655: a40729237602fa7454aaf3355ad3058cad5c6ee9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2498: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2498/
  IGT_4853: 8afdfd8fa9ce17043d9105dedca46ad4555fdcdb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2498/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_available_modes_crc limit tested fb formats (rev14)
  2019-02-22 14:28 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
                   ` (2 preceding siblings ...)
  2019-02-23  1:42 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev14) Patchwork
@ 2019-02-23  8:47 ` Patchwork
  3 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2019-02-23  8:47 UTC (permalink / raw)
  To: igt-dev

== Series Details ==

Series: tests/kms_available_modes_crc limit tested fb formats (rev14)
URL   : https://patchwork.freedesktop.org/series/56491/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5655_full -> IGTPW_2498_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56491/revisions/14/mbox/

Known issues
------------

  Here are the changes found in IGTPW_2498_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_busy@busy-vebox:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +31

  * igt@gem_ctx_param@invalid-param-set:
    - shard-kbl:          NOTRUN -> FAIL [fdo#109674]

  * igt@gem_exec_big:
    - shard-hsw:          PASS -> TIMEOUT [fdo#107937]

  * igt@i915_query@query-topology-unsupported:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] +26

  * igt@kms_atomic_transition@1x-modeset-transitions:
    - shard-apl:          PASS -> INCOMPLETE [fdo#103927]

  * igt@kms_busy@basic-flip-f:
    - shard-apl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_busy@basic-modeset-d:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_busy@basic-modeset-e:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
    - shard-kbl:          NOTRUN -> DMESG-WARN [fdo#107956]

  * igt@kms_chv_cursor_fail@pipe-a-256x256-bottom-edge:
    - shard-snb:          PASS -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_content_protection@legacy:
    - shard-glk:          NOTRUN -> SKIP [fdo#109271] +11

  * igt@kms_cursor_crc@cursor-128x128-sliding:
    - shard-kbl:          NOTRUN -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-128x128-suspend:
    - shard-apl:          PASS -> FAIL [fdo#103191] / [fdo#103232] +1
    - shard-kbl:          PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_cursor_crc@cursor-128x42-onscreen:
    - shard-apl:          NOTRUN -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +5

  * igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
    - shard-glk:          NOTRUN -> FAIL [fdo#105454] / [fdo#106509]

  * igt@kms_flip@2x-plain-flip-fb-recreate:
    - shard-hsw:          PASS -> INCOMPLETE [fdo#103540]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
    - shard-snb:          PASS -> SKIP [fdo#109271] +2

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
    - shard-apl:          NOTRUN -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - shard-apl:          PASS -> FAIL [fdo#103167] +2

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411]

  * igt@kms_frontbuffer_tracking@fbc-rgb565-draw-mmap-gtt:
    - shard-glk:          PASS -> FAIL [fdo#103167] +3

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-indfb-plflip-blt:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +44

  * igt@kms_plane@pixel-format-pipe-a-planes:
    - shard-apl:          PASS -> FAIL [fdo#103166]

  * igt@kms_plane_alpha_blend@pipe-a-alpha-transparant-fb:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb:
    - shard-apl:          NOTRUN -> FAIL [fdo#108145]
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
    - shard-glk:          PASS -> FAIL [fdo#103166] +1

  * igt@kms_setmode@basic:
    - shard-apl:          PASS -> FAIL [fdo#99912]

  
#### Possible fixes ####

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
    - shard-apl:          FAIL [fdo#109660] -> PASS

  * igt@kms_available_modes_crc@available_mode_test_crc:
    - shard-kbl:          FAIL [fdo#106641] -> PASS

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
    - shard-glk:          FAIL [fdo#108145] -> PASS
    - shard-kbl:          FAIL [fdo#107725] / [fdo#108145] -> PASS

  * igt@kms_color@pipe-c-legacy-gamma:
    - shard-glk:          FAIL [fdo#104782] -> PASS

  * igt@kms_cursor_crc@cursor-128x128-dpms:
    - shard-apl:          FAIL [fdo#103232] -> PASS +1

  * igt@kms_cursor_crc@cursor-64x64-random:
    - shard-kbl:          FAIL [fdo#103232] -> PASS

  * igt@kms_cursor_crc@cursor-alpha-opaque:
    - shard-glk:          FAIL [fdo#109350] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff:
    - shard-apl:          FAIL [fdo#103167] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
    - shard-glk:          FAIL [fdo#103167] -> PASS
    - shard-kbl:          FAIL [fdo#103167] -> PASS

  * igt@kms_plane@pixel-format-pipe-c-planes:
    - shard-glk:          FAIL [fdo#103166] -> PASS +1

  * igt@kms_plane_multiple@atomic-pipe-a-tiling-none:
    - shard-kbl:          FAIL [fdo#103166] -> PASS
    - shard-apl:          FAIL [fdo#103166] -> PASS +1

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#105454]: https://bugs.freedesktop.org/show_bug.cgi?id=105454
  [fdo#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
  [fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
  [fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
  [fdo#107937]: https://bugs.freedesktop.org/show_bug.cgi?id=107937
  [fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
  [fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660
  [fdo#109674]: https://bugs.freedesktop.org/show_bug.cgi?id=109674
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (6 -> 5)
------------------------------

  Missing    (1): shard-skl 


Build changes
-------------

    * IGT: IGT_4853 -> IGTPW_2498
    * Piglit: piglit_4509 -> None

  CI_DRM_5655: a40729237602fa7454aaf3355ad3058cad5c6ee9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2498: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2498/
  IGT_4853: 8afdfd8fa9ce17043d9105dedca46ad4555fdcdb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2498/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-26 15:10 Juha-Pekka Heikkila
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-26 15:10 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 295 +++++++++++++++++-----------------------
 1 file changed, 122 insertions(+), 173 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..9f7b11f 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -57,15 +57,15 @@ typedef struct {
 } data_t;
 
 
-static int do_write(int fd, int handle, void *buf, int size)
-{
-	struct drm_i915_gem_pwrite write;
-	memset(&write, 0x00, sizeof(write));
-	write.handle = handle;
-	write.data_ptr = (uintptr_t)buf;
-	write.size = size;
-	write.offset = 0;
-	return igt_ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write);
+static void do_write(int fd, int handle, void *buf, int size)
+{	void *screenbuf;
+
+	gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
+	screenbuf = gem_mmap__gtt(fd, handle, size, PROT_WRITE);
+	memcpy(screenbuf, buf, size);
+	gem_munmap(screenbuf, size);
+	gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
+	gem_sync(fd, handle);
 }
 
 
@@ -76,6 +76,7 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 	int fbid;
 	cairo_t *cr;
 	igt_plane_t *primary;
+	char *crc_text;
 
 	mode = igt_output_get_mode(output);
 	fbid = igt_create_color_fb(data->gfx_fd,
@@ -96,74 +97,44 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 			    0.0, 0.0, 0.0);
 	igt_paint_color(cr, 0, 0, w, h, 1.0, 1.0, 1.0);
 	igt_assert(cairo_status(cr) == 0);
+	igt_put_cairo_ctx(data->gfx_fd, &data->primary_fb, cr);
 
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	cr = igt_get_cairo_ctx(data->gfx_fd, &data->primary_fb);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
+	igt_put_cairo_ctx(data->gfx_fd, &data->primary_fb, cr);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
-	cairo_destroy(cr);
 	igt_remove_fb(data->gfx_fd, &data->primary_fb);
+
+	crc_text = igt_crc_to_string(&data->fullscreen_crc);
+	igt_debug("fullscreen comare crc %.8s\n", (char *)crc_text);
+
+	free(crc_text);
 }
 
 static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
-	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+	enum		{ BYTES_PP_1 = 1,
+				BYTES_PP_4 = 4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,11 +146,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
-		if( fillers[i].fourcc == format )
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == format)
 			break;
 	}
 
@@ -190,57 +160,12 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
-		igt_info("Unsupported mode for test %s\n",
-			 (char*)&fillers[i].fourcc);
-		return false;
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	do_write(data->gfx_fd, data->gem_handle, (void*)data->buf, writesize);
@@ -271,26 +196,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
 		if (fillers[i].fourcc == format)
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -298,23 +217,18 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.offsets[0] = 0;
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
-
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
+	data->buf = (unsigned char *)calloc(data->size*2, 1);
 
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
 			       data->fb.strides[0]);
 
+	data->fb.gem_handle = data->gem_handle;
+	data->fb.width = w;
+	data->fb.height = h;
+	fill_in_fb(data, output, plane, format);
+
 	igt_assert_eq(ret, 0);
 
 	ret = __kms_addfb(data->gfx_fd, data->gem_handle, w, h,
@@ -329,9 +243,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		return false;
 	}
 
-	data->fb.width = w;
-	data->fb.height = h;
-	data->fb.gem_handle = data->gem_handle;
 	return true;
 }
 
@@ -378,63 +289,66 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 	if (!setup_fb(data, output, plane, format))
 		return false;
 
-	free((void*)data->buf);
-	data->buf = (unsigned char*)calloc(data->size*2, 1);
 	return true;
 }
 
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
-	bool do_crc;
-	char* crccompare[2];
+	int i;
 
-	if (prepare_crtc(data, output, plane, mode)){
-		/*
-		 * we have fb from prepare_crtc(..) so now fill it in
-		 * correctly in fill_in_fb(..)
-		 */
-		do_crc = fill_in_fb(data, output, plane, mode);
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == mode)
+			break;
+	}
+
+	if (fillers[i].bpp == 0)
+		return false;
 
+	if (prepare_crtc(data, output, plane, mode)) {
 		igt_plane_set_fb(plane, &data->fb);
 		igt_fb_set_size(&data->fb, plane, data->fb.width, data->fb.height);
 		igt_plane_set_size(plane, data->fb.width, data->fb.height);
 		igt_fb_set_position(&data->fb, plane, 0, 0);
 		igt_display_commit2(&data->display, data->commit);
 
-		if (do_crc) {
-			igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
-
-			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
-				if (!igt_check_crc_equal(&current_crc,
-					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
-					rVal++;
-				}
-			} else {
-				if (!igt_check_crc_equal(&current_crc,
-					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
-					rVal++;
-				}
+		igt_wait_for_vblank(data->gfx_fd, pipe);
+		igt_pipe_crc_drain(data->pipe_crc);
+		igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
+
+		if (plane->type != DRM_PLANE_TYPE_CURSOR) {
+			if (!igt_check_crc_equal(&current_crc,
+				&data->fullscreen_crc)) {
+				igt_warn("crc mismatch. connector %s using pipe %s" \
+					" plane index %d mode %.4s\n",
+					igt_output_name(output),
+					kmstest_pipe_name(pipe),
+					plane->index,
+					(char *)&mode);
+				rVal++;
+			}
+		} else {
+			if (!igt_check_crc_equal(&current_crc,
+				&data->cursor_crc)) {
+				igt_warn("crc mismatch. connector %s using pipe %s" \
+					" plane index %d mode %.4s\n",
+					igt_output_name(output),
+					kmstest_pipe_name(pipe),
+					plane->index,
+					(char *)&mode);
+				rVal++;
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -445,14 +359,44 @@ test_available_modes(data_t* data)
 	igt_plane_t *plane;
 	int modeindex;
 	enum pipe pipe;
-	int invalids = 0;
+	int invalids = 0, i, lut_size;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
+
+	struct {
+		uint16_t red;
+		uint16_t green;
+		uint16_t blue;
+		uint16_t reserved;
+	} *lut = NULL;
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
 
+		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
+			lut_size = igt_pipe_get_prop(&data->display, pipe,
+						     IGT_CRTC_GAMMA_LUT_SIZE);
+
+			lut = calloc(sizeof(*lut), lut_size);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+			}
+
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			igt_display_commit2(&data->display, data->commit);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = i * 0xffff / (lut_size - 1);
+				lut[i].green = i * 0xffff / (lut_size - 1);
+				lut[i].blue = i * 0xffff / (lut_size - 1);
+			}
+		}
+
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -467,29 +411,34 @@ test_available_modes(data_t* data)
 			modePlane = drmModeGetPlane(data->gfx_fd,
 						    plane->drm_plane->plane_id);
 
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+
 			for (modeindex = 0;
 			     modeindex < modePlane->count_formats;
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
+
+		if (lut != NULL) {
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			free(lut);
+			lut = NULL;
+		}
+
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-25 11:39 Juha-Pekka Heikkila
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-25 11:39 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 253 +++++++++++++++++-----------------------
 1 file changed, 105 insertions(+), 148 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..2cd804a 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -57,15 +57,15 @@ typedef struct {
 } data_t;
 
 
-static int do_write(int fd, int handle, void *buf, int size)
-{
-	struct drm_i915_gem_pwrite write;
-	memset(&write, 0x00, sizeof(write));
-	write.handle = handle;
-	write.data_ptr = (uintptr_t)buf;
-	write.size = size;
-	write.offset = 0;
-	return igt_ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write);
+static void do_write(int fd, int handle, void *buf, int size)
+{	void *screenbuf;
+
+	gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
+	screenbuf = gem_mmap__gtt(fd, handle, size, PROT_WRITE);
+	memcpy(screenbuf, buf, size);
+	gem_munmap(screenbuf, size);
+	gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
+	gem_sync(fd, handle);
 }
 
 
@@ -76,6 +76,7 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 	int fbid;
 	cairo_t *cr;
 	igt_plane_t *primary;
+	char* crc_text;
 
 	mode = igt_output_get_mode(output);
 	fbid = igt_create_color_fb(data->gfx_fd,
@@ -96,74 +97,44 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 			    0.0, 0.0, 0.0);
 	igt_paint_color(cr, 0, 0, w, h, 1.0, 1.0, 1.0);
 	igt_assert(cairo_status(cr) == 0);
+	igt_put_cairo_ctx(data->gfx_fd, &data->primary_fb, cr);
 
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	cr = igt_get_cairo_ctx(data->gfx_fd, &data->primary_fb);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
+	igt_put_cairo_ctx(data->gfx_fd, &data->primary_fb, cr);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
-	cairo_destroy(cr);
 	igt_remove_fb(data->gfx_fd, &data->primary_fb);
+
+	crc_text = igt_crc_to_string(&data->fullscreen_crc);
+	igt_debug("fullscreen comare crc %.8s\n", (char*)crc_text);
+
+	free(crc_text);
 }
 
 static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
-	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+	enum		{ BYTES_PP_1 = 1,
+				BYTES_PP_4 = 4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,11 +146,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
-		if( fillers[i].fourcc == format )
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == format)
 			break;
 	}
 
@@ -190,57 +160,12 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
-		igt_info("Unsupported mode for test %s\n",
-			 (char*)&fillers[i].fourcc);
-		return false;
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	do_write(data->gfx_fd, data->gem_handle, (void*)data->buf, writesize);
@@ -271,26 +196,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
 		if (fillers[i].fourcc == format)
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +218,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +294,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == mode)
+			break;
+	}
+
+	if (fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -407,34 +326,37 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 		igt_display_commit2(&data->display, data->commit);
 
 		if (do_crc) {
+			igt_wait_for_vblank(data->gfx_fd, pipe);
+			igt_pipe_crc_drain(data->pipe_crc);
 			igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
 
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -445,14 +367,44 @@ test_available_modes(data_t* data)
 	igt_plane_t *plane;
 	int modeindex;
 	enum pipe pipe;
-	int invalids = 0;
+	int invalids = 0, i, lut_size;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
+
+	struct {
+		uint16_t red;
+		uint16_t green;
+		uint16_t blue;
+		uint16_t reserved;
+	} *lut = NULL;
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
 
+		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
+			lut_size = igt_pipe_get_prop(&data->display, pipe,
+						     IGT_CRTC_GAMMA_LUT_SIZE);
+
+			lut = calloc(sizeof(*lut), lut_size);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+			}
+
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			igt_display_commit2(&data->display, data->commit);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = i * 0xffff / (lut_size - 1);
+				lut[i].green = i * 0xffff / (lut_size - 1);
+				lut[i].blue = i * 0xffff / (lut_size - 1);
+			}
+		}
+
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -467,29 +419,34 @@ test_available_modes(data_t* data)
 			modePlane = drmModeGetPlane(data->gfx_fd,
 						    plane->drm_plane->plane_id);
 
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+
 			for (modeindex = 0;
 			     modeindex < modePlane->count_formats;
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
+
+		if (lut != NULL) {
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			free(lut);
+			lut = NULL;
+		}
+
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-24 20:37 Juha-Pekka Heikkila
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-24 20:37 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 246 ++++++++++++++++------------------------
 1 file changed, 98 insertions(+), 148 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..9bb6f72 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -57,15 +57,14 @@ typedef struct {
 } data_t;
 
 
-static int do_write(int fd, int handle, void *buf, int size)
-{
-	struct drm_i915_gem_pwrite write;
-	memset(&write, 0x00, sizeof(write));
-	write.handle = handle;
-	write.data_ptr = (uintptr_t)buf;
-	write.size = size;
-	write.offset = 0;
-	return igt_ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write);
+static void do_write(int fd, int handle, void *buf, int size)
+{	void *screenbuf;
+
+	gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
+	screenbuf = gem_mmap__gtt(fd, handle, size, PROT_WRITE);
+	memcpy(screenbuf, buf, size);
+	gem_munmap(screenbuf, size);
+	gem_sync(fd, handle);
 }
 
 
@@ -96,74 +95,39 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 			    0.0, 0.0, 0.0);
 	igt_paint_color(cr, 0, 0, w, h, 1.0, 1.0, 1.0);
 	igt_assert(cairo_status(cr) == 0);
+	igt_put_cairo_ctx(data->gfx_fd, &data->primary_fb, cr);
 
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	cr = igt_get_cairo_ctx(data->gfx_fd, &data->primary_fb);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
+	igt_put_cairo_ctx(data->gfx_fd, &data->primary_fb, cr);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
-	cairo_destroy(cr);
 	igt_remove_fb(data->gfx_fd, &data->primary_fb);
 }
 
 static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
-	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+	enum		{ BYTES_PP_1 = 1,
+				BYTES_PP_4 = 4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,11 +139,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
-		if( fillers[i].fourcc == format )
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == format)
 			break;
 	}
 
@@ -190,57 +153,12 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
-		igt_info("Unsupported mode for test %s\n",
-			 (char*)&fillers[i].fourcc);
-		return false;
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	do_write(data->gfx_fd, data->gem_handle, (void*)data->buf, writesize);
@@ -271,26 +189,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
 		if (fillers[i].fourcc == format)
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +211,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +287,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == mode)
+			break;
+	}
+
+	if (fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -407,34 +319,37 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 		igt_display_commit2(&data->display, data->commit);
 
 		if (do_crc) {
+			igt_wait_for_vblank(data->gfx_fd, pipe);
+			igt_pipe_crc_drain(data->pipe_crc);
 			igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
 
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -445,14 +360,44 @@ test_available_modes(data_t* data)
 	igt_plane_t *plane;
 	int modeindex;
 	enum pipe pipe;
-	int invalids = 0;
+	int invalids = 0, i, lut_size;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
+
+	struct {
+		uint16_t red;
+		uint16_t green;
+		uint16_t blue;
+		uint16_t reserved;
+	} *lut = NULL;
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
 
+		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
+			lut_size = igt_pipe_get_prop(&data->display, pipe,
+						     IGT_CRTC_GAMMA_LUT_SIZE);
+
+			lut = calloc(sizeof(*lut), lut_size);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+			}
+
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			igt_display_commit2(&data->display, data->commit);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = i * 0xffff / (lut_size - 1);
+				lut[i].green = i * 0xffff / (lut_size - 1);
+				lut[i].blue = i * 0xffff / (lut_size - 1);
+			}
+		}
+
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -467,29 +412,34 @@ test_available_modes(data_t* data)
 			modePlane = drmModeGetPlane(data->gfx_fd,
 						    plane->drm_plane->plane_id);
 
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+
 			for (modeindex = 0;
 			     modeindex < modePlane->count_formats;
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
+
+		if (lut != NULL) {
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			free(lut);
+			lut = NULL;
+		}
+
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
  2019-02-21 11:28   ` Juha-Pekka Heikkila
@ 2019-02-21 22:04     ` Dhinakaran Pandiyan
  0 siblings, 0 replies; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-21 22:04 UTC (permalink / raw)
  To: juhapekka.heikkila, igt-dev

On Thu, 2019-02-21 at 13:28 +0200, Juha-Pekka Heikkila wrote:
> On 21.2.2019 2.01, Dhinakaran Pandiyan wrote:
> > On Mon, 2019-02-18 at 16:22 +0200, Juha-Pekka Heikkila wrote:
> > > This test is causing too much useless noise. Limit tested
> > > fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
> > > These two formats are currently not tested otherwise thus
> > > they're left here for now. DRM_FORMAT_XBGR2101010 need to be
> > > included into IGT supported formats and DRM_FORMAT_C8 test need
> > > to be moved elsewhere, maybe into kms_plane.
> > 
> > Thanks for doing this.
> > 
> > > 
> > > Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > > ---
> > >   tests/kms_available_modes_crc.c | 217 +++++++++++++++--------
> > > -------
> > > ----------
> > >   1 file changed, 83 insertions(+), 134 deletions(-)
> > > 
> > > diff --git a/tests/kms_available_modes_crc.c
> > > b/tests/kms_available_modes_crc.c
> > > index 7ff385f..a51006b 100644
> > > --- a/tests/kms_available_modes_crc.c
> > > +++ b/tests/kms_available_modes_crc.c
> > > @@ -101,17 +101,17 @@ static void
> > > generate_comparison_crc_list(data_t
> > > *data, igt_output_t *output)
> > >   	igt_plane_set_fb(primary, &data->primary_fb);
> > >   	igt_display_commit2(&data->display, data->commit);
> > >   
> > > +	igt_pipe_crc_drain(data->pipe_crc);
> > >   	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc,
> > > &data-
> > > > cursor_crc);
> > > 
> > >   	igt_plane_set_fb(primary, NULL);
> > >   	igt_display_commit2(&data->display, data->commit);
> > >   
> > > -	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
> > > -		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode-
> > > > vdisplay, 1.0, 1.0, 1.0) :
> > > 
> > > -		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode-
> > > > vdisplay, 1.0, 1.0, 1.0, 1.0);
> > > 
> > > +	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0,
> > > 1.0, 1.0);
> > >   
> > >   	igt_plane_set_fb(primary, &data->primary_fb);
> > >   	igt_display_commit2(&data->display, data->commit);
> > >   
> > > +	igt_pipe_crc_drain(data->pipe_crc);
> > >   	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc,
> > > &data-
> > > > fullscreen_crc);
> > > 
> > >   
> > >   	cairo_destroy(cr);
> > > @@ -122,48 +122,11 @@ static const struct {
> > >   	uint32_t	fourcc;
> > >   	char		zeropadding;
> > >   	enum		{ BYTES_PP_1=1,
> > > -				BYTES_PP_2=2,
> > > -				BYTES_PP_4=4,
> > > -				NV12,
> > > -				P010,
> > > -				SKIP4 } bpp;
> > > +				BYTES_PP_4=4} bpp;
> > >   	uint32_t	value;
> > >   } fillers[] = {
> > >   	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
> > > -	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
> > > -	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
> > > -	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
> > > -
> > > -	/*
> > > -	 * following two are skipped because blending seems to work
> > > -	 * incorrectly with exception of AR24 on cursor plane.
> > > -	 * Test still creates the planes, just filling plane
> > > -	 * and getting crc is skipped.
> > > -	 */
> > > -	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
> > > -	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
> > > -
> > > -	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
> > >   	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
> > > -
> > > -	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
> > > -	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
> > > -	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
> > > -	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
> > > -
> > > -	/*
> > > -	 * (semi-)planar formats
> > > -	 */
> > > -	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
> > > -#ifdef DRM_FORMAT_P010
> > > -	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
> > > -#endif
> > > -#ifdef DRM_FORMAT_P012
> > > -	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
> > > -#endif
> > > -#ifdef DRM_FORMAT_P016
> > > -	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
> > > -#endif
> > >   	{ 0, 0, 0, 0 }
> > >   };
> > >   
> > > @@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data,
> > > igt_output_t *output, igt_plane_t *plane,
> > >   		       uint32_t format)
> > >   {
> > >   	signed i, c, writesize;
> > > -	unsigned short* ptemp_16_buf;
> > >   	unsigned int* ptemp_32_buf;
> > >   
> > > -	for( i = 0; fillers[i].fourcc != 0; i++ ) {
> > > +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
> > >   		if( fillers[i].fourcc == format )
> > >   			break;
> > >   	}
> > > @@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data,
> > > igt_output_t *output, igt_plane_t *plane,
> > >   			ptemp_32_buf[c] = fillers[i].value;
> > >   		writesize = data->size;
> > >   		break;
> > > -	case BYTES_PP_2:
> > > -		ptemp_16_buf = (unsigned short*)data->buf;
> > > -		for (c = 0; c < data->size/2; c++)
> > > -			ptemp_16_buf[c] = (unsigned
> > > short)fillers[i].value;
> > > -		writesize = data->size;
> > > -		break;
> > >   	case BYTES_PP_1:
> > >   		memset((void *)data->buf, fillers[i].value,
> > > data-
> > > > size);
> > > 
> > >   		writesize = data->size;
> > >   		break;
> > > -	case NV12:
> > > -		memset((void *)data->buf, fillers[i].value&0xff,
> > > -		       data->fb.offsets[1]);
> > > -
> > > -		memset((void *)(data->buf+data->fb.offsets[1]),
> > > -		       (fillers[i].value>>8)&0xff,
> > > -		       data->size - data->fb.offsets[1]);
> > > -
> > > -		writesize = data->size;
> > > -		break;
> > > -	case P010:
> > > -		ptemp_16_buf = (unsigned short*)data->buf;
> > > -		for (c = 0; c < data->size/2; c++)
> > > -			ptemp_16_buf[c] = (unsigned
> > > short)fillers[i].value&0xffff;
> > > -
> > > -		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
> > > -		for (c = 0; c < data->size/2; c++)
> > > -			ptemp_16_buf[c] = (unsigned
> > > short)(fillers[i].value>>16)&0xffff;
> > > -
> > > -		writesize = data->size+data->size/2;
> > > -		break;
> > > -	case SKIP4:
> > > -		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
> > > -		    plane->type == DRM_PLANE_TYPE_CURSOR) {
> > > -		/*
> > > -		 * special for cursor plane where blending works
> > > correctly.
> > > -		 */
> > > -			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;
> > > -		}
> > > -		igt_info("Format %s CRC comparison skipped by
> > > design.\n",
> > > -			 (char*)&fillers[i].fourcc);
> > > -
> > > -		return false;
> > >   	default:
> > >   		igt_info("Unsupported mode for test %s\n",
> > >   			 (char*)&fillers[i].fourcc);
> > > @@ -271,26 +190,20 @@ static bool setup_fb(data_t *data,
> > > igt_output_t
> > > *output, igt_plane_t *plane,
> > >   		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
> > >   	}
> > >   
> > > -	for (i = 0; fillers[i].fourcc != 0; i++) {
> > > -		if (fillers[i].fourcc == format)
> > > +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
> > > +		if( fillers[i].fourcc == format )
> > >   			break;
> > >   	}
> > >   
> > >   	switch (fillers[i].bpp) {
> > > -	case NV12:
> > >   	case BYTES_PP_1:
> > >   		bpp = 8;
> > >   		break;
> > > -
> > > -	case P010:
> > > -	case BYTES_PP_2:
> > > -		bpp = 16;
> > > -		break;
> > > -
> > > -	case SKIP4:
> > >   	case BYTES_PP_4:
> > >   		bpp = 32;
> > >   		break;
> > > +	default:
> > > +		return false;
> > 
> > Hmm, we should never hit this condition. Mark this as a failure so
> > that
> > the test gets fixed?
> 
> Yes, this is good place for assert.
> 
> > 
> > >   	}
> > >   
> > >   	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
> > > @@ -299,17 +212,6 @@ static bool setup_fb(data_t *data,
> > > igt_output_t
> > > *output, igt_plane_t *plane,
> > >   	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
> > >   	gemsize = data->size = data->fb.strides[0] * ALIGN(h,
> > > tile_height);
> > >   
> > > -	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
> > > -		data->fb.offsets[1] = data->size;
> > > -		data->fb.strides[1] = data->fb.strides[0];
> > > -		gemsize = data->size * 2;
> > > -
> > > -		if (fillers[i].bpp == NV12)
> > > -			data->size += data->fb.strides[1] * ALIGN(h/2,
> > > tile_height);
> > > -
> > > -		num_planes = 2;
> > > -	}
> > > -
> > >   	data->gem_handle = gem_create(data->gfx_fd, gemsize);
> > >   	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
> > >   			       igt_fb_mod_to_tiling(tiling),
> > > @@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data,
> > > igt_output_t *output,
> > >   
> > >   static int
> > >   test_one_mode(data_t* data, igt_output_t *output, igt_plane_t*
> > > plane,
> > > -	      int mode)
> > > +	      int mode, enum pipe pipe)
> > 
> > s/mode/format
> > Comment applies to other places too.
> 
> While I agree I'm so-so about doing this change since it will follow 
> into massive patch for test which I'm anyway wanting to throw away
> in 
> the end.
Okay.

> 
> > 
> > 
> > >   {
> > >   	igt_crc_t current_crc;
> > >   	signed rVal = 0;
> > >   	bool do_crc;
> > > -	char* crccompare[2];
> > > +	int i;
> > > +
> > > +	/*
> > > +	 * Limit tests only to those fb formats listed in fillers table
> > > +	 */
> > > +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
> > > +		if( fillers[i].fourcc == mode )
> > > +			break;
> > > +	}
> > > +
> > > +	if(fillers[i].bpp == 0)
> > > +		return false;

s/return false/return 0 since the function returns 'number' of crc
failures.

> > 
> > .bpp is always valid for the two formats that are tested, isn't it?
> > In
> > that case .bpp == 0 is a test failure.
> > 
> 
> No, here will arrive query for all fb formats which kernel talk
> about. 
> If bpp become zero this will go out from testing mode which is not 
> supported. Ie. C8 or XBGR2101010 will go forward and here other
> formats 
> are ditched.

You are right, my brain automatically filled in a

if (i == ARRAY_SIZE(fillers) - 1)
	return 0;

I feel checking for the loop index to have reached the limit seems more
natural since only two valid formats are tested. Also, we don't really
need the { 0, 0, 0, 0 } element in the fillers array anymore.
 
> 
> > >   
> > >   	if (prepare_crtc(data, output, plane, mode)){
> > >   		/*
> > > @@ -412,29 +325,30 @@ test_one_mode(data_t* data, igt_output_t
> > > *output, igt_plane_t* plane,
> > >   			if (plane->type !=
> > > DRM_PLANE_TYPE_CURSOR) {
> > >   				if
> > > (!igt_check_crc_equal(&current_crc,
> > >   					&data->fullscreen_crc)) 
> > > {
> > > -					crccompare[0] =
> > > igt_crc_to_string(&current_crc);
> > > -					crccompare[1] =
> > > igt_crc_to_string(&data->fullscreen_crc);
> > > -					igt_warn("crc mismatch. target
> > > %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
> > > -					free(crccompare[0]);
> > > -					free(crccompare[1]);
> > > +					igt_warn("crc mismatch.
> > > connector %s using pipe %s" \
> > > +						" plane index %d mode
> > > %.4s\n",
> > > +						igt_output_name(output)
> > > ,
> > > +						kmstest_pipe_name(pipe)
> > > ,
> > > +						plane->index,
> > > +						(char*)&mode);
> > >   					rVal++;
> > >   				}
> > >   			} else {
> > >   				if
> > > (!igt_check_crc_equal(&current_crc,
> > >   					&data->cursor_crc)) {
> > > -					crccompare[0] =
> > > igt_crc_to_string(&current_crc);
> > > -					crccompare[1] =
> > > igt_crc_to_string(&data->cursor_crc);
> > > -					igt_warn("crc mismatch. target
> > > %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
> > > -					free(crccompare[0]);
> > > -					free(crccompare[1]);
> > > +					igt_warn("crc mismatch.
> > > connector %s using pipe %s" \
> > > +						" plane index %d mode
> > > %.4s\n",
> > > +						igt_output_name(output)
> > > ,
> > > +						kmstest_pipe_name(pipe)
> > > ,
> > > +						plane->index,
> > > +						(char*)&mode);
> > >   					rVal++;
> > >   				}
> > >   			}
> > >   		}
> > > -		remove_fb(data, output, plane);
> > > -		return rVal;
> > >   	}
> > > -	return 1;
> > > +	remove_fb(data, output, plane);
> > > +	return rVal;
> > >   }
> > >   
> > >   
> > > @@ -445,14 +359,44 @@ test_available_modes(data_t* data)
> > >   	igt_plane_t *plane;
> > >   	int modeindex;
> > >   	enum pipe pipe;
> > > -	int invalids = 0;
> > > +	int invalids = 0, i, lut_size;
> > >   	drmModePlane *modePlane;
> > > -	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
> > > +
> > > +	struct {
> > > +	    uint16_t red;
> > > +	    uint16_t green;
> > > +	    uint16_t blue;
> > > +	    uint16_t reserved;
> > > +	} *lut = NULL;
> > >   
> > >   	for_each_pipe_with_valid_output(&data->display, pipe,
> > > output) {
> > >   		igt_output_set_pipe(output, pipe);
> > >   		igt_display_commit2(&data->display, data-
> > > >commit);
> > >   
> > > +		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe],
> > > IGT_CRTC_GAMMA_LUT_SIZE)) {
> > > +			lut_size = igt_pipe_get_prop(&data->display,
> > > pipe,
> > > +						     IGT_CRTC_GAMMA_LUT
> > > _SIZE);
> > > +
> > > +			lut = calloc(sizeof(*lut), lut_size);
> > > +
> > > +			for (i = 0; i < lut_size; i++) {
> > > +				lut[i].red = (i * 0xffff / (lut_size -
> > > 1)) & 0x8000;
> > > +				lut[i].green = (i * 0xffff / (lut_size
> > > - 1)) & 0x8000;
> > > +				lut[i].blue = (i * 0xffff / (lut_size -
> > > 1)) & 0x8000;
> > > +			}
> > > +
> > > +			igt_pipe_replace_prop_blob(&data->display,
> > > pipe,
> > > +						   IGT_CRTC_GAMMA_LUT,
> > > +						   lut, sizeof(*lut) *
> > > lut_size);
> > > +			igt_display_commit2(&data->display, data-
> > > > commit);
> > > 
> > > +
> > > +			for (i = 0; i < lut_size; i++) {
> > > +				lut[i].red = i * 0xffff / (lut_size -
> > > 1);
> > > +				lut[i].green = i * 0xffff / (lut_size -
> > > 1);
> > > +				lut[i].blue = i * 0xffff / (lut_size -
> > > 1);
> > > +			}
> > > +		}
> > > +
> > >   		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, 
> > > pipe,
> > >   						  INTEL_PIPE_CR
> > > C_SOURCE
> > > _AUTO);
> > >   
> > > @@ -467,29 +411,34 @@ test_available_modes(data_t* data)
> > >   			modePlane = drmModeGetPlane(data-
> > > >gfx_fd,
> > >   						    plane-
> > > >drm_plane-
> > > > plane_id);
> > > 
> > >   
> > > +			if (plane->type == DRM_PLANE_TYPE_CURSOR)
> > > +				continue;
> > > +
> > >   			for (modeindex = 0;
> > >   			     modeindex < modePlane-
> > > >count_formats;
> > >   			     modeindex++) {
> > >   				data->format.dword = modePlane-
> > > > formats[modeindex];
> > > 
> > >   
> > > -				igt_info("Testing connector %s using
> > > pipe %s" \
> > > -					 " plane index %d type %s mode
> > > %s\n",
> > > -					 igt_output_name(output),
> > > -					 kmstest_pipe_name(pipe),
> > > -					 plane->index,
> > > -					 planetype[plane->type],
> > > -					 (char*)&data->format.name);
> > 
> > Not sure why this was removed, perhaps convert it to igt_debug()?
> > It's
> > hard to tell what is being tested now even with the --debug option.
> 
> I did consider this as too verbose. Above where crcs are compared 
> there's printed what failed with more detail than here.
> 
> > 
> > If you want to address the comments in a separate patch, feel free
> > to
> > add
> > Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> 
> I'm going to have few CI runs with evolving this patch still.
> 
> I found timing error on this test, it is most likely what is causing
> the 
> noise from this test in CI runs. I somehow never see it on any of my
> own 
> computers but realized it from the logic and first attempt to
> mitigate 
> it changed CI results for the better so I'll get that fixed.
> 
> /Juha-Pekka
> 
> > 
> > 
> > > -
> > >   				invalids += test_one_mode(data,
> > > output,
> > >   							  plane
> > > ,
> > > -							  modePlane-
> > > > formats[modeindex]);
> > > 
> > > +							  modePlane-
> > > > formats[modeindex],
> > > 
> > > +							  pipe);
> > >   			}
> > >   			drmModeFreePlane(modePlane);
> > >   		}
> > >   		igt_pipe_crc_stop(data->pipe_crc);
> > >   		igt_pipe_crc_free(data->pipe_crc);
> > > -		igt_display_commit2(&data->display, data->commit);
> > > +
> > > +		if (lut != NULL) {
> > > +			igt_pipe_replace_prop_blob(&data->display,
> > > pipe,
> > > +						   IGT_CRTC_GAMMA_LUT,
> > > +						   lut, sizeof(*lut) *
> > > lut_size);
> > > +			free(lut);
> > > +			lut = NULL;
> > > +		}
> > > +
> > >   		igt_output_set_pipe(output, PIPE_NONE);
> > > +		igt_display_commit2(&data->display, data->commit);
> > >   	}
> > >   	igt_assert(invalids == 0);
> > >   }
> 
> 

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-21 12:24 Juha-Pekka Heikkila
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-21 12:24 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 240 ++++++++++++++++------------------------
 1 file changed, 93 insertions(+), 147 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..4a92724 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -57,15 +57,12 @@ typedef struct {
 } data_t;
 
 
-static int do_write(int fd, int handle, void *buf, int size)
-{
-	struct drm_i915_gem_pwrite write;
-	memset(&write, 0x00, sizeof(write));
-	write.handle = handle;
-	write.data_ptr = (uintptr_t)buf;
-	write.size = size;
-	write.offset = 0;
-	return igt_ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write);
+static void do_write(int fd, int handle, void *buf, int size)
+{	void *screenbuf;
+
+	screenbuf = gem_mmap__gtt(fd, handle, size, PROT_READ | PROT_WRITE);
+	memcpy(screenbuf, buf, size);
+	gem_munmap(screenbuf, size);
 }
 
 
@@ -101,17 +98,17 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
 	cairo_destroy(cr);
@@ -121,49 +118,12 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
-	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+	enum		{ BYTES_PP_1 = 1,
+				BYTES_PP_4 = 4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,11 +135,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
-		if( fillers[i].fourcc == format )
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == format)
 			break;
 	}
 
@@ -190,57 +149,12 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
-		igt_info("Unsupported mode for test %s\n",
-			 (char*)&fillers[i].fourcc);
-		return false;
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	do_write(data->gfx_fd, data->gem_handle, (void*)data->buf, writesize);
@@ -271,26 +185,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
 		if (fillers[i].fourcc == format)
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		igt_assert_f(0, "unknown bpp");
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +207,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +283,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == mode)
+			break;
+	}
+
+	if (fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -407,34 +315,37 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 		igt_display_commit2(&data->display, data->commit);
 
 		if (do_crc) {
+			igt_wait_for_vblank(data->gfx_fd, pipe);
+			igt_pipe_crc_drain(data->pipe_crc);
 			igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
 
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -445,14 +356,44 @@ test_available_modes(data_t* data)
 	igt_plane_t *plane;
 	int modeindex;
 	enum pipe pipe;
-	int invalids = 0;
+	int invalids = 0, i, lut_size;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
+
+	struct {
+		uint16_t red;
+		uint16_t green;
+		uint16_t blue;
+		uint16_t reserved;
+	} *lut = NULL;
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
 
+		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
+			lut_size = igt_pipe_get_prop(&data->display, pipe,
+						     IGT_CRTC_GAMMA_LUT_SIZE);
+
+			lut = calloc(sizeof(*lut), lut_size);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0xfc00;
+			}
+
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			igt_display_commit2(&data->display, data->commit);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = i * 0xffff / (lut_size - 1);
+				lut[i].green = i * 0xffff / (lut_size - 1);
+				lut[i].blue = i * 0xffff / (lut_size - 1);
+			}
+		}
+
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -467,29 +408,34 @@ test_available_modes(data_t* data)
 			modePlane = drmModeGetPlane(data->gfx_fd,
 						    plane->drm_plane->plane_id);
 
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+
 			for (modeindex = 0;
 			     modeindex < modePlane->count_formats;
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
+
+		if (lut != NULL) {
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			free(lut);
+			lut = NULL;
+		}
+
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
  2019-02-21  0:01 ` Dhinakaran Pandiyan
@ 2019-02-21 11:28   ` Juha-Pekka Heikkila
  2019-02-21 22:04     ` Dhinakaran Pandiyan
  0 siblings, 1 reply; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-21 11:28 UTC (permalink / raw)
  To: dhinakaran.pandiyan, igt-dev

On 21.2.2019 2.01, Dhinakaran Pandiyan wrote:
> On Mon, 2019-02-18 at 16:22 +0200, Juha-Pekka Heikkila wrote:
>> This test is causing too much useless noise. Limit tested
>> fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
>> These two formats are currently not tested otherwise thus
>> they're left here for now. DRM_FORMAT_XBGR2101010 need to be
>> included into IGT supported formats and DRM_FORMAT_C8 test need
>> to be moved elsewhere, maybe into kms_plane.
> 
> Thanks for doing this.
> 
>>
>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>> ---
>>   tests/kms_available_modes_crc.c | 217 +++++++++++++++---------------
>> ----------
>>   1 file changed, 83 insertions(+), 134 deletions(-)
>>
>> diff --git a/tests/kms_available_modes_crc.c
>> b/tests/kms_available_modes_crc.c
>> index 7ff385f..a51006b 100644
>> --- a/tests/kms_available_modes_crc.c
>> +++ b/tests/kms_available_modes_crc.c
>> @@ -101,17 +101,17 @@ static void generate_comparison_crc_list(data_t
>> *data, igt_output_t *output)
>>   	igt_plane_set_fb(primary, &data->primary_fb);
>>   	igt_display_commit2(&data->display, data->commit);
>>   
>> +	igt_pipe_crc_drain(data->pipe_crc);
>>   	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data-
>>> cursor_crc);
>>   	igt_plane_set_fb(primary, NULL);
>>   	igt_display_commit2(&data->display, data->commit);
>>   
>> -	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
>> -		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode-
>>> vdisplay, 1.0, 1.0, 1.0) :
>> -		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode-
>>> vdisplay, 1.0, 1.0, 1.0, 1.0);
>> +	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0,
>> 1.0, 1.0);
>>   
>>   	igt_plane_set_fb(primary, &data->primary_fb);
>>   	igt_display_commit2(&data->display, data->commit);
>>   
>> +	igt_pipe_crc_drain(data->pipe_crc);
>>   	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data-
>>> fullscreen_crc);
>>   
>>   	cairo_destroy(cr);
>> @@ -122,48 +122,11 @@ static const struct {
>>   	uint32_t	fourcc;
>>   	char		zeropadding;
>>   	enum		{ BYTES_PP_1=1,
>> -				BYTES_PP_2=2,
>> -				BYTES_PP_4=4,
>> -				NV12,
>> -				P010,
>> -				SKIP4 } bpp;
>> +				BYTES_PP_4=4} bpp;
>>   	uint32_t	value;
>>   } fillers[] = {
>>   	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
>> -	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
>> -	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
>> -	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
>> -
>> -	/*
>> -	 * following two are skipped because blending seems to work
>> -	 * incorrectly with exception of AR24 on cursor plane.
>> -	 * Test still creates the planes, just filling plane
>> -	 * and getting crc is skipped.
>> -	 */
>> -	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
>> -	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
>> -
>> -	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
>>   	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
>> -
>> -	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
>> -	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
>> -	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
>> -	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
>> -
>> -	/*
>> -	 * (semi-)planar formats
>> -	 */
>> -	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
>> -#ifdef DRM_FORMAT_P010
>> -	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
>> -#endif
>> -#ifdef DRM_FORMAT_P012
>> -	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
>> -#endif
>> -#ifdef DRM_FORMAT_P016
>> -	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
>> -#endif
>>   	{ 0, 0, 0, 0 }
>>   };
>>   
>> @@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data,
>> igt_output_t *output, igt_plane_t *plane,
>>   		       uint32_t format)
>>   {
>>   	signed i, c, writesize;
>> -	unsigned short* ptemp_16_buf;
>>   	unsigned int* ptemp_32_buf;
>>   
>> -	for( i = 0; fillers[i].fourcc != 0; i++ ) {
>> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
>>   		if( fillers[i].fourcc == format )
>>   			break;
>>   	}
>> @@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data,
>> igt_output_t *output, igt_plane_t *plane,
>>   			ptemp_32_buf[c] = fillers[i].value;
>>   		writesize = data->size;
>>   		break;
>> -	case BYTES_PP_2:
>> -		ptemp_16_buf = (unsigned short*)data->buf;
>> -		for (c = 0; c < data->size/2; c++)
>> -			ptemp_16_buf[c] = (unsigned
>> short)fillers[i].value;
>> -		writesize = data->size;
>> -		break;
>>   	case BYTES_PP_1:
>>   		memset((void *)data->buf, fillers[i].value, data-
>>> size);
>>   		writesize = data->size;
>>   		break;
>> -	case NV12:
>> -		memset((void *)data->buf, fillers[i].value&0xff,
>> -		       data->fb.offsets[1]);
>> -
>> -		memset((void *)(data->buf+data->fb.offsets[1]),
>> -		       (fillers[i].value>>8)&0xff,
>> -		       data->size - data->fb.offsets[1]);
>> -
>> -		writesize = data->size;
>> -		break;
>> -	case P010:
>> -		ptemp_16_buf = (unsigned short*)data->buf;
>> -		for (c = 0; c < data->size/2; c++)
>> -			ptemp_16_buf[c] = (unsigned
>> short)fillers[i].value&0xffff;
>> -
>> -		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
>> -		for (c = 0; c < data->size/2; c++)
>> -			ptemp_16_buf[c] = (unsigned
>> short)(fillers[i].value>>16)&0xffff;
>> -
>> -		writesize = data->size+data->size/2;
>> -		break;
>> -	case SKIP4:
>> -		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
>> -		    plane->type == DRM_PLANE_TYPE_CURSOR) {
>> -		/*
>> -		 * special for cursor plane where blending works
>> correctly.
>> -		 */
>> -			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;
>> -		}
>> -		igt_info("Format %s CRC comparison skipped by
>> design.\n",
>> -			 (char*)&fillers[i].fourcc);
>> -
>> -		return false;
>>   	default:
>>   		igt_info("Unsupported mode for test %s\n",
>>   			 (char*)&fillers[i].fourcc);
>> @@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t
>> *output, igt_plane_t *plane,
>>   		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
>>   	}
>>   
>> -	for (i = 0; fillers[i].fourcc != 0; i++) {
>> -		if (fillers[i].fourcc == format)
>> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
>> +		if( fillers[i].fourcc == format )
>>   			break;
>>   	}
>>   
>>   	switch (fillers[i].bpp) {
>> -	case NV12:
>>   	case BYTES_PP_1:
>>   		bpp = 8;
>>   		break;
>> -
>> -	case P010:
>> -	case BYTES_PP_2:
>> -		bpp = 16;
>> -		break;
>> -
>> -	case SKIP4:
>>   	case BYTES_PP_4:
>>   		bpp = 32;
>>   		break;
>> +	default:
>> +		return false;
> 
> Hmm, we should never hit this condition. Mark this as a failure so that
> the test gets fixed?

Yes, this is good place for assert.

> 
>>   	}
>>   
>>   	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
>> @@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t
>> *output, igt_plane_t *plane,
>>   	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
>>   	gemsize = data->size = data->fb.strides[0] * ALIGN(h,
>> tile_height);
>>   
>> -	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
>> -		data->fb.offsets[1] = data->size;
>> -		data->fb.strides[1] = data->fb.strides[0];
>> -		gemsize = data->size * 2;
>> -
>> -		if (fillers[i].bpp == NV12)
>> -			data->size += data->fb.strides[1] * ALIGN(h/2,
>> tile_height);
>> -
>> -		num_planes = 2;
>> -	}
>> -
>>   	data->gem_handle = gem_create(data->gfx_fd, gemsize);
>>   	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
>>   			       igt_fb_mod_to_tiling(tiling),
>> @@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data,
>> igt_output_t *output,
>>   
>>   static int
>>   test_one_mode(data_t* data, igt_output_t *output, igt_plane_t*
>> plane,
>> -	      int mode)
>> +	      int mode, enum pipe pipe)
> s/mode/format
> Comment applies to other places too.

While I agree I'm so-so about doing this change since it will follow 
into massive patch for test which I'm anyway wanting to throw away in 
the end.

> 
> 
>>   {
>>   	igt_crc_t current_crc;
>>   	signed rVal = 0;
>>   	bool do_crc;
>> -	char* crccompare[2];
>> +	int i;
>> +
>> +	/*
>> +	 * Limit tests only to those fb formats listed in fillers table
>> +	 */
>> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
>> +		if( fillers[i].fourcc == mode )
>> +			break;
>> +	}
>> +
>> +	if(fillers[i].bpp == 0)
>> +		return false;
> .bpp is always valid for the two formats that are tested, isn't it? In
> that case .bpp == 0 is a test failure.
> 

No, here will arrive query for all fb formats which kernel talk about. 
If bpp become zero this will go out from testing mode which is not 
supported. Ie. C8 or XBGR2101010 will go forward and here other formats 
are ditched.

>>   
>>   	if (prepare_crtc(data, output, plane, mode)){
>>   		/*
>> @@ -412,29 +325,30 @@ test_one_mode(data_t* data, igt_output_t
>> *output, igt_plane_t* plane,
>>   			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
>>   				if (!igt_check_crc_equal(&current_crc,
>>   					&data->fullscreen_crc)) {
>> -					crccompare[0] =
>> igt_crc_to_string(&current_crc);
>> -					crccompare[1] =
>> igt_crc_to_string(&data->fullscreen_crc);
>> -					igt_warn("crc mismatch. target
>> %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
>> -					free(crccompare[0]);
>> -					free(crccompare[1]);
>> +					igt_warn("crc mismatch.
>> connector %s using pipe %s" \
>> +						" plane index %d mode
>> %.4s\n",
>> +						igt_output_name(output)
>> ,
>> +						kmstest_pipe_name(pipe)
>> ,
>> +						plane->index,
>> +						(char*)&mode);
>>   					rVal++;
>>   				}
>>   			} else {
>>   				if (!igt_check_crc_equal(&current_crc,
>>   					&data->cursor_crc)) {
>> -					crccompare[0] =
>> igt_crc_to_string(&current_crc);
>> -					crccompare[1] =
>> igt_crc_to_string(&data->cursor_crc);
>> -					igt_warn("crc mismatch. target
>> %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
>> -					free(crccompare[0]);
>> -					free(crccompare[1]);
>> +					igt_warn("crc mismatch.
>> connector %s using pipe %s" \
>> +						" plane index %d mode
>> %.4s\n",
>> +						igt_output_name(output)
>> ,
>> +						kmstest_pipe_name(pipe)
>> ,
>> +						plane->index,
>> +						(char*)&mode);
>>   					rVal++;
>>   				}
>>   			}
>>   		}
>> -		remove_fb(data, output, plane);
>> -		return rVal;
>>   	}
>> -	return 1;
>> +	remove_fb(data, output, plane);
>> +	return rVal;
>>   }
>>   
>>   
>> @@ -445,14 +359,44 @@ test_available_modes(data_t* data)
>>   	igt_plane_t *plane;
>>   	int modeindex;
>>   	enum pipe pipe;
>> -	int invalids = 0;
>> +	int invalids = 0, i, lut_size;
>>   	drmModePlane *modePlane;
>> -	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
>> +
>> +	struct {
>> +	    uint16_t red;
>> +	    uint16_t green;
>> +	    uint16_t blue;
>> +	    uint16_t reserved;
>> +	} *lut = NULL;
>>   
>>   	for_each_pipe_with_valid_output(&data->display, pipe, output) {
>>   		igt_output_set_pipe(output, pipe);
>>   		igt_display_commit2(&data->display, data->commit);
>>   
>> +		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe],
>> IGT_CRTC_GAMMA_LUT_SIZE)) {
>> +			lut_size = igt_pipe_get_prop(&data->display,
>> pipe,
>> +						     IGT_CRTC_GAMMA_LUT
>> _SIZE);
>> +
>> +			lut = calloc(sizeof(*lut), lut_size);
>> +
>> +			for (i = 0; i < lut_size; i++) {
>> +				lut[i].red = (i * 0xffff / (lut_size -
>> 1)) & 0x8000;
>> +				lut[i].green = (i * 0xffff / (lut_size
>> - 1)) & 0x8000;
>> +				lut[i].blue = (i * 0xffff / (lut_size -
>> 1)) & 0x8000;
>> +			}
>> +
>> +			igt_pipe_replace_prop_blob(&data->display,
>> pipe,
>> +						   IGT_CRTC_GAMMA_LUT,
>> +						   lut, sizeof(*lut) *
>> lut_size);
>> +			igt_display_commit2(&data->display, data-
>>> commit);
>> +
>> +			for (i = 0; i < lut_size; i++) {
>> +				lut[i].red = i * 0xffff / (lut_size -
>> 1);
>> +				lut[i].green = i * 0xffff / (lut_size -
>> 1);
>> +				lut[i].blue = i * 0xffff / (lut_size -
>> 1);
>> +			}
>> +		}
>> +
>>   		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
>>   						  INTEL_PIPE_CRC_SOURCE
>> _AUTO);
>>   
>> @@ -467,29 +411,34 @@ test_available_modes(data_t* data)
>>   			modePlane = drmModeGetPlane(data->gfx_fd,
>>   						    plane->drm_plane-
>>> plane_id);
>>   
>> +			if (plane->type == DRM_PLANE_TYPE_CURSOR)
>> +				continue;
>> +
>>   			for (modeindex = 0;
>>   			     modeindex < modePlane->count_formats;
>>   			     modeindex++) {
>>   				data->format.dword = modePlane-
>>> formats[modeindex];
>>   
>> -				igt_info("Testing connector %s using
>> pipe %s" \
>> -					 " plane index %d type %s mode
>> %s\n",
>> -					 igt_output_name(output),
>> -					 kmstest_pipe_name(pipe),
>> -					 plane->index,
>> -					 planetype[plane->type],
>> -					 (char*)&data->format.name);
> 
> Not sure why this was removed, perhaps convert it to igt_debug()? It's
> hard to tell what is being tested now even with the --debug option.

I did consider this as too verbose. Above where crcs are compared 
there's printed what failed with more detail than here.

> 
> If you want to address the comments in a separate patch, feel free to
> add
> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

I'm going to have few CI runs with evolving this patch still.

I found timing error on this test, it is most likely what is causing the 
noise from this test in CI runs. I somehow never see it on any of my own 
computers but realized it from the logic and first attempt to mitigate 
it changed CI results for the better so I'll get that fixed.

/Juha-Pekka

> 
> 
>> -
>>   				invalids += test_one_mode(data, output,
>>   							  plane,
>> -							  modePlane-
>>> formats[modeindex]);
>> +							  modePlane-
>>> formats[modeindex],
>> +							  pipe);
>>   			}
>>   			drmModeFreePlane(modePlane);
>>   		}
>>   		igt_pipe_crc_stop(data->pipe_crc);
>>   		igt_pipe_crc_free(data->pipe_crc);
>> -		igt_display_commit2(&data->display, data->commit);
>> +
>> +		if (lut != NULL) {
>> +			igt_pipe_replace_prop_blob(&data->display,
>> pipe,
>> +						   IGT_CRTC_GAMMA_LUT,
>> +						   lut, sizeof(*lut) *
>> lut_size);
>> +			free(lut);
>> +			lut = NULL;
>> +		}
>> +
>>   		igt_output_set_pipe(output, PIPE_NONE);
>> +		igt_display_commit2(&data->display, data->commit);
>>   	}
>>   	igt_assert(invalids == 0);
>>   }
> 

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
  2019-02-18 14:22 Juha-Pekka Heikkila
  2019-02-18 14:28 ` Ville Syrjälä
@ 2019-02-21  0:01 ` Dhinakaran Pandiyan
  2019-02-21 11:28   ` Juha-Pekka Heikkila
  1 sibling, 1 reply; 20+ messages in thread
From: Dhinakaran Pandiyan @ 2019-02-21  0:01 UTC (permalink / raw)
  To: Juha-Pekka Heikkila, igt-dev

On Mon, 2019-02-18 at 16:22 +0200, Juha-Pekka Heikkila wrote:
> This test is causing too much useless noise. Limit tested
> fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
> These two formats are currently not tested otherwise thus
> they're left here for now. DRM_FORMAT_XBGR2101010 need to be
> included into IGT supported formats and DRM_FORMAT_C8 test need
> to be moved elsewhere, maybe into kms_plane.

Thanks for doing this.

> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>  tests/kms_available_modes_crc.c | 217 +++++++++++++++---------------
> ----------
>  1 file changed, 83 insertions(+), 134 deletions(-)
> 
> diff --git a/tests/kms_available_modes_crc.c
> b/tests/kms_available_modes_crc.c
> index 7ff385f..a51006b 100644
> --- a/tests/kms_available_modes_crc.c
> +++ b/tests/kms_available_modes_crc.c
> @@ -101,17 +101,17 @@ static void generate_comparison_crc_list(data_t
> *data, igt_output_t *output)
>  	igt_plane_set_fb(primary, &data->primary_fb);
>  	igt_display_commit2(&data->display, data->commit);
>  
> +	igt_pipe_crc_drain(data->pipe_crc);
>  	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data-
> >cursor_crc);
>  	igt_plane_set_fb(primary, NULL);
>  	igt_display_commit2(&data->display, data->commit);
>  
> -	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
> -		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode-
> >vdisplay, 1.0, 1.0, 1.0) :
> -		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode-
> >vdisplay, 1.0, 1.0, 1.0, 1.0);
> +	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0,
> 1.0, 1.0);
>  
>  	igt_plane_set_fb(primary, &data->primary_fb);
>  	igt_display_commit2(&data->display, data->commit);
>  
> +	igt_pipe_crc_drain(data->pipe_crc);
>  	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data-
> >fullscreen_crc);
>  
>  	cairo_destroy(cr);
> @@ -122,48 +122,11 @@ static const struct {
>  	uint32_t	fourcc;
>  	char		zeropadding;
>  	enum		{ BYTES_PP_1=1,
> -				BYTES_PP_2=2,
> -				BYTES_PP_4=4,
> -				NV12,
> -				P010,
> -				SKIP4 } bpp;
> +				BYTES_PP_4=4} bpp;
>  	uint32_t	value;
>  } fillers[] = {
>  	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
> -	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
> -	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
> -	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
> -
> -	/*
> -	 * following two are skipped because blending seems to work
> -	 * incorrectly with exception of AR24 on cursor plane.
> -	 * Test still creates the planes, just filling plane
> -	 * and getting crc is skipped.
> -	 */
> -	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
> -	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
> -
> -	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
>  	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
> -
> -	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
> -	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
> -	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
> -	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
> -
> -	/*
> -	 * (semi-)planar formats
> -	 */
> -	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
> -#ifdef DRM_FORMAT_P010
> -	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
> -#endif
> -#ifdef DRM_FORMAT_P012
> -	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
> -#endif
> -#ifdef DRM_FORMAT_P016
> -	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
> -#endif
>  	{ 0, 0, 0, 0 }
>  };
>  
> @@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data,
> igt_output_t *output, igt_plane_t *plane,
>  		       uint32_t format)
>  {
>  	signed i, c, writesize;
> -	unsigned short* ptemp_16_buf;
>  	unsigned int* ptemp_32_buf;
>  
> -	for( i = 0; fillers[i].fourcc != 0; i++ ) {
> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
>  		if( fillers[i].fourcc == format )
>  			break;
>  	}
> @@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data,
> igt_output_t *output, igt_plane_t *plane,
>  			ptemp_32_buf[c] = fillers[i].value;
>  		writesize = data->size;
>  		break;
> -	case BYTES_PP_2:
> -		ptemp_16_buf = (unsigned short*)data->buf;
> -		for (c = 0; c < data->size/2; c++)
> -			ptemp_16_buf[c] = (unsigned
> short)fillers[i].value;
> -		writesize = data->size;
> -		break;
>  	case BYTES_PP_1:
>  		memset((void *)data->buf, fillers[i].value, data-
> >size);
>  		writesize = data->size;
>  		break;
> -	case NV12:
> -		memset((void *)data->buf, fillers[i].value&0xff,
> -		       data->fb.offsets[1]);
> -
> -		memset((void *)(data->buf+data->fb.offsets[1]),
> -		       (fillers[i].value>>8)&0xff,
> -		       data->size - data->fb.offsets[1]);
> -
> -		writesize = data->size;
> -		break;
> -	case P010:
> -		ptemp_16_buf = (unsigned short*)data->buf;
> -		for (c = 0; c < data->size/2; c++)
> -			ptemp_16_buf[c] = (unsigned
> short)fillers[i].value&0xffff;
> -
> -		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
> -		for (c = 0; c < data->size/2; c++)
> -			ptemp_16_buf[c] = (unsigned
> short)(fillers[i].value>>16)&0xffff;
> -
> -		writesize = data->size+data->size/2;
> -		break;
> -	case SKIP4:
> -		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
> -		    plane->type == DRM_PLANE_TYPE_CURSOR) {
> -		/*
> -		 * special for cursor plane where blending works
> correctly.
> -		 */
> -			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;
> -		}
> -		igt_info("Format %s CRC comparison skipped by
> design.\n",
> -			 (char*)&fillers[i].fourcc);
> -
> -		return false;
>  	default:
>  		igt_info("Unsupported mode for test %s\n",
>  			 (char*)&fillers[i].fourcc);
> @@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t
> *output, igt_plane_t *plane,
>  		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
>  	}
>  
> -	for (i = 0; fillers[i].fourcc != 0; i++) {
> -		if (fillers[i].fourcc == format)
> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
> +		if( fillers[i].fourcc == format )
>  			break;
>  	}
>  
>  	switch (fillers[i].bpp) {
> -	case NV12:
>  	case BYTES_PP_1:
>  		bpp = 8;
>  		break;
> -
> -	case P010:
> -	case BYTES_PP_2:
> -		bpp = 16;
> -		break;
> -
> -	case SKIP4:
>  	case BYTES_PP_4:
>  		bpp = 32;
>  		break;
> +	default:
> +		return false;

Hmm, we should never hit this condition. Mark this as a failure so that
the test gets fixed?

>  	}
>  
>  	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
> @@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t
> *output, igt_plane_t *plane,
>  	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
>  	gemsize = data->size = data->fb.strides[0] * ALIGN(h,
> tile_height);
>  
> -	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
> -		data->fb.offsets[1] = data->size;
> -		data->fb.strides[1] = data->fb.strides[0];
> -		gemsize = data->size * 2;
> -
> -		if (fillers[i].bpp == NV12)
> -			data->size += data->fb.strides[1] * ALIGN(h/2,
> tile_height);
> -
> -		num_planes = 2;
> -	}
> -
>  	data->gem_handle = gem_create(data->gfx_fd, gemsize);
>  	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
>  			       igt_fb_mod_to_tiling(tiling),
> @@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data,
> igt_output_t *output,
>  
>  static int
>  test_one_mode(data_t* data, igt_output_t *output, igt_plane_t*
> plane,
> -	      int mode)
> +	      int mode, enum pipe pipe)
s/mode/format
Comment applies to other places too.


>  {
>  	igt_crc_t current_crc;
>  	signed rVal = 0;
>  	bool do_crc;
> -	char* crccompare[2];
> +	int i;
> +
> +	/*
> +	 * Limit tests only to those fb formats listed in fillers table
> +	 */
> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
> +		if( fillers[i].fourcc == mode )
> +			break;
> +	}
> +
> +	if(fillers[i].bpp == 0)
> +		return false;
.bpp is always valid for the two formats that are tested, isn't it? In
that case .bpp == 0 is a test failure.

>  
>  	if (prepare_crtc(data, output, plane, mode)){
>  		/*
> @@ -412,29 +325,30 @@ test_one_mode(data_t* data, igt_output_t
> *output, igt_plane_t* plane,
>  			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
>  				if (!igt_check_crc_equal(&current_crc,
>  					&data->fullscreen_crc)) {
> -					crccompare[0] =
> igt_crc_to_string(&current_crc);
> -					crccompare[1] =
> igt_crc_to_string(&data->fullscreen_crc);
> -					igt_warn("crc mismatch. target
> %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
> -					free(crccompare[0]);
> -					free(crccompare[1]);
> +					igt_warn("crc mismatch.
> connector %s using pipe %s" \
> +						" plane index %d mode
> %.4s\n",
> +						igt_output_name(output)
> ,
> +						kmstest_pipe_name(pipe)
> ,
> +						plane->index,
> +						(char*)&mode);
>  					rVal++;
>  				}
>  			} else {
>  				if (!igt_check_crc_equal(&current_crc,
>  					&data->cursor_crc)) {
> -					crccompare[0] =
> igt_crc_to_string(&current_crc);
> -					crccompare[1] =
> igt_crc_to_string(&data->cursor_crc);
> -					igt_warn("crc mismatch. target
> %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
> -					free(crccompare[0]);
> -					free(crccompare[1]);
> +					igt_warn("crc mismatch.
> connector %s using pipe %s" \
> +						" plane index %d mode
> %.4s\n",
> +						igt_output_name(output)
> ,
> +						kmstest_pipe_name(pipe)
> ,
> +						plane->index,
> +						(char*)&mode);
>  					rVal++;
>  				}
>  			}
>  		}
> -		remove_fb(data, output, plane);
> -		return rVal;
>  	}
> -	return 1;
> +	remove_fb(data, output, plane);
> +	return rVal;
>  }
>  
>  
> @@ -445,14 +359,44 @@ test_available_modes(data_t* data)
>  	igt_plane_t *plane;
>  	int modeindex;
>  	enum pipe pipe;
> -	int invalids = 0;
> +	int invalids = 0, i, lut_size;
>  	drmModePlane *modePlane;
> -	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
> +
> +	struct {
> +	    uint16_t red;
> +	    uint16_t green;
> +	    uint16_t blue;
> +	    uint16_t reserved;
> +	} *lut = NULL;
>  
>  	for_each_pipe_with_valid_output(&data->display, pipe, output) {
>  		igt_output_set_pipe(output, pipe);
>  		igt_display_commit2(&data->display, data->commit);
>  
> +		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe],
> IGT_CRTC_GAMMA_LUT_SIZE)) {
> +			lut_size = igt_pipe_get_prop(&data->display,
> pipe,
> +						     IGT_CRTC_GAMMA_LUT
> _SIZE);
> +
> +			lut = calloc(sizeof(*lut), lut_size);
> +
> +			for (i = 0; i < lut_size; i++) {
> +				lut[i].red = (i * 0xffff / (lut_size -
> 1)) & 0x8000;
> +				lut[i].green = (i * 0xffff / (lut_size
> - 1)) & 0x8000;
> +				lut[i].blue = (i * 0xffff / (lut_size -
> 1)) & 0x8000;
> +			}
> +
> +			igt_pipe_replace_prop_blob(&data->display,
> pipe,
> +						   IGT_CRTC_GAMMA_LUT,
> +						   lut, sizeof(*lut) *
> lut_size);
> +			igt_display_commit2(&data->display, data-
> >commit);
> +
> +			for (i = 0; i < lut_size; i++) {
> +				lut[i].red = i * 0xffff / (lut_size -
> 1);
> +				lut[i].green = i * 0xffff / (lut_size -
> 1);
> +				lut[i].blue = i * 0xffff / (lut_size -
> 1);
> +			}
> +		}
> +
>  		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
>  						  INTEL_PIPE_CRC_SOURCE
> _AUTO);
>  
> @@ -467,29 +411,34 @@ test_available_modes(data_t* data)
>  			modePlane = drmModeGetPlane(data->gfx_fd,
>  						    plane->drm_plane-
> >plane_id);
>  
> +			if (plane->type == DRM_PLANE_TYPE_CURSOR)
> +				continue;
> +
>  			for (modeindex = 0;
>  			     modeindex < modePlane->count_formats;
>  			     modeindex++) {
>  				data->format.dword = modePlane-
> >formats[modeindex];
>  
> -				igt_info("Testing connector %s using
> pipe %s" \
> -					 " plane index %d type %s mode
> %s\n",
> -					 igt_output_name(output),
> -					 kmstest_pipe_name(pipe),
> -					 plane->index,
> -					 planetype[plane->type],
> -					 (char*)&data->format.name);

Not sure why this was removed, perhaps convert it to igt_debug()? It's
hard to tell what is being tested now even with the --debug option.

If you want to address the comments in a separate patch, feel free to
add 
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>


> -
>  				invalids += test_one_mode(data, output,
>  							  plane,
> -							  modePlane-
> >formats[modeindex]);
> +							  modePlane-
> >formats[modeindex],
> +							  pipe);
>  			}
>  			drmModeFreePlane(modePlane);
>  		}
>  		igt_pipe_crc_stop(data->pipe_crc);
>  		igt_pipe_crc_free(data->pipe_crc);
> -		igt_display_commit2(&data->display, data->commit);
> +
> +		if (lut != NULL) {
> +			igt_pipe_replace_prop_blob(&data->display,
> pipe,
> +						   IGT_CRTC_GAMMA_LUT,
> +						   lut, sizeof(*lut) *
> lut_size);
> +			free(lut);
> +			lut = NULL;
> +		}
> +
>  		igt_output_set_pipe(output, PIPE_NONE);
> +		igt_display_commit2(&data->display, data->commit);
>  	}
>  	igt_assert(invalids == 0);
>  }

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-19 10:25 Juha-Pekka Heikkila
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-19 10:25 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 220 ++++++++++++++++------------------------
 1 file changed, 85 insertions(+), 135 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..e18e6cf 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -101,17 +101,17 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
 	cairo_destroy(cr);
@@ -121,49 +121,12 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
-	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+	enum		{ BYTES_PP_1 = 1,
+				BYTES_PP_4 = 4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,11 +138,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
-		if( fillers[i].fourcc == format )
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == format)
 			break;
 	}
 
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
 		igt_info("Unsupported mode for test %s\n",
 			 (char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
 		if (fillers[i].fourcc == format)
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		return false;
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for (i = 0; i < ARRAY_SIZE(fillers)-1; i++) {
+		if (fillers[i].fourcc == mode)
+			break;
+	}
+
+	if (fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -407,34 +320,36 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 		igt_display_commit2(&data->display, data->commit);
 
 		if (do_crc) {
+			igt_wait_for_vblank(data->gfx_fd, pipe);
 			igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &current_crc);
 
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char *)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -445,14 +360,44 @@ test_available_modes(data_t* data)
 	igt_plane_t *plane;
 	int modeindex;
 	enum pipe pipe;
-	int invalids = 0;
+	int invalids = 0, i, lut_size;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
+
+	struct {
+		uint16_t red;
+		uint16_t green;
+		uint16_t blue;
+		uint16_t reserved;
+	} *lut = NULL;
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
 
+		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
+			lut_size = igt_pipe_get_prop(&data->display, pipe,
+						     IGT_CRTC_GAMMA_LUT_SIZE);
+
+			lut = calloc(sizeof(*lut), lut_size);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0x8000;
+				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0x8000;
+				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0x8000;
+			}
+
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			igt_display_commit2(&data->display, data->commit);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = i * 0xffff / (lut_size - 1);
+				lut[i].green = i * 0xffff / (lut_size - 1);
+				lut[i].blue = i * 0xffff / (lut_size - 1);
+			}
+		}
+
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -467,29 +412,34 @@ test_available_modes(data_t* data)
 			modePlane = drmModeGetPlane(data->gfx_fd,
 						    plane->drm_plane->plane_id);
 
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+
 			for (modeindex = 0;
 			     modeindex < modePlane->count_formats;
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
+
+		if (lut != NULL) {
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			free(lut);
+			lut = NULL;
+		}
+
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
  2019-02-18 14:22 Juha-Pekka Heikkila
@ 2019-02-18 14:28 ` Ville Syrjälä
  2019-02-21  0:01 ` Dhinakaran Pandiyan
  1 sibling, 0 replies; 20+ messages in thread
From: Ville Syrjälä @ 2019-02-18 14:28 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

On Mon, Feb 18, 2019 at 04:22:07PM +0200, Juha-Pekka Heikkila wrote:
> This test is causing too much useless noise. Limit tested
> fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
> These two formats are currently not tested otherwise thus
> they're left here for now. DRM_FORMAT_XBGR2101010 need to be
> included into IGT supported formats and DRM_FORMAT_C8 test need
> to be moved elsewhere, maybe into kms_plane.
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>

Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  tests/kms_available_modes_crc.c | 217 +++++++++++++++-------------------------
>  1 file changed, 83 insertions(+), 134 deletions(-)
> 
> diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
> index 7ff385f..a51006b 100644
> --- a/tests/kms_available_modes_crc.c
> +++ b/tests/kms_available_modes_crc.c
> @@ -101,17 +101,17 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
>  	igt_plane_set_fb(primary, &data->primary_fb);
>  	igt_display_commit2(&data->display, data->commit);
>  
> +	igt_pipe_crc_drain(data->pipe_crc);
>  	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
>  	igt_plane_set_fb(primary, NULL);
>  	igt_display_commit2(&data->display, data->commit);
>  
> -	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
> -		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
> -		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
> +	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
>  
>  	igt_plane_set_fb(primary, &data->primary_fb);
>  	igt_display_commit2(&data->display, data->commit);
>  
> +	igt_pipe_crc_drain(data->pipe_crc);
>  	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
>  
>  	cairo_destroy(cr);
> @@ -122,48 +122,11 @@ static const struct {
>  	uint32_t	fourcc;
>  	char		zeropadding;
>  	enum		{ BYTES_PP_1=1,
> -				BYTES_PP_2=2,
> -				BYTES_PP_4=4,
> -				NV12,
> -				P010,
> -				SKIP4 } bpp;
> +				BYTES_PP_4=4} bpp;
>  	uint32_t	value;
>  } fillers[] = {
>  	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
> -	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
> -	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
> -	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
> -
> -	/*
> -	 * following two are skipped because blending seems to work
> -	 * incorrectly with exception of AR24 on cursor plane.
> -	 * Test still creates the planes, just filling plane
> -	 * and getting crc is skipped.
> -	 */
> -	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
> -	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
> -
> -	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
>  	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
> -
> -	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
> -	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
> -	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
> -	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
> -
> -	/*
> -	 * (semi-)planar formats
> -	 */
> -	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
> -#ifdef DRM_FORMAT_P010
> -	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
> -#endif
> -#ifdef DRM_FORMAT_P012
> -	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
> -#endif
> -#ifdef DRM_FORMAT_P016
> -	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
> -#endif
>  	{ 0, 0, 0, 0 }
>  };
>  
> @@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
>  		       uint32_t format)
>  {
>  	signed i, c, writesize;
> -	unsigned short* ptemp_16_buf;
>  	unsigned int* ptemp_32_buf;
>  
> -	for( i = 0; fillers[i].fourcc != 0; i++ ) {
> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
>  		if( fillers[i].fourcc == format )
>  			break;
>  	}
> @@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
>  			ptemp_32_buf[c] = fillers[i].value;
>  		writesize = data->size;
>  		break;
> -	case BYTES_PP_2:
> -		ptemp_16_buf = (unsigned short*)data->buf;
> -		for (c = 0; c < data->size/2; c++)
> -			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
> -		writesize = data->size;
> -		break;
>  	case BYTES_PP_1:
>  		memset((void *)data->buf, fillers[i].value, data->size);
>  		writesize = data->size;
>  		break;
> -	case NV12:
> -		memset((void *)data->buf, fillers[i].value&0xff,
> -		       data->fb.offsets[1]);
> -
> -		memset((void *)(data->buf+data->fb.offsets[1]),
> -		       (fillers[i].value>>8)&0xff,
> -		       data->size - data->fb.offsets[1]);
> -
> -		writesize = data->size;
> -		break;
> -	case P010:
> -		ptemp_16_buf = (unsigned short*)data->buf;
> -		for (c = 0; c < data->size/2; c++)
> -			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
> -
> -		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
> -		for (c = 0; c < data->size/2; c++)
> -			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
> -
> -		writesize = data->size+data->size/2;
> -		break;
> -	case SKIP4:
> -		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
> -		    plane->type == DRM_PLANE_TYPE_CURSOR) {
> -		/*
> -		 * special for cursor plane where blending works correctly.
> -		 */
> -			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;
> -		}
> -		igt_info("Format %s CRC comparison skipped by design.\n",
> -			 (char*)&fillers[i].fourcc);
> -
> -		return false;
>  	default:
>  		igt_info("Unsupported mode for test %s\n",
>  			 (char*)&fillers[i].fourcc);
> @@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
>  		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
>  	}
>  
> -	for (i = 0; fillers[i].fourcc != 0; i++) {
> -		if (fillers[i].fourcc == format)
> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
> +		if( fillers[i].fourcc == format )
>  			break;
>  	}
>  
>  	switch (fillers[i].bpp) {
> -	case NV12:
>  	case BYTES_PP_1:
>  		bpp = 8;
>  		break;
> -
> -	case P010:
> -	case BYTES_PP_2:
> -		bpp = 16;
> -		break;
> -
> -	case SKIP4:
>  	case BYTES_PP_4:
>  		bpp = 32;
>  		break;
> +	default:
> +		return false;
>  	}
>  
>  	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
> @@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
>  	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
>  	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
>  
> -	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
> -		data->fb.offsets[1] = data->size;
> -		data->fb.strides[1] = data->fb.strides[0];
> -		gemsize = data->size * 2;
> -
> -		if (fillers[i].bpp == NV12)
> -			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
> -
> -		num_planes = 2;
> -	}
> -
>  	data->gem_handle = gem_create(data->gfx_fd, gemsize);
>  	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
>  			       igt_fb_mod_to_tiling(tiling),
> @@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
>  
>  static int
>  test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
> -	      int mode)
> +	      int mode, enum pipe pipe)
>  {
>  	igt_crc_t current_crc;
>  	signed rVal = 0;
>  	bool do_crc;
> -	char* crccompare[2];
> +	int i;
> +
> +	/*
> +	 * Limit tests only to those fb formats listed in fillers table
> +	 */
> +	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
> +		if( fillers[i].fourcc == mode )
> +			break;
> +	}
> +
> +	if(fillers[i].bpp == 0)
> +		return false;
>  
>  	if (prepare_crtc(data, output, plane, mode)){
>  		/*
> @@ -412,29 +325,30 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
>  			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
>  				if (!igt_check_crc_equal(&current_crc,
>  					&data->fullscreen_crc)) {
> -					crccompare[0] = igt_crc_to_string(&current_crc);
> -					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
> -					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
> -					free(crccompare[0]);
> -					free(crccompare[1]);
> +					igt_warn("crc mismatch. connector %s using pipe %s" \
> +						" plane index %d mode %.4s\n",
> +						igt_output_name(output),
> +						kmstest_pipe_name(pipe),
> +						plane->index,
> +						(char*)&mode);
>  					rVal++;
>  				}
>  			} else {
>  				if (!igt_check_crc_equal(&current_crc,
>  					&data->cursor_crc)) {
> -					crccompare[0] = igt_crc_to_string(&current_crc);
> -					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
> -					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
> -					free(crccompare[0]);
> -					free(crccompare[1]);
> +					igt_warn("crc mismatch. connector %s using pipe %s" \
> +						" plane index %d mode %.4s\n",
> +						igt_output_name(output),
> +						kmstest_pipe_name(pipe),
> +						plane->index,
> +						(char*)&mode);
>  					rVal++;
>  				}
>  			}
>  		}
> -		remove_fb(data, output, plane);
> -		return rVal;
>  	}
> -	return 1;
> +	remove_fb(data, output, plane);
> +	return rVal;
>  }
>  
>  
> @@ -445,14 +359,44 @@ test_available_modes(data_t* data)
>  	igt_plane_t *plane;
>  	int modeindex;
>  	enum pipe pipe;
> -	int invalids = 0;
> +	int invalids = 0, i, lut_size;
>  	drmModePlane *modePlane;
> -	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
> +
> +	struct {
> +	    uint16_t red;
> +	    uint16_t green;
> +	    uint16_t blue;
> +	    uint16_t reserved;
> +	} *lut = NULL;
>  
>  	for_each_pipe_with_valid_output(&data->display, pipe, output) {
>  		igt_output_set_pipe(output, pipe);
>  		igt_display_commit2(&data->display, data->commit);
>  
> +		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
> +			lut_size = igt_pipe_get_prop(&data->display, pipe,
> +						     IGT_CRTC_GAMMA_LUT_SIZE);
> +
> +			lut = calloc(sizeof(*lut), lut_size);
> +
> +			for (i = 0; i < lut_size; i++) {
> +				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0x8000;
> +				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0x8000;
> +				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0x8000;
> +			}
> +
> +			igt_pipe_replace_prop_blob(&data->display, pipe,
> +						   IGT_CRTC_GAMMA_LUT,
> +						   lut, sizeof(*lut) * lut_size);
> +			igt_display_commit2(&data->display, data->commit);
> +
> +			for (i = 0; i < lut_size; i++) {
> +				lut[i].red = i * 0xffff / (lut_size - 1);
> +				lut[i].green = i * 0xffff / (lut_size - 1);
> +				lut[i].blue = i * 0xffff / (lut_size - 1);
> +			}
> +		}
> +
>  		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
>  						  INTEL_PIPE_CRC_SOURCE_AUTO);
>  
> @@ -467,29 +411,34 @@ test_available_modes(data_t* data)
>  			modePlane = drmModeGetPlane(data->gfx_fd,
>  						    plane->drm_plane->plane_id);
>  
> +			if (plane->type == DRM_PLANE_TYPE_CURSOR)
> +				continue;
> +
>  			for (modeindex = 0;
>  			     modeindex < modePlane->count_formats;
>  			     modeindex++) {
>  				data->format.dword = modePlane->formats[modeindex];
>  
> -				igt_info("Testing connector %s using pipe %s" \
> -					 " plane index %d type %s mode %s\n",
> -					 igt_output_name(output),
> -					 kmstest_pipe_name(pipe),
> -					 plane->index,
> -					 planetype[plane->type],
> -					 (char*)&data->format.name);
> -
>  				invalids += test_one_mode(data, output,
>  							  plane,
> -							  modePlane->formats[modeindex]);
> +							  modePlane->formats[modeindex],
> +							  pipe);
>  			}
>  			drmModeFreePlane(modePlane);
>  		}
>  		igt_pipe_crc_stop(data->pipe_crc);
>  		igt_pipe_crc_free(data->pipe_crc);
> -		igt_display_commit2(&data->display, data->commit);
> +
> +		if (lut != NULL) {
> +			igt_pipe_replace_prop_blob(&data->display, pipe,
> +						   IGT_CRTC_GAMMA_LUT,
> +						   lut, sizeof(*lut) * lut_size);
> +			free(lut);
> +			lut = NULL;
> +		}
> +
>  		igt_output_set_pipe(output, PIPE_NONE);
> +		igt_display_commit2(&data->display, data->commit);
>  	}
>  	igt_assert(invalids == 0);
>  }
> -- 
> 2.7.4
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-18 14:22 Juha-Pekka Heikkila
  2019-02-18 14:28 ` Ville Syrjälä
  2019-02-21  0:01 ` Dhinakaran Pandiyan
  0 siblings, 2 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-18 14:22 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 217 +++++++++++++++-------------------------
 1 file changed, 83 insertions(+), 134 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..a51006b 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -101,17 +101,17 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
 	cairo_destroy(cr);
@@ -122,48 +122,11 @@ static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
 	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+				BYTES_PP_4=4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
 		if( fillers[i].fourcc == format )
 			break;
 	}
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
 		igt_info("Unsupported mode for test %s\n",
 			 (char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
-		if (fillers[i].fourcc == format)
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == format )
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		return false;
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == mode )
+			break;
+	}
+
+	if(fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -412,29 +325,30 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -445,14 +359,44 @@ test_available_modes(data_t* data)
 	igt_plane_t *plane;
 	int modeindex;
 	enum pipe pipe;
-	int invalids = 0;
+	int invalids = 0, i, lut_size;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
+
+	struct {
+	    uint16_t red;
+	    uint16_t green;
+	    uint16_t blue;
+	    uint16_t reserved;
+	} *lut = NULL;
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
 
+		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
+			lut_size = igt_pipe_get_prop(&data->display, pipe,
+						     IGT_CRTC_GAMMA_LUT_SIZE);
+
+			lut = calloc(sizeof(*lut), lut_size);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0x8000;
+				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0x8000;
+				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0x8000;
+			}
+
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			igt_display_commit2(&data->display, data->commit);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = i * 0xffff / (lut_size - 1);
+				lut[i].green = i * 0xffff / (lut_size - 1);
+				lut[i].blue = i * 0xffff / (lut_size - 1);
+			}
+		}
+
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -467,29 +411,34 @@ test_available_modes(data_t* data)
 			modePlane = drmModeGetPlane(data->gfx_fd,
 						    plane->drm_plane->plane_id);
 
+			if (plane->type == DRM_PLANE_TYPE_CURSOR)
+				continue;
+
 			for (modeindex = 0;
 			     modeindex < modePlane->count_formats;
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
+
+		if (lut != NULL) {
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			free(lut);
+			lut = NULL;
+		}
+
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-15 13:25 Juha-Pekka Heikkila via igt-dev
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila via igt-dev @ 2019-02-15 13:25 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 214 +++++++++++++++-------------------------
 1 file changed, 80 insertions(+), 134 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..edd3e04 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -101,17 +101,17 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
 	cairo_destroy(cr);
@@ -122,48 +122,11 @@ static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
 	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+				BYTES_PP_4=4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
 		if( fillers[i].fourcc == format )
 			break;
 	}
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
 		igt_info("Unsupported mode for test %s\n",
 			 (char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
-		if (fillers[i].fourcc == format)
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == format )
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		return false;
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == mode )
+			break;
+	}
+
+	if(fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -412,29 +325,30 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -445,14 +359,44 @@ test_available_modes(data_t* data)
 	igt_plane_t *plane;
 	int modeindex;
 	enum pipe pipe;
-	int invalids = 0;
+	int invalids = 0, i, lut_size;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
+
+	struct {
+	    uint16_t red;
+	    uint16_t green;
+	    uint16_t blue;
+	    uint16_t reserved;
+	} *lut = NULL;
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
 
+		if (igt_pipe_obj_has_prop(&data->display.pipes[pipe], IGT_CRTC_GAMMA_LUT_SIZE)) {
+			lut_size = igt_pipe_get_prop(&data->display, pipe,
+						     IGT_CRTC_GAMMA_LUT_SIZE);
+
+			lut = calloc(sizeof(*lut), lut_size);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = (i * 0xffff / (lut_size - 1)) & 0x8000;
+				lut[i].green = (i * 0xffff / (lut_size - 1)) & 0x8000;
+				lut[i].blue = (i * 0xffff / (lut_size - 1)) & 0x8000;
+			}
+
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			igt_display_commit2(&data->display, data->commit);
+
+			for (i = 0; i < lut_size; i++) {
+				lut[i].red = i * 0xffff / (lut_size - 1);
+				lut[i].green = i * 0xffff / (lut_size - 1);
+				lut[i].blue = i * 0xffff / (lut_size - 1);
+			}
+		}
+
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -472,24 +416,26 @@ test_available_modes(data_t* data)
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
+
+		if (lut != NULL) {
+			igt_pipe_replace_prop_blob(&data->display, pipe,
+						   IGT_CRTC_GAMMA_LUT,
+						   lut, sizeof(*lut) * lut_size);
+			free(lut);
+			lut = NULL;
+		}
+
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-14 11:12 Juha-Pekka Heikkila via igt-dev
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila via igt-dev @ 2019-02-14 11:12 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 173 +++++++++-------------------------------
 1 file changed, 39 insertions(+), 134 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..99bcede 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -101,17 +101,17 @@ static void generate_comparison_crc_list(data_t *data, igt_output_t *output)
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->cursor_crc);
 	igt_plane_set_fb(primary, NULL);
 	igt_display_commit2(&data->display, data->commit);
 
-	intel_gen(intel_get_drm_devid(data->gfx_fd)) < 9 ?
-		  igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0) :
-		  igt_paint_color_alpha(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0, 1.0);
+	igt_paint_color(cr, 0, 0, mode->hdisplay, mode->vdisplay, 1.0, 1.0, 1.0);
 
 	igt_plane_set_fb(primary, &data->primary_fb);
 	igt_display_commit2(&data->display, data->commit);
 
+	igt_pipe_crc_drain(data->pipe_crc);
 	igt_pipe_crc_get_current(data->gfx_fd, data->pipe_crc, &data->fullscreen_crc);
 
 	cairo_destroy(cr);
@@ -122,48 +122,11 @@ static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
 	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+				BYTES_PP_4=4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
 		if( fillers[i].fourcc == format )
 			break;
 	}
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
 		igt_info("Unsupported mode for test %s\n",
 			 (char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
-		if (fillers[i].fourcc == format)
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == format )
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		return false;
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == mode )
+			break;
+	}
+
+	if(fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -412,29 +325,30 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -447,12 +361,10 @@ test_available_modes(data_t* data)
 	enum pipe pipe;
 	int invalids = 0;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
 		igt_display_commit2(&data->display, data->commit);
-
 		data->pipe_crc = igt_pipe_crc_new(data->gfx_fd, pipe,
 						  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -472,24 +384,17 @@ test_available_modes(data_t* data)
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
 		igt_pipe_crc_stop(data->pipe_crc);
 		igt_pipe_crc_free(data->pipe_crc);
-		igt_display_commit2(&data->display, data->commit);
 		igt_output_set_pipe(output, PIPE_NONE);
+		igt_display_commit2(&data->display, data->commit);
 	}
 	igt_assert(invalids == 0);
 }
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-11 15:08 Juha-Pekka Heikkila
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-11 15:08 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 164 +++++++++-------------------------------
 1 file changed, 35 insertions(+), 129 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..1582eed 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -122,48 +122,11 @@ static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
 	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+				BYTES_PP_4=4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
 		if( fillers[i].fourcc == format )
 			break;
 	}
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
 		igt_info("Unsupported mode for test %s\n",
 			 (char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
-		if (fillers[i].fourcc == format)
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == format )
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		return false;
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == mode )
+			break;
+	}
+
+	if(fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -412,29 +325,30 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -447,7 +361,6 @@ test_available_modes(data_t* data)
 	enum pipe pipe;
 	int invalids = 0;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
@@ -472,17 +385,10 @@ test_available_modes(data_t* data)
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
  2019-02-11 11:45 Juha-Pekka Heikkila
@ 2019-02-11 15:03 ` Juha-Pekka Heikkila
  0 siblings, 0 replies; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-11 15:03 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 166 +++++++++-------------------------------
 1 file changed, 36 insertions(+), 130 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..8f33edc 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -122,48 +122,11 @@ static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
 	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+				BYTES_PP_4=4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
 		if( fillers[i].fourcc == format )
 			break;
 	}
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
 		igt_info("Unsupported mode for test %s\n",
 			 (char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
-		if (fillers[i].fourcc == format)
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == format )
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		return false;
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -386,12 +288,23 @@ static bool prepare_crtc(data_t *data, igt_output_t *output,
 
 static int
 test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
-	      int mode)
+	      int mode, enum pipe pipe)
 {
 	igt_crc_t current_crc;
 	signed rVal = 0;
 	bool do_crc;
-	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == mode )
+			break;
+	}
+
+	if(fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -411,30 +324,31 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 
 			if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 				if (!igt_check_crc_equal(&current_crc,
-					&data->fullscreen_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->fullscreen_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					&data->fullscreen_crc)||1) {
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			} else {
 				if (!igt_check_crc_equal(&current_crc,
 					&data->cursor_crc)) {
-					crccompare[0] = igt_crc_to_string(&current_crc);
-					crccompare[1] = igt_crc_to_string(&data->cursor_crc);
-					igt_warn("crc mismatch. target %.8s, result %.8s.\n", crccompare[0], crccompare[1]);
-					free(crccompare[0]);
-					free(crccompare[1]);
+					igt_warn("crc mismatch. connector %s using pipe %s" \
+						" plane index %d mode %.4s\n",
+						igt_output_name(output),
+						kmstest_pipe_name(pipe),
+						plane->index,
+						(char*)&mode);
 					rVal++;
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -447,7 +361,6 @@ test_available_modes(data_t* data)
 	enum pipe pipe;
 	int invalids = 0;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
@@ -472,17 +385,10 @@ test_available_modes(data_t* data)
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
-							  modePlane->formats[modeindex]);
+							  modePlane->formats[modeindex],
+							  pipe);
 			}
 			drmModeFreePlane(modePlane);
 		}
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats
@ 2019-02-11 11:45 Juha-Pekka Heikkila
  2019-02-11 15:03 ` Juha-Pekka Heikkila
  0 siblings, 1 reply; 20+ messages in thread
From: Juha-Pekka Heikkila @ 2019-02-11 11:45 UTC (permalink / raw)
  To: igt-dev

This test is causing too much useless noise. Limit tested
fb formats to DRM_FORMAT_C8 and DRM_FORMAT_XBGR2101010 for now.
These two formats are currently not tested otherwise thus
they're left here for now. DRM_FORMAT_XBGR2101010 need to be
included into IGT supported formats and DRM_FORMAT_C8 test need
to be moved elsewhere, maybe into kms_plane.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/kms_available_modes_crc.c | 136 ++++++----------------------------------
 1 file changed, 20 insertions(+), 116 deletions(-)

diff --git a/tests/kms_available_modes_crc.c b/tests/kms_available_modes_crc.c
index 7ff385f..eafccfb 100644
--- a/tests/kms_available_modes_crc.c
+++ b/tests/kms_available_modes_crc.c
@@ -122,48 +122,11 @@ static const struct {
 	uint32_t	fourcc;
 	char		zeropadding;
 	enum		{ BYTES_PP_1=1,
-				BYTES_PP_2=2,
-				BYTES_PP_4=4,
-				NV12,
-				P010,
-				SKIP4 } bpp;
+				BYTES_PP_4=4} bpp;
 	uint32_t	value;
 } fillers[] = {
 	{ DRM_FORMAT_C8, 0, BYTES_PP_1, 0xff},
-	{ DRM_FORMAT_RGB565, 0, BYTES_PP_2, 0xffff},
-	{ DRM_FORMAT_XRGB8888, 0, BYTES_PP_4, 0xffffffff},
-	{ DRM_FORMAT_XBGR8888, 0, BYTES_PP_4, 0xffffffff},
-
-	/*
-	 * following two are skipped because blending seems to work
-	 * incorrectly with exception of AR24 on cursor plane.
-	 * Test still creates the planes, just filling plane
-	 * and getting crc is skipped.
-	 */
-	{ DRM_FORMAT_ARGB8888, 0, SKIP4, 0xffffffff},
-	{ DRM_FORMAT_ABGR8888, 0, SKIP4, 0x00ffffff},
-
-	{ DRM_FORMAT_XRGB2101010, 0, BYTES_PP_4, 0xffffffff},
 	{ DRM_FORMAT_XBGR2101010, 0, BYTES_PP_4, 0xffffffff},
-
-	{ DRM_FORMAT_YUYV, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_YVYU, 0, BYTES_PP_4, 0x80eb80eb},
-	{ DRM_FORMAT_VYUY, 0, BYTES_PP_4, 0xeb80eb80},
-	{ DRM_FORMAT_UYVY, 0, BYTES_PP_4, 0xeb80eb80},
-
-	/*
-	 * (semi-)planar formats
-	 */
-	{ DRM_FORMAT_NV12, 0, NV12, 0x80eb},
-#ifdef DRM_FORMAT_P010
-	{ DRM_FORMAT_P010, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P012
-	{ DRM_FORMAT_P012, 0, P010, 0x8000eb00},
-#endif
-#ifdef DRM_FORMAT_P016
-	{ DRM_FORMAT_P016, 0, P010, 0x8000eb00},
-#endif
 	{ 0, 0, 0, 0 }
 };
 
@@ -175,10 +138,9 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		       uint32_t format)
 {
 	signed i, c, writesize;
-	unsigned short* ptemp_16_buf;
 	unsigned int* ptemp_32_buf;
 
-	for( i = 0; fillers[i].fourcc != 0; i++ ) {
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
 		if( fillers[i].fourcc == format )
 			break;
 	}
@@ -190,53 +152,10 @@ static bool fill_in_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 			ptemp_32_buf[c] = fillers[i].value;
 		writesize = data->size;
 		break;
-	case BYTES_PP_2:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value;
-		writesize = data->size;
-		break;
 	case BYTES_PP_1:
 		memset((void *)data->buf, fillers[i].value, data->size);
 		writesize = data->size;
 		break;
-	case NV12:
-		memset((void *)data->buf, fillers[i].value&0xff,
-		       data->fb.offsets[1]);
-
-		memset((void *)(data->buf+data->fb.offsets[1]),
-		       (fillers[i].value>>8)&0xff,
-		       data->size - data->fb.offsets[1]);
-
-		writesize = data->size;
-		break;
-	case P010:
-		ptemp_16_buf = (unsigned short*)data->buf;
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)fillers[i].value&0xffff;
-
-		ptemp_16_buf = (unsigned short*)(data->buf+data->size);
-		for (c = 0; c < data->size/2; c++)
-			ptemp_16_buf[c] = (unsigned short)(fillers[i].value>>16)&0xffff;
-
-		writesize = data->size+data->size/2;
-		break;
-	case SKIP4:
-		if (fillers[i].fourcc == DRM_FORMAT_ARGB8888 &&
-		    plane->type == DRM_PLANE_TYPE_CURSOR) {
-		/*
-		 * special for cursor plane where blending works correctly.
-		 */
-			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;
-		}
-		igt_info("Format %s CRC comparison skipped by design.\n",
-			 (char*)&fillers[i].fourcc);
-
-		return false;
 	default:
 		igt_info("Unsupported mode for test %s\n",
 			 (char*)&fillers[i].fourcc);
@@ -271,26 +190,20 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 		tiling = LOCAL_DRM_FORMAT_MOD_NONE;
 	}
 
-	for (i = 0; fillers[i].fourcc != 0; i++) {
-		if (fillers[i].fourcc == format)
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == format )
 			break;
 	}
 
 	switch (fillers[i].bpp) {
-	case NV12:
 	case BYTES_PP_1:
 		bpp = 8;
 		break;
-
-	case P010:
-	case BYTES_PP_2:
-		bpp = 16;
-		break;
-
-	case SKIP4:
 	case BYTES_PP_4:
 		bpp = 32;
 		break;
+	default:
+		return false;
 	}
 
 	igt_get_fb_tile_size(data->gfx_fd, tiling, bpp,
@@ -299,17 +212,6 @@ static bool setup_fb(data_t *data, igt_output_t *output, igt_plane_t *plane,
 	data->fb.strides[0] = ALIGN(w * bpp / 8, tile_width);
 	gemsize = data->size = data->fb.strides[0] * ALIGN(h, tile_height);
 
-	if (fillers[i].bpp == P010 || fillers[i].bpp == NV12) {
-		data->fb.offsets[1] = data->size;
-		data->fb.strides[1] = data->fb.strides[0];
-		gemsize = data->size * 2;
-
-		if (fillers[i].bpp == NV12)
-			data->size += data->fb.strides[1] * ALIGN(h/2, tile_height);
-
-		num_planes = 2;
-	}
-
 	data->gem_handle = gem_create(data->gfx_fd, gemsize);
 	ret = __gem_set_tiling(data->gfx_fd, data->gem_handle,
 			       igt_fb_mod_to_tiling(tiling),
@@ -392,6 +294,18 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 	signed rVal = 0;
 	bool do_crc;
 	char* crccompare[2];
+	int i;
+
+	/*
+	 * Limit tests only to those fb formats listed in fillers table
+	 */
+	for( i = 0; i < ARRAY_SIZE(fillers)-1; i++ ) {
+		if( fillers[i].fourcc == mode )
+			break;
+	}
+
+	if(fillers[i].bpp == 0)
+		return false;
 
 	if (prepare_crtc(data, output, plane, mode)){
 		/*
@@ -431,10 +345,9 @@ test_one_mode(data_t* data, igt_output_t *output, igt_plane_t* plane,
 				}
 			}
 		}
-		remove_fb(data, output, plane);
-		return rVal;
 	}
-	return 1;
+	remove_fb(data, output, plane);
+	return rVal;
 }
 
 
@@ -447,7 +360,6 @@ test_available_modes(data_t* data)
 	enum pipe pipe;
 	int invalids = 0;
 	drmModePlane *modePlane;
-	char planetype[3][8] = {"OVERLAY\0", "PRIMARY\0", "CURSOR\0" };
 
 	for_each_pipe_with_valid_output(&data->display, pipe, output) {
 		igt_output_set_pipe(output, pipe);
@@ -472,14 +384,6 @@ test_available_modes(data_t* data)
 			     modeindex++) {
 				data->format.dword = modePlane->formats[modeindex];
 
-				igt_info("Testing connector %s using pipe %s" \
-					 " plane index %d type %s mode %s\n",
-					 igt_output_name(output),
-					 kmstest_pipe_name(pipe),
-					 plane->index,
-					 planetype[plane->type],
-					 (char*)&data->format.name);
-
 				invalids += test_one_mode(data, output,
 							  plane,
 							  modePlane->formats[modeindex]);
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-02-26 15:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22 14:28 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
2019-02-22 15:07 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev13) Patchwork
2019-02-23  0:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-23  1:42 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_available_modes_crc limit tested fb formats (rev14) Patchwork
2019-02-23  8:47 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-02-26 15:10 [igt-dev] [PATCH i-g-t] tests/kms_available_modes_crc limit tested fb formats Juha-Pekka Heikkila
2019-02-25 11:39 Juha-Pekka Heikkila
2019-02-24 20:37 Juha-Pekka Heikkila
2019-02-21 12:24 Juha-Pekka Heikkila
2019-02-19 10:25 Juha-Pekka Heikkila
2019-02-18 14:22 Juha-Pekka Heikkila
2019-02-18 14:28 ` Ville Syrjälä
2019-02-21  0:01 ` Dhinakaran Pandiyan
2019-02-21 11:28   ` Juha-Pekka Heikkila
2019-02-21 22:04     ` Dhinakaran Pandiyan
2019-02-15 13:25 Juha-Pekka Heikkila via igt-dev
2019-02-14 11:12 Juha-Pekka Heikkila via igt-dev
2019-02-11 15:08 Juha-Pekka Heikkila
2019-02-11 11:45 Juha-Pekka Heikkila
2019-02-11 15:03 ` Juha-Pekka Heikkila

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.