All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Feceoru <gabriel.feceoru@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t v2 2/3] lib/igt_kms: Add fail exit branch in do_display_commit()
Date: Fri, 26 Feb 2016 13:21:15 +0200	[thread overview]
Message-ID: <1456485675-23869-1-git-send-email-gabriel.feceoru@intel.com> (raw)
In-Reply-To: <1455885293-10964-3-git-send-email-gabriel.feceoru@intel.com>

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

  parent reply	other threads:[~2016-02-26 11:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Gabriel Feceoru [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456485675-23869-1-git-send-email-gabriel.feceoru@intel.com \
    --to=gabriel.feceoru@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.