intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lyude <lyude@redhat.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lyude <lyude@redhat.com>
Subject: [PATCH i-g-t 3/3] igt_kms: Don't require intel hardware for kmstest_force_connector
Date: Mon, 21 Nov 2016 17:32:39 -0500	[thread overview]
Message-ID: <1479767559-9654-4-git-send-email-lyude@redhat.com> (raw)
In-Reply-To: <1479767559-9654-1-git-send-email-lyude@redhat.com>

Due to the unconditional call to intel_get_drm_devid() in
kmstest_force_connector(), trying to use this function on anything that
isn't intel hardware results in the current fixture being skipped. So,
don't try to get the devid in kmstest_force_connector() unless we're on
an Intel chipset.

Signed-off-by: Lyude <lyude@redhat.com>
---
 lib/igt_kms.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 13d323e..8c9bbbf 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -627,15 +627,20 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector,
 	uint32_t devid;
 	int len, dir, idx;
 
-	devid = intel_get_drm_devid(drm_fd);
-
-	/* forcing hdmi or dp connectors on HSW and BDW doesn't currently work,
-	 * so fail early to allow the test to skip if required */
-	if ((connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
-	     connector->connector_type == DRM_MODE_CONNECTOR_HDMIB ||
-	     connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort)
-	    && (IS_HASWELL(devid) || IS_BROADWELL(devid)))
-		return false;
+	if (is_i915_device(drm_fd)) {
+		devid = intel_get_drm_devid(drm_fd);
+
+		/*
+		 * forcing hdmi or dp connectors on HSW and BDW doesn't
+		 * currently work, so fail early to allow the test to skip if
+		 * required
+		 */
+		if ((connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+		     connector->connector_type == DRM_MODE_CONNECTOR_HDMIB ||
+		     connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort)
+		    && (IS_HASWELL(devid) || IS_BROADWELL(devid)))
+			return false;
+	}
 
 	switch (state) {
 	case FORCE_CONNECTOR_ON:
-- 
2.7.4

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

      parent reply	other threads:[~2016-11-21 22:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 22:32 [PATCH i-g-t 0/3] Various fixes for non-Intel compatibility Lyude
2016-11-21 22:32 ` [PATCH i-g-t 1/3] igt_kms: Don't assume we have cursor planes if we have primary ones Lyude
2016-12-07  7:34   ` Tomeu Vizoso
2016-11-21 22:32 ` [PATCH i-g-t 2/3] igt_kms: Change the max number of pipes to 6 Lyude
2016-12-07  7:26   ` Tomeu Vizoso
2016-11-21 22:32 ` Lyude [this message]

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=1479767559-9654-4-git-send-email-lyude@redhat.com \
    --to=lyude@redhat.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;
as well as URLs for NNTP newsgroup(s).