All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements
@ 2014-04-10 12:08 Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 1/8] kms_cursor_crc: Remove some test cases and change cursor to color Antti Koskipaa
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

This patch series enhances the cursor test to actually be useful.

The old "black transparent cursor on black background" tests are
replaced with a visible cursor and the framework is changed to
be more flexible and extendable. This way cursor rotation tests
can be added with ease in the future.

Also adds a couple more tests to the current set.

v2:
 - reinstate "go nuts" -test
 - Add background picture for better test coverage

Antti Koskipaa (8):
  kms_cursor_crc: Remove some test cases and change cursor to color
  kms_cursor_crc: Move cursor enable and disable calls where they belong
  kms_cursor_crc: Use a function pointer to call test
  kms_cursor_crc: Separate onscreen and offscreen tests
  kms_cursor_crc: Add reference software rendering
  kms_cursor_crc: Add moving cursor test
  kms_cursor_crc: Add random cursor placement test
  kms_cursor_crc: Add background picture

 tests/kms_cursor_crc.c | 255 ++++++++++++++++++++++++++++---------------------
 1 file changed, 146 insertions(+), 109 deletions(-)

-- 
1.8.3.2

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

* [PATCH i-g-t v2 1/8] kms_cursor_crc: Remove some test cases and change cursor to color
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
@ 2014-04-10 12:08 ` Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong Antti Koskipaa
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

Currently this test is quite useless, since it only checks for valid CRCs when
the correct output from a test is a completely black screen (invisible or visible
but black cursor, or cursor is offscreen) and disables the check when anything
visible is onscreen.

This patch changes the cursor to a colorful one and removes the test cases
that become redundant because of this change. The cursor is designed to be
asymmetrical such that future tests involving rotation, mirroring, etc. produce
different CRCs and failures can be detected.

This (temporarily) disables CRC testing until the next patch which will add
software rendering of the cursor and the CRC generation.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
---
 tests/kms_cursor_crc.c | 75 +++++++++++++++++++++-----------------------------
 1 file changed, 32 insertions(+), 43 deletions(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index fbb5d88..52281d0 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -39,19 +39,11 @@
 #define DRM_CAP_CURSOR_HEIGHT 0x9
 #endif
 
-enum cursor_type {
-	WHITE_VISIBLE,
-	WHITE_INVISIBLE,
-	BLACK_VISIBLE,
-	BLACK_INVISIBLE,
-	NUM_CURSOR_TYPES,
-};
-
 typedef struct {
 	int drm_fd;
 	igt_display_t display;
 	struct igt_fb primary_fb;
-	struct igt_fb fb[NUM_CURSOR_TYPES];
+	struct igt_fb fb;
 	igt_pipe_crc_t **pipe_crc;
 } data_t;
 
@@ -64,6 +56,16 @@ typedef struct {
 	int left, right, top, bottom;
 } test_data_t;
 
+static void draw_cursor(cairo_t *cr, int x, int y, int w)
+{
+	w /= 2;
+	cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
+	/* 4 color rectangles in the corners, RGBY */
+	igt_paint_color_alpha(cr, x, y, w, w, 1.0, 0.0, 0.0, 1.0);
+	igt_paint_color_alpha(cr, x + w, y, w, w, 0.0, 1.0, 0.0, 1.0);
+	igt_paint_color_alpha(cr, x, y + w, w, w, 0.0, 0.0, 1.0, 1.0);
+	igt_paint_color_alpha(cr, x + w, y + w, w, w, 0.5, 0.5, 0.5, 1.0);
+}
 
 static igt_pipe_crc_t *create_crc(data_t *data, enum pipe pipe)
 {
@@ -104,7 +106,7 @@ static void do_test(test_data_t *test_data,
 	do_single_test(test_data, left, bottom);
 }
 
-static void cursor_enable(test_data_t *test_data, enum cursor_type cursor_type)
+static void cursor_enable(test_data_t *test_data)
 {
 	data_t *data = test_data->data;
 	igt_display_t *display = &data->display;
@@ -112,7 +114,7 @@ static void cursor_enable(test_data_t *test_data, enum cursor_type cursor_type)
 	igt_plane_t *cursor;
 
 	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
-	igt_plane_set_fb(cursor, &data->fb[cursor_type]);
+	igt_plane_set_fb(cursor, &data->fb);
 	igt_display_commit(display);
 }
 
@@ -128,7 +130,7 @@ static void cursor_disable(test_data_t *test_data)
 	igt_display_commit(display);
 }
 
-static void test_crc(test_data_t *test_data, enum cursor_type cursor_type,
+static void test_crc(test_data_t *test_data,
 		     bool onscreen, int cursor_w, int cursor_h)
 {
 	int left = test_data->left;
@@ -136,11 +138,11 @@ static void test_crc(test_data_t *test_data, enum cursor_type cursor_type,
 	int top = test_data->top;
 	int bottom = test_data->bottom;
 
-	cursor_enable(test_data, cursor_type);
+	cursor_enable(test_data);
 
 	if (onscreen) {
 		/* cursor onscreen, crc should match, except when white visible cursor is used */
-		test_data->crc_must_match = (cursor_type != WHITE_VISIBLE);
+		test_data->crc_must_match = false;
 
 		/* fully inside  */
 		do_test(test_data, left, right, top, bottom);
@@ -156,7 +158,7 @@ static void test_crc(test_data_t *test_data, enum cursor_type cursor_type,
 		do_test(test_data, left - (cursor_w-1), right + (cursor_w-1), top - (cursor_h-1), bottom + (cursor_h-1));
 	} else {
 		/* cursor offscreen, crc should always match */
-		test_data->crc_must_match = true;
+		test_data->crc_must_match = false;
 
 		/* fully outside */
 		do_test(test_data, left - (cursor_w), right + (cursor_w), top             , bottom             );
@@ -255,8 +257,7 @@ static void cleanup_crtc(test_data_t *test_data, igt_output_t *output)
 	igt_output_set_pipe(output, PIPE_ANY);
 }
 
-static void run_test(data_t *data, enum cursor_type cursor_type, bool onscreen,
-		     int cursor_w, int cursor_h)
+static void run_test(data_t *data, bool onscreen, int cursor_w, int cursor_h)
 {
 	igt_display_t *display = &data->display;
 	igt_output_t *output;
@@ -280,7 +281,7 @@ static void run_test(data_t *data, enum cursor_type cursor_type, bool onscreen,
 				igt_subtest_name(), pipe_name(test_data.pipe),
 				igt_output_name(output));
 
-			test_crc(&test_data, cursor_type, onscreen, cursor_w, cursor_h);
+			test_crc(&test_data, onscreen, cursor_w, cursor_h);
 
 			fprintf(stdout, "\n%s on pipe %c, connector %s: PASSED\n\n",
 				igt_subtest_name(), pipe_name(test_data.pipe),
@@ -294,22 +295,18 @@ static void run_test(data_t *data, enum cursor_type cursor_type, bool onscreen,
 	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
 }
 
-static void create_cursor_fb(data_t *data,
-			     enum cursor_type cursor_type,
-			     double r, double g, double b, double a,
-			     int cur_w, int cur_h)
+static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
 {
 	cairo_t *cr;
-	uint32_t fb_id[NUM_CURSOR_TYPES];
+	uint32_t fb_id;
 
-	fb_id[cursor_type] = igt_create_fb(data->drm_fd, cur_w, cur_h,
-					       DRM_FORMAT_ARGB8888, false,
-					       &data->fb[cursor_type]);
-	igt_assert(fb_id[cursor_type]);
+	fb_id = igt_create_fb(data->drm_fd, cur_w, cur_h,
+			      DRM_FORMAT_ARGB8888, false,
+			      &data->fb);
+	igt_assert(fb_id);
 
-	cr = igt_get_cairo_ctx(data->drm_fd,
-				   &data->fb[cursor_type]);
-	igt_paint_color_alpha(cr, 0, 0, cur_w, cur_h, r, g, b, a);
+	cr = igt_get_cairo_ctx(data->drm_fd, &data->fb);
+	draw_cursor(cr, 0, 0, cur_w);
 	igt_assert(cairo_status(cr) == 0);
 }
 
@@ -322,21 +319,13 @@ static void run_test_generic(data_t *data, int cursor_max_size)
 		igt_require(cursor_max_size >= cursor_size);
 		sprintf(c_size, "%d", cursor_size);
 
-		/* Creating cursor framebuffers */
-		create_cursor_fb(data, WHITE_VISIBLE, 1.0, 1.0, 1.0, 1.0, cursor_size, cursor_size);
-		create_cursor_fb(data, WHITE_INVISIBLE, 1.0, 1.0, 1.0, 0.0, cursor_size, cursor_size);
-		create_cursor_fb(data, BLACK_VISIBLE, 0.0, 0.0, 0.0, 1.0, cursor_size, cursor_size);
-		create_cursor_fb(data, BLACK_INVISIBLE, 0.0, 0.0, 0.0, 0.0, cursor_size, cursor_size);
+		create_cursor_fb(data, cursor_size, cursor_size);
 
 		/* Using created cursor FBs to test cursor support */
-		igt_subtest_f("white-visible-cursor-%s-onscreen", c_size)
-			run_test(data, WHITE_VISIBLE, true, cursor_size, cursor_size);
-		igt_subtest_f("white-invisible-cursor-%s-offscreen", c_size)
-			run_test(data, WHITE_INVISIBLE, false, cursor_size, cursor_size);
-                igt_subtest_f("black-visible-cursor-%s-onscreen", c_size)
-                        run_test(data, BLACK_VISIBLE, true, cursor_size, cursor_size);
-                igt_subtest_f("black-invisible-cursor-%s-offscreen", c_size)
-                        run_test(data, BLACK_INVISIBLE, false, cursor_size, cursor_size);
+		igt_subtest_f("cursor-%s-onscreen", c_size)
+			run_test(data, true, cursor_size, cursor_size);
+		igt_subtest_f("cursor-%s-offscreen", c_size)
+			run_test(data, false, cursor_size, cursor_size);
 	}
 
 }
-- 
1.8.3.2

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

* [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 1/8] kms_cursor_crc: Remove some test cases and change cursor to color Antti Koskipaa
@ 2014-04-10 12:08 ` Antti Koskipaa
  2014-04-23 10:54   ` Ville Syrjälä
  2014-04-10 12:08 ` [PATCH i-g-t v2 3/8] kms_cursor_crc: Use a function pointer to call test Antti Koskipaa
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

We can't have the hw cursor enabled during software render tests.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
---
 tests/kms_cursor_crc.c | 54 ++++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 52281d0..8802da6 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -67,6 +67,30 @@ static void draw_cursor(cairo_t *cr, int x, int y, int w)
 	igt_paint_color_alpha(cr, x + w, y + w, w, w, 0.5, 0.5, 0.5, 1.0);
 }
 
+static void cursor_enable(test_data_t *test_data)
+{
+	data_t *data = test_data->data;
+	igt_display_t *display = &data->display;
+	igt_output_t *output = test_data->output;
+	igt_plane_t *cursor;
+
+	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
+	igt_plane_set_fb(cursor, &data->fb);
+	igt_display_commit(display);
+}
+
+static void cursor_disable(test_data_t *test_data)
+{
+	data_t *data = test_data->data;
+	igt_display_t *display = &data->display;
+	igt_output_t *output = test_data->output;
+	igt_plane_t *cursor;
+
+	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
+	igt_plane_set_fb(cursor, NULL);
+	igt_display_commit(display);
+}
+
 static igt_pipe_crc_t *create_crc(data_t *data, enum pipe pipe)
 {
 	igt_pipe_crc_t *crc;
@@ -85,10 +109,12 @@ static void do_single_test(test_data_t *test_data, int x, int y)
 
 	printf("."); fflush(stdout);
 
+	cursor_enable(test_data);
 	cursor = igt_output_get_plane(test_data->output, IGT_PLANE_CURSOR);
 	igt_plane_set_position(cursor, x, y);
 	igt_display_commit(display);
 	igt_wait_for_vblank(data->drm_fd, test_data->pipe);
+	cursor_disable(test_data);
 
 	igt_pipe_crc_collect_crc(pipe_crc, &crc);
 	if (test_data->crc_must_match)
@@ -106,30 +132,6 @@ static void do_test(test_data_t *test_data,
 	do_single_test(test_data, left, bottom);
 }
 
-static void cursor_enable(test_data_t *test_data)
-{
-	data_t *data = test_data->data;
-	igt_display_t *display = &data->display;
-	igt_output_t *output = test_data->output;
-	igt_plane_t *cursor;
-
-	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
-	igt_plane_set_fb(cursor, &data->fb);
-	igt_display_commit(display);
-}
-
-static void cursor_disable(test_data_t *test_data)
-{
-	data_t *data = test_data->data;
-	igt_display_t *display = &data->display;
-	igt_output_t *output = test_data->output;
-	igt_plane_t *cursor;
-
-	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
-	igt_plane_set_fb(cursor, NULL);
-	igt_display_commit(display);
-}
-
 static void test_crc(test_data_t *test_data,
 		     bool onscreen, int cursor_w, int cursor_h)
 {
@@ -138,8 +140,6 @@ static void test_crc(test_data_t *test_data,
 	int top = test_data->top;
 	int bottom = test_data->bottom;
 
-	cursor_enable(test_data);
-
 	if (onscreen) {
 		/* cursor onscreen, crc should match, except when white visible cursor is used */
 		test_data->crc_must_match = false;
@@ -183,8 +183,6 @@ static void test_crc(test_data_t *test_data,
 		/* go nuts */
 		do_test(test_data, INT_MIN, INT_MAX, INT_MIN, INT_MAX);
 	}
-
-	cursor_disable(test_data);
 }
 
 static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
-- 
1.8.3.2

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

* [PATCH i-g-t v2 3/8] kms_cursor_crc: Use a function pointer to call test
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 1/8] kms_cursor_crc: Remove some test cases and change cursor to color Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong Antti Koskipaa
@ 2014-04-10 12:08 ` Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 4/8] kms_cursor_crc: Separate onscreen and offscreen tests Antti Koskipaa
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

More tests are coming, and this allows us to not repeat the boilerplate
code in run_test() for each subtest.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
---
 tests/kms_cursor_crc.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 8802da6..60b50b5 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -54,6 +54,7 @@ typedef struct {
 	igt_crc_t ref_crc;
 	bool crc_must_match;
 	int left, right, top, bottom;
+	int curw, curh; /* cursor size */
 } test_data_t;
 
 static void draw_cursor(cairo_t *cr, int x, int y, int w)
@@ -133,12 +134,14 @@ static void do_test(test_data_t *test_data,
 }
 
 static void test_crc(test_data_t *test_data,
-		     bool onscreen, int cursor_w, int cursor_h)
+		     bool onscreen)
 {
 	int left = test_data->left;
 	int right = test_data->right;
 	int top = test_data->top;
 	int bottom = test_data->bottom;
+	int cursor_w = test_data->curw;
+	int cursor_h = test_data->curh;
 
 	if (onscreen) {
 		/* cursor onscreen, crc should match, except when white visible cursor is used */
@@ -228,6 +231,8 @@ static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
 	test_data->right = mode->hdisplay - cursor_w;
 	test_data->top = 0;
 	test_data->bottom = mode->vdisplay - cursor_h;
+	test_data->curw = cursor_w;
+	test_data->curh = cursor_h;
 
 	/* make sure cursor is disabled */
 	cursor_disable(test_data);
@@ -255,7 +260,7 @@ static void cleanup_crtc(test_data_t *test_data, igt_output_t *output)
 	igt_output_set_pipe(output, PIPE_ANY);
 }
 
-static void run_test(data_t *data, bool onscreen, int cursor_w, int cursor_h)
+static void run_test(data_t *data, void (*testfunc)(test_data_t *, bool), bool onscreen, int cursor_w, int cursor_h)
 {
 	igt_display_t *display = &data->display;
 	igt_output_t *output;
@@ -279,7 +284,7 @@ static void run_test(data_t *data, bool onscreen, int cursor_w, int cursor_h)
 				igt_subtest_name(), pipe_name(test_data.pipe),
 				igt_output_name(output));
 
-			test_crc(&test_data, onscreen, cursor_w, cursor_h);
+			testfunc(&test_data, onscreen);
 
 			fprintf(stdout, "\n%s on pipe %c, connector %s: PASSED\n\n",
 				igt_subtest_name(), pipe_name(test_data.pipe),
@@ -321,9 +326,9 @@ static void run_test_generic(data_t *data, int cursor_max_size)
 
 		/* Using created cursor FBs to test cursor support */
 		igt_subtest_f("cursor-%s-onscreen", c_size)
-			run_test(data, true, cursor_size, cursor_size);
+			run_test(data, test_crc, true, cursor_size, cursor_size);
 		igt_subtest_f("cursor-%s-offscreen", c_size)
-			run_test(data, false, cursor_size, cursor_size);
+			run_test(data, test_crc, false, cursor_size, cursor_size);
 	}
 
 }
-- 
1.8.3.2

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

* [PATCH i-g-t v2 4/8] kms_cursor_crc: Separate onscreen and offscreen tests
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
                   ` (2 preceding siblings ...)
  2014-04-10 12:08 ` [PATCH i-g-t v2 3/8] kms_cursor_crc: Use a function pointer to call test Antti Koskipaa
@ 2014-04-10 12:08 ` Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 5/8] kms_cursor_crc: Add reference software rendering Antti Koskipaa
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

Also remove onscreen boolean from parameter list. All test-related
data should be put into test_data from now.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
---
 tests/kms_cursor_crc.c | 99 +++++++++++++++++++++++++-------------------------
 1 file changed, 50 insertions(+), 49 deletions(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 60b50b5..94baa94 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -133,8 +133,7 @@ static void do_test(test_data_t *test_data,
 	do_single_test(test_data, left, bottom);
 }
 
-static void test_crc(test_data_t *test_data,
-		     bool onscreen)
+static void test_crc_onscreen(test_data_t *test_data)
 {
 	int left = test_data->left;
 	int right = test_data->right;
@@ -143,49 +142,51 @@ static void test_crc(test_data_t *test_data,
 	int cursor_w = test_data->curw;
 	int cursor_h = test_data->curh;
 
-	if (onscreen) {
-		/* cursor onscreen, crc should match, except when white visible cursor is used */
-		test_data->crc_must_match = false;
-
-		/* fully inside  */
-		do_test(test_data, left, right, top, bottom);
-
-		/* 2 pixels inside */
-		do_test(test_data, left - (cursor_w-2), right + (cursor_w-2), top               , bottom               );
-		do_test(test_data, left               , right               , top - (cursor_h-2), bottom + (cursor_h-2));
-		do_test(test_data, left - (cursor_w-2), right + (cursor_w-2), top - (cursor_h-2), bottom + (cursor_h-2));
-
-		/* 1 pixel inside */
-		do_test(test_data, left - (cursor_w-1), right + (cursor_w-1), top               , bottom               );
-		do_test(test_data, left               , right               , top - (cursor_h-1), bottom + (cursor_h-1));
-		do_test(test_data, left - (cursor_w-1), right + (cursor_w-1), top - (cursor_h-1), bottom + (cursor_h-1));
-	} else {
-		/* cursor offscreen, crc should always match */
-		test_data->crc_must_match = false;
-
-		/* fully outside */
-		do_test(test_data, left - (cursor_w), right + (cursor_w), top             , bottom             );
-		do_test(test_data, left             , right             , top - (cursor_h), bottom + (cursor_h));
-		do_test(test_data, left - (cursor_w), right + (cursor_w), top - (cursor_h), bottom + (cursor_h));
-
-		/* fully outside by 1 extra pixels */
-		do_test(test_data, left - (cursor_w+1), right + (cursor_w+1), top               , bottom               );
-		do_test(test_data, left               , right               , top - (cursor_h+1), bottom + (cursor_h+1));
-		do_test(test_data, left - (cursor_w+1), right + (cursor_w+1), top - (cursor_h+1), bottom + (cursor_h+1));
-
-		/* fully outside by 2 extra pixels */
-		do_test(test_data, left - (cursor_w+2), right + (cursor_w+2), top               , bottom               );
-		do_test(test_data, left               , right               , top - (cursor_h+2), bottom + (cursor_h+2));
-		do_test(test_data, left - (cursor_w+2), right + (cursor_w+2), top - (cursor_h+2), bottom + (cursor_h+2));
-
-		/* fully outside by a lot of extra pixels */
-		do_test(test_data, left - (cursor_w+512), right + (cursor_w+512), top                 , bottom                 );
-		do_test(test_data, left                 , right                 , top - (cursor_h+512), bottom + (cursor_h+512));
-		do_test(test_data, left - (cursor_w+512), right + (cursor_w+512), top - (cursor_h+512), bottom + (cursor_h+512));
-
-		/* go nuts */
-		do_test(test_data, INT_MIN, INT_MAX, INT_MIN, INT_MAX);
-	}
+	/* fully inside  */
+	do_test(test_data, left, right, top, bottom);
+
+	/* 2 pixels inside */
+	do_test(test_data, left - (cursor_w-2), right + (cursor_w-2), top               , bottom               );
+	do_test(test_data, left               , right               , top - (cursor_h-2), bottom + (cursor_h-2));
+	do_test(test_data, left - (cursor_w-2), right + (cursor_w-2), top - (cursor_h-2), bottom + (cursor_h-2));
+
+	/* 1 pixel inside */
+	do_test(test_data, left - (cursor_w-1), right + (cursor_w-1), top               , bottom               );
+	do_test(test_data, left               , right               , top - (cursor_h-1), bottom + (cursor_h-1));
+	do_test(test_data, left - (cursor_w-1), right + (cursor_w-1), top - (cursor_h-1), bottom + (cursor_h-1));
+}
+
+static void test_crc_offscreen(test_data_t *test_data)
+{
+	int left = test_data->left;
+	int right = test_data->right;
+	int top = test_data->top;
+	int bottom = test_data->bottom;
+	int cursor_w = test_data->curw;
+	int cursor_h = test_data->curh;
+
+	/* fully outside */
+	do_test(test_data, left - (cursor_w), right + (cursor_w), top             , bottom             );
+	do_test(test_data, left             , right             , top - (cursor_h), bottom + (cursor_h));
+	do_test(test_data, left - (cursor_w), right + (cursor_w), top - (cursor_h), bottom + (cursor_h));
+
+	/* fully outside by 1 extra pixels */
+	do_test(test_data, left - (cursor_w+1), right + (cursor_w+1), top               , bottom               );
+	do_test(test_data, left               , right               , top - (cursor_h+1), bottom + (cursor_h+1));
+	do_test(test_data, left - (cursor_w+1), right + (cursor_w+1), top - (cursor_h+1), bottom + (cursor_h+1));
+
+	/* fully outside by 2 extra pixels */
+	do_test(test_data, left - (cursor_w+2), right + (cursor_w+2), top               , bottom               );
+	do_test(test_data, left               , right               , top - (cursor_h+2), bottom + (cursor_h+2));
+	do_test(test_data, left - (cursor_w+2), right + (cursor_w+2), top - (cursor_h+2), bottom + (cursor_h+2));
+
+	/* fully outside by a lot of extra pixels */
+	do_test(test_data, left - (cursor_w+512), right + (cursor_w+512), top                 , bottom                 );
+	do_test(test_data, left                 , right                 , top - (cursor_h+512), bottom + (cursor_h+512));
+	do_test(test_data, left - (cursor_w+512), right + (cursor_w+512), top - (cursor_h+512), bottom + (cursor_h+512));
+
+	/* go nuts */
+	do_test(test_data, INT_MIN, INT_MAX, INT_MIN, INT_MAX);
 }
 
 static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
@@ -260,7 +261,7 @@ static void cleanup_crtc(test_data_t *test_data, igt_output_t *output)
 	igt_output_set_pipe(output, PIPE_ANY);
 }
 
-static void run_test(data_t *data, void (*testfunc)(test_data_t *, bool), bool onscreen, int cursor_w, int cursor_h)
+static void run_test(data_t *data, void (*testfunc)(test_data_t *), int cursor_w, int cursor_h)
 {
 	igt_display_t *display = &data->display;
 	igt_output_t *output;
@@ -284,7 +285,7 @@ static void run_test(data_t *data, void (*testfunc)(test_data_t *, bool), bool o
 				igt_subtest_name(), pipe_name(test_data.pipe),
 				igt_output_name(output));
 
-			testfunc(&test_data, onscreen);
+			testfunc(&test_data);
 
 			fprintf(stdout, "\n%s on pipe %c, connector %s: PASSED\n\n",
 				igt_subtest_name(), pipe_name(test_data.pipe),
@@ -326,9 +327,9 @@ static void run_test_generic(data_t *data, int cursor_max_size)
 
 		/* Using created cursor FBs to test cursor support */
 		igt_subtest_f("cursor-%s-onscreen", c_size)
-			run_test(data, test_crc, true, cursor_size, cursor_size);
+			run_test(data, test_crc_onscreen, cursor_size, cursor_size);
 		igt_subtest_f("cursor-%s-offscreen", c_size)
-			run_test(data, test_crc, false, cursor_size, cursor_size);
+			run_test(data, test_crc_offscreen, cursor_size, cursor_size);
 	}
 
 }
-- 
1.8.3.2

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

* [PATCH i-g-t v2 5/8] kms_cursor_crc: Add reference software rendering
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
                   ` (3 preceding siblings ...)
  2014-04-10 12:08 ` [PATCH i-g-t v2 4/8] kms_cursor_crc: Separate onscreen and offscreen tests Antti Koskipaa
@ 2014-04-10 12:08 ` Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 6/8] kms_cursor_crc: Add moving cursor test Antti Koskipaa
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

This patch first render the cursor with hardware rendering and
then with software, acquiring the CRC in both cases so they can be
properly compared. Say goodbye to crc_must_match variable.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
---
 tests/kms_cursor_crc.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 94baa94..85ff243 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -52,14 +52,17 @@ typedef struct {
 	igt_output_t *output;
 	enum pipe pipe;
 	igt_crc_t ref_crc;
-	bool crc_must_match;
 	int left, right, top, bottom;
+	int screenw, screenh;
 	int curw, curh; /* cursor size */
 } test_data_t;
 
 static void draw_cursor(cairo_t *cr, int x, int y, int w)
 {
 	w /= 2;
+	/* Cairo doesn't like to be fed numbers that are too wild */
+	if ((x < SHRT_MIN) || (x > SHRT_MAX) || (y < SHRT_MIN) || (y > SHRT_MAX))
+		return;
 	cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
 	/* 4 color rectangles in the corners, RGBY */
 	igt_paint_color_alpha(cr, x, y, w, w, 1.0, 0.0, 0.0, 1.0);
@@ -105,23 +108,31 @@ static void do_single_test(test_data_t *test_data, int x, int y)
 	data_t *data = test_data->data;
 	igt_display_t *display = &data->display;
 	igt_pipe_crc_t *pipe_crc = data->pipe_crc[test_data->pipe];
-	igt_crc_t crc;
+	igt_crc_t crc, ref_crc;
 	igt_plane_t *cursor;
+	cairo_t *cr = igt_get_cairo_ctx(data->drm_fd, &data->primary_fb);
 
 	printf("."); fflush(stdout);
 
+	/* Hardware test */
 	cursor_enable(test_data);
 	cursor = igt_output_get_plane(test_data->output, IGT_PLANE_CURSOR);
 	igt_plane_set_position(cursor, x, y);
 	igt_display_commit(display);
 	igt_wait_for_vblank(data->drm_fd, test_data->pipe);
+	igt_pipe_crc_collect_crc(pipe_crc, &crc);
 	cursor_disable(test_data);
 
-	igt_pipe_crc_collect_crc(pipe_crc, &crc);
-	if (test_data->crc_must_match)
-		igt_assert(igt_crc_equal(&crc, &test_data->ref_crc));
-	else
-		igt_assert(!igt_crc_equal(&crc, &test_data->ref_crc));
+	/* Now render the same in software and collect crc */
+	draw_cursor(cr, x, y, test_data->curw);
+	igt_display_commit(display);
+	igt_wait_for_vblank(data->drm_fd, test_data->pipe);
+	igt_pipe_crc_collect_crc(pipe_crc, &ref_crc);
+	/* Clear screen afterwards */
+	igt_paint_color(cr, 0, 0, test_data->screenw, test_data->screenh,
+			    0.0, 0.0, 0.0);
+
+	igt_assert(igt_crc_equal(&crc, &ref_crc));
 }
 
 static void do_test(test_data_t *test_data,
@@ -232,6 +243,8 @@ static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
 	test_data->right = mode->hdisplay - cursor_w;
 	test_data->top = 0;
 	test_data->bottom = mode->vdisplay - cursor_h;
+	test_data->screenw = mode->hdisplay;
+	test_data->screenh = mode->vdisplay;
 	test_data->curw = cursor_w;
 	test_data->curh = cursor_h;
 
-- 
1.8.3.2

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

* [PATCH i-g-t v2 6/8] kms_cursor_crc: Add moving cursor test
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
                   ` (4 preceding siblings ...)
  2014-04-10 12:08 ` [PATCH i-g-t v2 5/8] kms_cursor_crc: Add reference software rendering Antti Koskipaa
@ 2014-04-10 12:08 ` Antti Koskipaa
  2014-04-10 12:08 ` [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test Antti Koskipaa
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
---
 tests/kms_cursor_crc.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 85ff243..b2498a1 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -200,6 +200,20 @@ static void test_crc_offscreen(test_data_t *test_data)
 	do_test(test_data, INT_MIN, INT_MAX, INT_MIN, INT_MAX);
 }
 
+static void test_crc_sliding(test_data_t *test_data)
+{
+	int i;
+
+	/* Make sure cursor moves smoothly and pixel-by-pixel, and that there are
+	 * no alignment issues. Horizontal, vertical and diagonal test.
+	 */
+	for (i = 0; i < 16; i++) {
+		do_single_test(test_data, i, 0);
+		do_single_test(test_data, 0, i);
+		do_single_test(test_data, i, i);
+	}
+}
+
 static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
 			 int cursor_w, int cursor_h)
 {
@@ -343,6 +357,8 @@ static void run_test_generic(data_t *data, int cursor_max_size)
 			run_test(data, test_crc_onscreen, cursor_size, cursor_size);
 		igt_subtest_f("cursor-%s-offscreen", c_size)
 			run_test(data, test_crc_offscreen, cursor_size, cursor_size);
+		igt_subtest_f("cursor-%s-sliding", c_size)
+			run_test(data, test_crc_sliding, cursor_size, cursor_size);
 	}
 
 }
-- 
1.8.3.2

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

* [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
                   ` (5 preceding siblings ...)
  2014-04-10 12:08 ` [PATCH i-g-t v2 6/8] kms_cursor_crc: Add moving cursor test Antti Koskipaa
@ 2014-04-10 12:08 ` Antti Koskipaa
  2014-04-23 11:04   ` Ville Syrjälä
  2014-04-10 12:08 ` [PATCH i-g-t v2 8/8] kms_cursor_crc: Add background picture Antti Koskipaa
  2014-04-25 13:27 ` [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Ville Syrjälä
  8 siblings, 1 reply; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
---
 tests/kms_cursor_crc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index b2498a1..e00abf5 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -214,6 +214,18 @@ static void test_crc_sliding(test_data_t *test_data)
 	}
 }
 
+static void test_crc_random(test_data_t *test_data)
+{
+	int i;
+
+	/* Random cursor placement */
+	for (i = 0; i < 50; i++) {
+		int x = rand() % (test_data->screenw + test_data->curw * 2) - test_data->curw;
+		int y = rand() % (test_data->screenh + test_data->curh * 2) - test_data->curh;
+		do_single_test(test_data, x, y);
+	}
+}
+
 static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
 			 int cursor_w, int cursor_h)
 {
@@ -359,6 +371,8 @@ static void run_test_generic(data_t *data, int cursor_max_size)
 			run_test(data, test_crc_offscreen, cursor_size, cursor_size);
 		igt_subtest_f("cursor-%s-sliding", c_size)
 			run_test(data, test_crc_sliding, cursor_size, cursor_size);
+		igt_subtest_f("cursor-%s-random", c_size)
+			run_test(data, test_crc_random, cursor_size, cursor_size);
 	}
 
 }
-- 
1.8.3.2

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

* [PATCH i-g-t v2 8/8] kms_cursor_crc: Add background picture
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
                   ` (6 preceding siblings ...)
  2014-04-10 12:08 ` [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test Antti Koskipaa
@ 2014-04-10 12:08 ` Antti Koskipaa
  2014-04-25 13:27 ` [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Ville Syrjälä
  8 siblings, 0 replies; 13+ messages in thread
From: Antti Koskipaa @ 2014-04-10 12:08 UTC (permalink / raw)
  To: intel-gfx

This gives the cursor something to be on, instead of just a black
background. Slows the test down only one second over six minutes.

Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
---
 tests/kms_cursor_crc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index e00abf5..589b164 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -115,6 +115,7 @@ static void do_single_test(test_data_t *test_data, int x, int y)
 	printf("."); fflush(stdout);
 
 	/* Hardware test */
+	igt_paint_test_pattern(cr, test_data->screenw, test_data->screenh);
 	cursor_enable(test_data);
 	cursor = igt_output_get_plane(test_data->output, IGT_PLANE_CURSOR);
 	igt_plane_set_position(cursor, x, y);
-- 
1.8.3.2

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

* Re: [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong
  2014-04-10 12:08 ` [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong Antti Koskipaa
@ 2014-04-23 10:54   ` Ville Syrjälä
  0 siblings, 0 replies; 13+ messages in thread
From: Ville Syrjälä @ 2014-04-23 10:54 UTC (permalink / raw)
  To: Antti Koskipaa; +Cc: intel-gfx

On Thu, Apr 10, 2014 at 03:08:06PM +0300, Antti Koskipaa wrote:
> We can't have the hw cursor enabled during software render tests.
> 
> Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
> ---
>  tests/kms_cursor_crc.c | 54 ++++++++++++++++++++++++--------------------------
>  1 file changed, 26 insertions(+), 28 deletions(-)
> 
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index 52281d0..8802da6 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -67,6 +67,30 @@ static void draw_cursor(cairo_t *cr, int x, int y, int w)
>  	igt_paint_color_alpha(cr, x + w, y + w, w, w, 0.5, 0.5, 0.5, 1.0);
>  }
>  
> +static void cursor_enable(test_data_t *test_data)
> +{
> +	data_t *data = test_data->data;
> +	igt_display_t *display = &data->display;
> +	igt_output_t *output = test_data->output;
> +	igt_plane_t *cursor;
> +
> +	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
> +	igt_plane_set_fb(cursor, &data->fb);
> +	igt_display_commit(display);
> +}
> +
> +static void cursor_disable(test_data_t *test_data)
> +{
> +	data_t *data = test_data->data;
> +	igt_display_t *display = &data->display;
> +	igt_output_t *output = test_data->output;
> +	igt_plane_t *cursor;
> +
> +	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
> +	igt_plane_set_fb(cursor, NULL);
> +	igt_display_commit(display);
> +}
> +
>  static igt_pipe_crc_t *create_crc(data_t *data, enum pipe pipe)
>  {
>  	igt_pipe_crc_t *crc;
> @@ -85,10 +109,12 @@ static void do_single_test(test_data_t *test_data, int x, int y)
>  
>  	printf("."); fflush(stdout);
>  
> +	cursor_enable(test_data);
>  	cursor = igt_output_get_plane(test_data->output, IGT_PLANE_CURSOR);
>  	igt_plane_set_position(cursor, x, y);
>  	igt_display_commit(display);
>  	igt_wait_for_vblank(data->drm_fd, test_data->pipe);
> +	cursor_disable(test_data);
>  
>  	igt_pipe_crc_collect_crc(pipe_crc, &crc);

Cursor is getting disabled before we collect the crc:?

>  	if (test_data->crc_must_match)
> @@ -106,30 +132,6 @@ static void do_test(test_data_t *test_data,
>  	do_single_test(test_data, left, bottom);
>  }
>  
> -static void cursor_enable(test_data_t *test_data)
> -{
> -	data_t *data = test_data->data;
> -	igt_display_t *display = &data->display;
> -	igt_output_t *output = test_data->output;
> -	igt_plane_t *cursor;
> -
> -	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
> -	igt_plane_set_fb(cursor, &data->fb);
> -	igt_display_commit(display);
> -}
> -
> -static void cursor_disable(test_data_t *test_data)
> -{
> -	data_t *data = test_data->data;
> -	igt_display_t *display = &data->display;
> -	igt_output_t *output = test_data->output;
> -	igt_plane_t *cursor;
> -
> -	cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
> -	igt_plane_set_fb(cursor, NULL);
> -	igt_display_commit(display);
> -}
> -
>  static void test_crc(test_data_t *test_data,
>  		     bool onscreen, int cursor_w, int cursor_h)
>  {
> @@ -138,8 +140,6 @@ static void test_crc(test_data_t *test_data,
>  	int top = test_data->top;
>  	int bottom = test_data->bottom;
>  
> -	cursor_enable(test_data);
> -
>  	if (onscreen) {
>  		/* cursor onscreen, crc should match, except when white visible cursor is used */
>  		test_data->crc_must_match = false;
> @@ -183,8 +183,6 @@ static void test_crc(test_data_t *test_data,
>  		/* go nuts */
>  		do_test(test_data, INT_MIN, INT_MAX, INT_MIN, INT_MAX);
>  	}
> -
> -	cursor_disable(test_data);
>  }
>  
>  static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

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

* Re: [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test
  2014-04-10 12:08 ` [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test Antti Koskipaa
@ 2014-04-23 11:04   ` Ville Syrjälä
  0 siblings, 0 replies; 13+ messages in thread
From: Ville Syrjälä @ 2014-04-23 11:04 UTC (permalink / raw)
  To: Antti Koskipaa; +Cc: intel-gfx

On Thu, Apr 10, 2014 at 03:08:11PM +0300, Antti Koskipaa wrote:
> Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
> ---
>  tests/kms_cursor_crc.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index b2498a1..e00abf5 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -214,6 +214,18 @@ static void test_crc_sliding(test_data_t *test_data)
>  	}
>  }
>  
> +static void test_crc_random(test_data_t *test_data)
> +{
> +	int i;
> +
> +	/* Random cursor placement */
> +	for (i = 0; i < 50; i++) {
> +		int x = rand() % (test_data->screenw + test_data->curw * 2) - test_data->curw;
> +		int y = rand() % (test_data->screenh + test_data->curh * 2) - test_data->curh;
> +		do_single_test(test_data, x, y);
> +	}
> +}

As this is not deterministic it would be nice if the test would print
out some of the test parameters on failure (cursor coordinates and size
at least). Otherwise there's no good way to analyze failures.

> +
>  static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
>  			 int cursor_w, int cursor_h)
>  {
> @@ -359,6 +371,8 @@ static void run_test_generic(data_t *data, int cursor_max_size)
>  			run_test(data, test_crc_offscreen, cursor_size, cursor_size);
>  		igt_subtest_f("cursor-%s-sliding", c_size)
>  			run_test(data, test_crc_sliding, cursor_size, cursor_size);
> +		igt_subtest_f("cursor-%s-random", c_size)
> +			run_test(data, test_crc_random, cursor_size, cursor_size);
>  	}
>  
>  }
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

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

* Re: [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements
  2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
                   ` (7 preceding siblings ...)
  2014-04-10 12:08 ` [PATCH i-g-t v2 8/8] kms_cursor_crc: Add background picture Antti Koskipaa
@ 2014-04-25 13:27 ` Ville Syrjälä
  2014-04-25 14:07   ` Daniel Vetter
  8 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjälä @ 2014-04-25 13:27 UTC (permalink / raw)
  To: Antti Koskipaa; +Cc: intel-gfx

On Thu, Apr 10, 2014 at 03:08:04PM +0300, Antti Koskipaa wrote:
> This patch series enhances the cursor test to actually be useful.
> 
> The old "black transparent cursor on black background" tests are
> replaced with a visible cursor and the framework is changed to
> be more flexible and extendable. This way cursor rotation tests
> can be added with ease in the future.
> 
> Also adds a couple more tests to the current set.
> 
> v2:
>  - reinstate "go nuts" -test
>  - Add background picture for better test coverage
> 
> Antti Koskipaa (8):
>   kms_cursor_crc: Remove some test cases and change cursor to color
>   kms_cursor_crc: Move cursor enable and disable calls where they belong
>   kms_cursor_crc: Use a function pointer to call test
>   kms_cursor_crc: Separate onscreen and offscreen tests
>   kms_cursor_crc: Add reference software rendering
>   kms_cursor_crc: Add moving cursor test
>   kms_cursor_crc: Add random cursor placement test
>   kms_cursor_crc: Add background picture

I pushed the lot, and fixed the small issue in 2/8 that I pointed out.

I also pushed a pile of extra fixes, mainly to fix --list-subtests,
and I also tried to fix my gen2 LVDS vs. pipe B issue, which I
suppose is the same thing as this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=75131

> 
>  tests/kms_cursor_crc.c | 255 ++++++++++++++++++++++++++++---------------------
>  1 file changed, 146 insertions(+), 109 deletions(-)
> 
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

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

* Re: [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements
  2014-04-25 13:27 ` [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Ville Syrjälä
@ 2014-04-25 14:07   ` Daniel Vetter
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel Vetter @ 2014-04-25 14:07 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

On Fri, Apr 25, 2014 at 04:27:02PM +0300, Ville Syrjälä wrote:
> On Thu, Apr 10, 2014 at 03:08:04PM +0300, Antti Koskipaa wrote:
> > This patch series enhances the cursor test to actually be useful.
> > 
> > The old "black transparent cursor on black background" tests are
> > replaced with a visible cursor and the framework is changed to
> > be more flexible and extendable. This way cursor rotation tests
> > can be added with ease in the future.
> > 
> > Also adds a couple more tests to the current set.
> > 
> > v2:
> >  - reinstate "go nuts" -test
> >  - Add background picture for better test coverage
> > 
> > Antti Koskipaa (8):
> >   kms_cursor_crc: Remove some test cases and change cursor to color
> >   kms_cursor_crc: Move cursor enable and disable calls where they belong
> >   kms_cursor_crc: Use a function pointer to call test
> >   kms_cursor_crc: Separate onscreen and offscreen tests
> >   kms_cursor_crc: Add reference software rendering
> >   kms_cursor_crc: Add moving cursor test
> >   kms_cursor_crc: Add random cursor placement test
> >   kms_cursor_crc: Add background picture
> 
> I pushed the lot, and fixed the small issue in 2/8 that I pointed out.
> 
> I also pushed a pile of extra fixes, mainly to fix --list-subtests,
> and I also tried to fix my gen2 LVDS vs. pipe B issue, which I
> suppose is the same thing as this bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=75131

This is a general issue with the current igt kms helper, and it's going to
bite us again with the chv 3 pipe support due to pipe restrictions on the
DP ports. I have a todo (and some patches) somewhere, but just didn't get
around to this yet :(

There's a few other issues with the high-level helpers like no sane
support to reset all the state - after the first test most subsequent ones
end up all skipping ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2014-04-25 14:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 1/8] kms_cursor_crc: Remove some test cases and change cursor to color Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong Antti Koskipaa
2014-04-23 10:54   ` Ville Syrjälä
2014-04-10 12:08 ` [PATCH i-g-t v2 3/8] kms_cursor_crc: Use a function pointer to call test Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 4/8] kms_cursor_crc: Separate onscreen and offscreen tests Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 5/8] kms_cursor_crc: Add reference software rendering Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 6/8] kms_cursor_crc: Add moving cursor test Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test Antti Koskipaa
2014-04-23 11:04   ` Ville Syrjälä
2014-04-10 12:08 ` [PATCH i-g-t v2 8/8] kms_cursor_crc: Add background picture Antti Koskipaa
2014-04-25 13:27 ` [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Ville Syrjälä
2014-04-25 14:07   ` Daniel Vetter

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.