intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/3] Skip tests in kms_plane
@ 2016-02-19 12:34 Gabriel Feceoru
  2016-02-19 12:34 ` [PATCH i-g-t 1/3] tests/kms_plane: Skip on no connected outputs Gabriel Feceoru
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Gabriel Feceoru @ 2016-02-19 12:34 UTC (permalink / raw)
  To: intel-gfx

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(-)

-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH i-g-t 1/3] tests/kms_plane: Skip on no connected outputs
  2016-02-19 12:34 [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru
@ 2016-02-19 12:34 ` Gabriel Feceoru
  2016-02-19 12:34 ` [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit() Gabriel Feceoru
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Gabriel Feceoru @ 2016-02-19 12:34 UTC (permalink / raw)
  To: intel-gfx

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

Change it by reporting the subtests as skipped.

Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
---
 tests/kms_plane.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index b7a42c6..d8bb484 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -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
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit()
  2016-02-19 12:34 [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru
  2016-02-19 12:34 ` [PATCH i-g-t 1/3] tests/kms_plane: Skip on no connected outputs Gabriel Feceoru
@ 2016-02-19 12:34 ` Gabriel Feceoru
  2016-02-19 13:25   ` Marius Vlad
  2016-02-26 11:21   ` [PATCH i-g-t v2 " Gabriel Feceoru
  2016-02-19 12:34 ` [PATCH i-g-t 3/3] tests/kms_plane: Skip the test when configuration couldn't be applied Gabriel Feceoru
  2016-03-29 15:06 ` [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru
  3 siblings, 2 replies; 8+ messages in thread
From: Gabriel Feceoru @ 2016-02-19 12:34 UTC (permalink / raw)
  To: intel-gfx

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.

Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
---
 lib/igt_kms.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 90c8da7..b18a317 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -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);
 }
 
 /**
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH i-g-t 3/3] tests/kms_plane: Skip the test when configuration couldn't be applied
  2016-02-19 12:34 [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru
  2016-02-19 12:34 ` [PATCH i-g-t 1/3] tests/kms_plane: Skip on no connected outputs Gabriel Feceoru
  2016-02-19 12:34 ` [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit() Gabriel Feceoru
@ 2016-02-19 12:34 ` Gabriel Feceoru
  2016-02-26 12:59   ` [PATCH i-g-t v2 " Gabriel Feceoru
  2016-03-29 15:06 ` [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru
  3 siblings, 1 reply; 8+ messages in thread
From: Gabriel Feceoru @ 2016-02-19 12:34 UTC (permalink / raw)
  To: intel-gfx

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
Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
---
 tests/kms_plane.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index d8bb484..33b8de5 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -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);
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit()
  2016-02-19 12:34 ` [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit() Gabriel Feceoru
@ 2016-02-19 13:25   ` Marius Vlad
  2016-02-26 11:21   ` [PATCH i-g-t v2 " Gabriel Feceoru
  1 sibling, 0 replies; 8+ messages in thread
From: Marius Vlad @ 2016-02-19 13:25 UTC (permalink / raw)
  To: Gabriel Feceoru; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 1797 bytes --]

On Fri, Feb 19, 2016 at 02:34:52PM +0200, Gabriel Feceoru wrote:
> 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.
> 
> Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
> ---
>  lib/igt_kms.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 90c8da7..b18a317 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -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);

Wouldn't igt_display_try_commit2() achieve the same thing?

>  }
>  
>  /**
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH i-g-t v2 2/3] lib/igt_kms: Add fail exit branch in do_display_commit()
  2016-02-19 12:34 ` [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit() Gabriel Feceoru
  2016-02-19 13:25   ` Marius Vlad
@ 2016-02-26 11:21   ` Gabriel Feceoru
  1 sibling, 0 replies; 8+ messages in thread
From: Gabriel Feceoru @ 2016-02-26 11:21 UTC (permalink / raw)
  To: intel-gfx

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)

Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
---
 lib/igt_kms.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 90c8da7..6163a6d 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -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;
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH i-g-t v2 3/3] tests/kms_plane: Skip the test when configuration couldn't be applied
  2016-02-19 12:34 ` [PATCH i-g-t 3/3] tests/kms_plane: Skip the test when configuration couldn't be applied Gabriel Feceoru
@ 2016-02-26 12:59   ` Gabriel Feceoru
  0 siblings, 0 replies; 8+ messages in thread
From: Gabriel Feceoru @ 2016-02-26 12:59 UTC (permalink / raw)
  To: intel-gfx

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
Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
---
 tests/kms_plane.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index b7a42c6..4ce3289 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -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);
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t 0/3] Skip tests in kms_plane
  2016-02-19 12:34 [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru
                   ` (2 preceding siblings ...)
  2016-02-19 12:34 ` [PATCH i-g-t 3/3] tests/kms_plane: Skip the test when configuration couldn't be applied Gabriel Feceoru
@ 2016-03-29 15:06 ` Gabriel Feceoru
  3 siblings, 0 replies; 8+ messages in thread
From: Gabriel Feceoru @ 2016-03-29 15:06 UTC (permalink / raw)
  To: intel-gfx@lists.freedesktop.org

Anybody wants to take a look at this?

Thanks,
Gabriel.

On 19.02.2016 14:34, Gabriel Feceoru wrote:
> 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(-)
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-03-29 15:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19 12:34 [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru
2016-02-19 12:34 ` [PATCH i-g-t 1/3] tests/kms_plane: Skip on no connected outputs Gabriel Feceoru
2016-02-19 12:34 ` [PATCH i-g-t 2/3] lib/igt_kms: Add fail exit branch in do_display_commit() Gabriel Feceoru
2016-02-19 13:25   ` Marius Vlad
2016-02-26 11:21   ` [PATCH i-g-t v2 " Gabriel Feceoru
2016-02-19 12:34 ` [PATCH i-g-t 3/3] tests/kms_plane: Skip the test when configuration couldn't be applied Gabriel Feceoru
2016-02-26 12:59   ` [PATCH i-g-t v2 " Gabriel Feceoru
2016-03-29 15:06 ` [PATCH i-g-t 0/3] Skip tests in kms_plane Gabriel Feceoru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).