[Intel-gfx] [PATCH i-g-t 3/3] igt_kms: Don't require intel hardware for kmstest_force_connector
Lyude
lyude at redhat.com
Mon Nov 21 22:32:39 UTC 2016
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 at 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
More information about the Intel-gfx
mailing list