Skip to contentSkip to conversation

Skip tests in kms_plane

PATCH In review Gabriel Feceoru 2 participants 8 messages Feb 19, 2016 – Mar 29, 2016 Library code

lore
Share & tools
lore
#0 lore raw

cover Skip tests in kms_plane

On BSW all pipeA and pipeB kms_plane subtests fail.
The root cause is a HW limitation in Cherryview - PipeC is directly connected to PortD.
Also, if no monitor is connected, all subtests pass although the test functions are not called.

Fixed these issues by making these tests skipped.

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86763

Gabriel Feceoru (3):
tests/kms_plane: Skip on no connected outputs
lib/igt_kms: Add fail exit branch in do_display_commit() tests/kms_plane: Skip the test when configuration couldn't be applied

 lib/igt_kms.c     |  9 ++++++---
 tests/kms_plane.c | 18 +++++++++++++++---
 2 files changed, 21 insertions(+), 6 deletions(-)
Signature · 6 lines
1.9.1

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

PATCH 1/3 tests/kms_plane: Skip on no connected outputs

When no display is connected all kms_plane subtests pass although no testing is done.

Change it by reporting the subtests as skipped.

---
 tests/kms_plane.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
tests/kms_plane.c +12 -2
index b7a42c6..d8bb484 100644
@@ -224,13 +224,18 @@ test_plane_position(data_t *data, enum pipe pipe, enum igt_plane plane,
 		    unsigned int flags)
 {
 	igt_output_t *output;
+	int connected_outs = 0;
 
 	igt_skip_on(pipe >= data->display.n_pipes);
 	igt_skip_on(plane >= data->display.pipes[pipe].n_planes);
 
-	for_each_connected_output(&data->display, output)
+	for_each_connected_output(&data->display, output) {
 		test_plane_position_with_output(data, pipe, plane, output,
 						flags);
+		connected_outs++;
+	}
+
+	igt_skip_on(connected_outs == 0);
 }
 
 /*
@@ -346,13 +351,18 @@ test_plane_panning(data_t *data, enum pipe pipe, enum igt_plane plane,
             unsigned int flags)
 {
 	igt_output_t *output;
+	int connected_outs = 0;
 
 	igt_skip_on(pipe >= data->display.n_pipes);
 	igt_skip_on(plane >= data->display.pipes[pipe].n_planes);
 
-	for_each_connected_output(&data->display, output)
+	for_each_connected_output(&data->display, output) {
 		test_plane_panning_with_output(data, pipe, plane, output,
 						flags);
+		connected_outs++;
+	}
+
+	igt_skip_on(connected_outs == 0);
 }
 
 static void
Signature · 6 lines
1.9.1

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

PATCH 2/3 lib/igt_kms: Add fail exit branch in do_display_commit()

In reply to Gabriel Feceoru

On Cherryview PIPE_C can only be connected to PORT_D (bspec). The driver properly reports the crtc_mask for the encoder, however the mismatch between pipe and port is not reported back to the test.

Add support for detecting this case so the test can be skipped.

---
 lib/igt_kms.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
lib/igt_kms.c +6 -3
index 90c8da7..b18a317 100644
@@ -1669,6 +1669,7 @@ static int do_display_commit(igt_display_t *display,
 			     bool fail_on_error)
 {
 	int i, ret;
+	int valid_outs = 0;
 
 	LOG_INDENT(display, "commit");
 
@@ -1680,12 +1681,16 @@ static int do_display_commit(igt_display_t *display,
 		if (!output->valid)
 			continue;
 
+		valid_outs++;
 		ret = igt_output_commit(output, s, fail_on_error);
 		CHECK_RETURN(ret, fail_on_error);
 	}
 
 	LOG_UNINDENT(display);
 
+	if (valid_outs == 0)
+		return -1;
+
 	igt_debug_wait_for_keypress("modeset");
 
 	return 0;
@@ -1712,9 +1717,7 @@ static int do_display_commit(igt_display_t *display,
 int igt_display_commit2(igt_display_t *display,
 		       enum igt_commit_style s)
 {
-	do_display_commit(display, s, true);
-
-	return 0;
+	return do_display_commit(display, s, true);
 }
 
 /**
Signature · 6 lines
1.9.1

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

Re: [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit()

Quoted 41 lines · Gabriel Feceoru

On Cherryview PIPE_C can only be connected to PORT_D (bspec). The driver properly reports the crtc_mask for the encoder, however the mismatch between pipe and port is not reported back to the test.

Add support for detecting this case so the test can be skipped.

---
 lib/igt_kms.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
lib/igt_kms.c +5 -0
index 90c8da7..b18a317 100644
@@ -1669,6 +1669,7 @@ static int do_display_commit(igt_display_t *display,
 			     bool fail_on_error)
 {
 	int i, ret;
+	int valid_outs = 0;
 
 	LOG_INDENT(display, "commit");
 
@@ -1680,12 +1681,16 @@ static int do_display_commit(igt_display_t *display,
 		if (!output->valid)
 			continue;
 
+		valid_outs++;
 		ret = igt_output_commit(output, s, fail_on_error);
 		CHECK_RETURN(ret, fail_on_error);
 	}
 
 	LOG_UNINDENT(display);
 
+	if (valid_outs == 0)
+		return -1;
+
 	igt_debug_wait_for_keypress("modeset");
 
 	return 0;

lib/igt_kms.c static int do_display_commit(igt_display_t *display, · line 1720

Quoted 7 lines
lib/igt_kms.c +1 -3
@@ -1712,9 +1717,7 @@ static int do_display_commit(igt_display_t *display,
 int igt_display_commit2(igt_display_t *display,
 		       enum igt_commit_style s)
 {
-	do_display_commit(display, s, true);
-
-	return 0;
+	return do_display_commit(display, s, true);

Wouldn't igt_display_try_commit2() achieve the same thing?

Quoted 10 lines
lib/igt_kms.c +0 -0
 }
 
 /**
Signature · 6 lines
1.9.1

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

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

#4 lore raw

PATCH v2 2/3 lib/igt_kms: Add fail exit branch in do_display_commit()

In reply to Gabriel Feceoru

On Cherryview PIPE_C can only be connected to PORT_D (bspec). The driver properly reports the crtc_mask for the encoder, however the mismatch between pipe and port is not reported back to the test.

Add support for detecting this case so the test can be skipped.

v2: Apply review comments (Marius)

---
 lib/igt_kms.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/igt_kms.c +5 -0
index 90c8da7..6163a6d 100644
@@ -1669,6 +1669,7 @@ static int do_display_commit(igt_display_t *display,
 			     bool fail_on_error)
 {
 	int i, ret;
+	int valid_outs = 0;
 
 	LOG_INDENT(display, "commit");
 
@@ -1680,12 +1681,16 @@ static int do_display_commit(igt_display_t *display,
 		if (!output->valid)
 			continue;
 
+		valid_outs++;
 		ret = igt_output_commit(output, s, fail_on_error);
 		CHECK_RETURN(ret, fail_on_error);
 	}
 
 	LOG_UNINDENT(display);
 
+	if (valid_outs == 0)
+		return -1;
+
 	igt_debug_wait_for_keypress("modeset");
 
 	return 0;
Signature · 6 lines
1.9.1

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

PATCH 3/3 tests/kms_plane: Skip the test when configuration couldn't be applied

In reply to Gabriel Feceoru

This could happen when the selected pipe cannot be used with the connected port due do HW constrains.

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86763

---
 tests/kms_plane.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/kms_plane.c +3 -1
index d8bb484..33b8de5 100644
@@ -68,6 +68,7 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe,
 	drmModeModeInfo *mode;
 	igt_plane_t *primary;
 	char *crc_str;
+	int ret;
 
 	igt_output_set_pipe(output, pipe);
 
@@ -81,7 +82,8 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe,
 			    &fb);
 	igt_plane_set_fb(primary, &fb);
 
-	igt_display_commit(&data->display);
+	ret = igt_display_commit(&data->display);
+	igt_skip_on(ret != 0);
 
 	igt_pipe_crc_collect_crc(data->pipe_crc, crc);
 
Signature · 6 lines
1.9.1

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

PATCH v2 3/3 tests/kms_plane: Skip the test when configuration couldn't be applied

This could happen when the selected pipe cannot be used with the connected port due do HW constrains.

v2: Apply review comment (Marius)

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86763

---
 tests/kms_plane.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/kms_plane.c +3 -1
index b7a42c6..4ce3289 100644
@@ -68,6 +68,7 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe,
 	drmModeModeInfo *mode;
 	igt_plane_t *primary;
 	char *crc_str;
+	int ret;
 
 	igt_output_set_pipe(output, pipe);
 
@@ -81,7 +82,8 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe,
 			    &fb);
 	igt_plane_set_fb(primary, &fb);
 
-	igt_display_commit(&data->display);
+	ret = igt_display_try_commit2(&data->display, COMMIT_LEGACY);
+	igt_skip_on(ret != 0);
 
 	igt_pipe_crc_collect_crc(data->pipe_crc, crc);
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw
In reply to Gabriel Feceoru

Anybody wants to take a look at this?

Thanks,
Gabriel.

Quoted 10 lines · Gabriel Feceoru

On BSW all pipeA and pipeB kms_plane subtests fail.
The root cause is a HW limitation in Cherryview - PipeC is directly connected to PortD.
Also, if no monitor is connected, all subtests pass although the test functions are not called.

Fixed these issues by making these tests skipped.

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86763

Quoted 9 lines

Gabriel Feceoru (3):
tests/kms_plane: Skip on no connected outputs lib/igt_kms: Add fail exit branch in do_display_commit() tests/kms_plane: Skip the test when configuration couldn't be applied

  lib/igt_kms.c     |  9 ++++++---
  tests/kms_plane.c | 18 +++++++++++++++---
  2 files changed, 21 insertions(+), 6 deletions(-)

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