Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 2/4] lib/igt_kms: Make igt_output_from_connector probe all outputs
Date: Thu, 16 Nov 2017 13:45:20 +0100	[thread overview]
Message-ID: <20171116124522.4673-2-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20171116124522.4673-1-maarten.lankhorst@linux.intel.com>

igt_output_from_connector should be used for disconnected outputs
too, this is useful for chamelium testing, where disconnected outputs
may reappear.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 lib/igt_kms.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 239f4f17d22e..fe0ef2bd6f38 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1884,9 +1884,13 @@ igt_output_t *igt_output_from_connector(igt_display_t *display,
 					drmModeConnector *connector)
 {
 	igt_output_t *output, *found = NULL;
+	int i;
+
+	for (i = 0; i < display->n_outputs; i++) {
+		output = &display->outputs[i];
 
-	for_each_connected_output(display, output) {
-		if (output->config.connector->connector_id ==
+		if (output->config.connector &&
+		    output->config.connector->connector_id ==
 		    connector->connector_id) {
 			found = output;
 			break;
-- 
2.15.0

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

  reply	other threads:[~2017-11-16 12:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 12:45 [PATCH i-g-t 1/4] lib/igt_kms: Add igt_display_reset function Maarten Lankhorst
2017-11-16 12:45 ` Maarten Lankhorst [this message]
2017-11-18  0:14   ` [PATCH i-g-t 2/4] lib/igt_kms: Make igt_output_from_connector probe all outputs Lyude Paul
2017-11-16 12:45 ` [PATCH i-g-t 3/4] tests/chamelium: Only initialize igt_display once Maarten Lankhorst
2017-11-18  0:05   ` Lyude Paul
2017-11-16 12:45 ` [PATCH i-g-t 4/4] tests: Rename chamelium to kms_chamelium Maarten Lankhorst
2017-11-18  0:42   ` Lyude Paul
2017-11-21 14:13     ` Maarten Lankhorst
2017-11-16 13:44 ` ✗ Fi.CI.BAT: failure for series starting with [1/4] lib/igt_kms: Add igt_display_reset function Patchwork
2017-11-16 16:07 ` [PATCH i-g-t] lib/igt_kms: Add igt_display_reset function, v2 Maarten Lankhorst
2017-11-16 18:42   ` [PATCH i-g-t] lib/igt_kms: Add igt_display_reset function, v3 Maarten Lankhorst
2017-11-16 16:23 ` ✗ Fi.CI.BAT: failure for series starting with lib/igt_kms: Add igt_display_reset function, v2. (rev2) Patchwork
2017-11-16 19:03 ` ✓ Fi.CI.BAT: success for series starting with lib/igt_kms: Add igt_display_reset function, v3. (rev3) Patchwork
2017-11-16 19:41 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-18  0:00 ` [PATCH i-g-t 1/4] lib/igt_kms: Add igt_display_reset function Lyude Paul

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=20171116124522.4673-2-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox