Skip to contentSkip to conversation

tests/kms_chv_cursor_fail: Remove extra igt_pipe_crc_start.

PATCH In review Maarten Lankhorst 2 participants 9 messages Jun 8, 2016 – Jun 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tests/kms_chv_cursor_fail: Remove extra igt_pipe_crc_start.

There is a extra call to igt_pipe_crc_start that is not matched to any stop. Because of this the exit handler tries to reset the crc source on exit while the pipe disabled. This causes fails with -EIO:

(kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Test assertion failure function igt_pipe_crc_pipe_off, file igt_debugfs.c:364:
(kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Failed assertion:
write(fd, buf, strlen(buf)) == strlen(buf) (kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Last errno: 5, EIO (kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: error: -1 != 11 Stack trace:
#0 [__igt_fail_assert+0xf1]
#1 [igt_pipe_crc_pipe_off+0xe4]
#2 [pipe_crc_exit_handler+0x35]
#3 [igt_atexit_handler+0x4c]
#4 [__libc_secure_getenv+0x112]
#5 [exit+0x15]
#6 [igt_exit+0xd6]
#7 [main+0x1ee]
#8 [__libc_start_main+0xf0]
#9 [_start+0x29]
#10 [<unknown>+0x29]

---
 tests/kms_chv_cursor_fail.c |   3 -
 tests/kms_rmfb.c            | 180 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 180 insertions(+), 3 deletions(-)
 create mode 100644 tests/kms_rmfb.c
tests/kms_chv_cursor_fail.c +0 -3
index 83af07f9b968..11d01f54e511 100644
@@ -163,9 +163,6 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
 		}
 		igt_debug("\n");
 	}
-
-
-	igt_pipe_crc_start(data->pipe_crc);
 }
 
 static void test_edge(data_t *data, int sy, int ey, int sx, int ex, bool swap_axis)
tests/kms_rmfb.c new file +180 -0

180 lines not on this page · raw message

Signature · 6 lines
2.5.5

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 tests/kms_chv_cursor_fail: Run the tests with fewer steps.

This reduces the runtime of the tests from ~200s on my 30 fps 4k panel to 10s.

---
 tests/kms_chv_cursor_fail.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
tests/kms_chv_cursor_fail.c +11 -7
index 11d01f54e511..8f878cbffe96 100644
@@ -109,24 +109,26 @@ static void cursor_move(data_t *data, int x, int y, int i)
 }
 
 #define XSTEP 8
-#define YSTEP 32
-#define XOFF 0
+#define YSTEP 8
 #define NCRC 128
 
 static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
 {
 	igt_crc_t *crc = NULL;
-	int i, n, x, xdir;
+	int i, n, x, xdir, dx;
 
 	if (sx > ex)
 		xdir = -1;
 	else
 		xdir = 1;
 
+	dx = (ex - sx)/XSTEP;
+
 	igt_pipe_crc_start(data->pipe_crc);
 
 	i = 0;
-	for (x = sx + XOFF; xdir * (x - ex - XOFF) <= 0; x += xdir * XSTEP) {
+
+	for (x = sx; xdir * (x - ex) <= 0; x += dx) {
 		int xx, yy;
 
 		if (swap_axis) {
@@ -168,21 +170,23 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
 static void test_edge(data_t *data, int sy, int ey, int sx, int ex, bool swap_axis)
 {
 	int crtc_id = data->output->config.crtc->crtc_id;
-	int y, ydir;
+	int y, ydir, dy;
 
 	if (sy > ey)
 		ydir = -1;
 	else
 		ydir = 1;
 
+	dy = (ey - sy) / YSTEP;
+
 	igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0);
 	igt_assert_eq(drmModeSetCursor(data->drm_fd, crtc_id, data->fb.gem_handle, data->curw, data->curh), 0);
 
 	for (y = sy; ydir * (y - ey) <= 0; ) {
 		test_edge_pos(data, sx, ex, y, swap_axis);
-		y += ydir * YSTEP;
+		y += dy;
 		test_edge_pos(data, ex, sx, y, swap_axis);
-		y += ydir * YSTEP;
+		y += dy;
 	}
 
 	igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0);
Signature · 6 lines
2.5.5

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps.

Quoted 2 lines · Maarten Lankhorst

This reduces the runtime of the tests from ~200s on my 30 fps 4k panel to 10s.

Does it still find the problem reliably on CHV pipe C (if you remove the kernel w/a)?

Quoted 71 lines
---
 tests/kms_chv_cursor_fail.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
tests/kms_chv_cursor_fail.c +11 -7
index 11d01f54e511..8f878cbffe96 100644
@@ -109,24 +109,26 @@ static void cursor_move(data_t *data, int x, int y, int i)
 }
 
 #define XSTEP 8
-#define YSTEP 32
-#define XOFF 0
+#define YSTEP 8
 #define NCRC 128
 
 static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
 {
 	igt_crc_t *crc = NULL;
-	int i, n, x, xdir;
+	int i, n, x, xdir, dx;
 
 	if (sx > ex)
 		xdir = -1;
 	else
 		xdir = 1;
 
+	dx = (ex - sx)/XSTEP;
+
 	igt_pipe_crc_start(data->pipe_crc);
 
 	i = 0;
-	for (x = sx + XOFF; xdir * (x - ex - XOFF) <= 0; x += xdir * XSTEP) {
+
+	for (x = sx; xdir * (x - ex) <= 0; x += dx) {
 		int xx, yy;
 
 		if (swap_axis) {
@@ -168,21 +170,23 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
 static void test_edge(data_t *data, int sy, int ey, int sx, int ex, bool swap_axis)
 {
 	int crtc_id = data->output->config.crtc->crtc_id;
-	int y, ydir;
+	int y, ydir, dy;
 
 	if (sy > ey)
 		ydir = -1;
 	else
 		ydir = 1;
 
+	dy = (ey - sy) / YSTEP;
+
 	igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0);
 	igt_assert_eq(drmModeSetCursor(data->drm_fd, crtc_id, data->fb.gem_handle, data->curw, data->curh), 0);
 
 	for (y = sy; ydir * (y - ey) <= 0; ) {
 		test_edge_pos(data, sx, ex, y, swap_axis);
-		y += ydir * YSTEP;
+		y += dy;
 		test_edge_pos(data, ex, sx, y, swap_axis);
-		y += ydir * YSTEP;
+		y += dy;
 	}
 
 	igt_assert_eq(drmModeMoveCursor(data->drm_fd, crtc_id, -data->curw, -data->curh), 0);
Signature · 1 line
2.5.5
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps.

Op 08-06-16 om 15:12 schreef Ville Syrjälä:

Quoted 5 lines · Maarten Lankhorst
Quoted 2 lines

This reduces the runtime of the tests from ~200s on my 30 fps 4k panel to 10s.

Does it still find the problem reliably on CHV pipe C (if you remove the kernel w/a)?

Yeah, a single coordinate is enough to trigger the fifo underrun. Rest is probably still slightly overkill. :)

~Maarten
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Re: [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps.

Quoted 7 lines · Maarten Lankhorst

Op 08-06-16 om 15:12 schreef Ville Syrjälä:

Quoted 5 lines · Maarten Lankhorst
Quoted 2 lines

This reduces the runtime of the tests from ~200s on my 30 fps 4k panel to 10s.

Does it still find the problem reliably on CHV pipe C (if you remove the kernel w/a)?

Yeah, a single coordinate is enough to trigger the fifo underrun. Rest is probably still slightly overkill. :)

Hmm. IIRC it wasn't quite that easy to trigger on my CHV. Sometime it survived for a few iterations. But I'm too lazy to retest it now, so I'll take your word for it.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

Re: [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps.

Op 08-06-16 om 15:35 schreef Ville Syrjälä:

Quoted 12 lines · Maarten Lankhorst
Quoted 7 lines

Op 08-06-16 om 15:12 schreef Ville Syrjälä:

Quoted 5 lines · Maarten Lankhorst
Quoted 2 lines

This reduces the runtime of the tests from ~200s on my 30 fps 4k panel to 10s.

Does it still find the problem reliably on CHV pipe C (if you remove the kernel w/a)?

Yeah, a single coordinate is enough to trigger the fifo underrun. Rest is probably still slightly overkill. :)

Hmm. IIRC it wasn't quite that easy to trigger on my CHV. Sometime it survived for a few iterations. But I'm too lazy to retest it now, so I'll take your word for it.

Weird, even kms_cursor_crc random test triggered it for me on the first try with negative coordinates.

~Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

Re: [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps.

Quoted 6 lines · Maarten Lankhorst

Op 08-06-16 om 15:35 schreef Ville Syrjälä:

Quoted 5 lines · Maarten Lankhorst
Quoted 4 lines

Op 08-06-16 om 15:12 schreef Ville Syrjälä:

Quoted 3 lines · Maarten Lankhorst
Quoted 2 lines

This reduces the runtime of the tests from ~200s on my 30 fps 4k panel to 10s.

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

Does it still find the problem reliably on CHV pipe C (if you remove the kernel w/a)?

Yeah, a single coordinate is enough to trigger the fifo underrun. Rest is probably still slightly overkill. :)

Hmm. IIRC it wasn't quite that easy to trigger on my CHV. Sometime it survived for a few iterations. But I'm too lazy to retest it now, so I'll take your word for it.

Weird, even kms_cursor_crc random test triggered it for me on the first try with negative coordinates.

Might be that I'm only recalling the visual feedback. That is, maybe I sometimes failed to see the underrun even though it did happen.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw

Re: [PATCH i-g-t 2/2] tests/kms_chv_cursor_fail: Run the tests with fewer steps.

Op 08-06-16 om 16:52 schreef Ville Syrjälä:

Quoted 9 lines · Maarten Lankhorst
Quoted 8 lines

Op 08-06-16 om 15:35 schreef Ville Syrjälä:

Quoted 7 lines · Maarten Lankhorst
Quoted 6 lines

Op 08-06-16 om 15:12 schreef Ville Syrjälä:

Quoted 5 lines · Maarten Lankhorst
Quoted 2 lines

This reduces the runtime of the tests from ~200s on my 30 fps 4k panel to 10s.

Does it still find the problem reliably on CHV pipe C (if you remove the kernel w/a)?

Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line

Yeah, a single coordinate is enough to trigger the fifo underrun. Rest is probably still slightly overkill. :)

Hmm. IIRC it wasn't quite that easy to trigger on my CHV. Sometime it survived for a few iterations. But I'm too lazy to retest it now, so I'll take your word for it.

Weird, even kms_cursor_crc random test triggered it for me on the first try with negative coordinates.

Might be that I'm only recalling the visual feedback. That is, maybe I sometimes failed to see the underrun even though it did happen.

Can I take this as a r-b?

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw
In reply to Maarten Lankhorst
Quoted 36 lines · Maarten Lankhorst

There is a extra call to igt_pipe_crc_start that is not matched to any stop. Because of this the exit handler tries to reset the crc source on exit while the pipe disabled. This causes fails with -EIO:

(kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Test assertion failure function igt_pipe_crc_pipe_off, file igt_debugfs.c:364:
(kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Failed assertion:
write(fd, buf, strlen(buf)) == strlen(buf) (kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Last errno: 5, EIO (kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: error: -1 != 11 Stack trace:
#0 [__igt_fail_assert+0xf1]
#1 [igt_pipe_crc_pipe_off+0xe4]
#2 [pipe_crc_exit_handler+0x35]
#3 [igt_atexit_handler+0x4c]
#4 [__libc_secure_getenv+0x112]
#5 [exit+0x15]
#6 [igt_exit+0xd6]
#7 [main+0x1ee]
#8 [__libc_start_main+0xf0]
#9 [_start+0x29]
#10 [<unknown>+0x29]

---
 tests/kms_chv_cursor_fail.c |   3 -
 tests/kms_rmfb.c            | 180 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 180 insertions(+), 3 deletions(-)
 create mode 100644 tests/kms_rmfb.c
tests/kms_chv_cursor_fail.c +0 -0
index 83af07f9b968..11d01f54e511 100644

tests/kms_chv_cursor_fail.c static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis) · line 168

Quoted 6 lines
tests/kms_chv_cursor_fail.c +0 -3
@@ -163,9 +163,6 @@ static void test_edge_pos(data_t *data, int sx, int ex, int y, bool swap_axis)
 		}
 		igt_debug("\n");
 	}
-
-
-	igt_pipe_crc_start(data->pipe_crc);

ack

tests/kms_rmfb.c

Quoted 8 lines
tests/kms_chv_cursor_fail.c +0 -0
 }
 
 static void test_edge(data_t *data, int sy, int ey, int sx, int ex, bool swap_axis)
tests/kms_rmfb.c new file +0 -0
new file mode 100644
index 000000000000..a3fde9f43788

git add fail?

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx