diff options
author | Lyude <lyude@redhat.com> | 2016-11-21 17:32:39 -0500 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2016-12-07 09:08:09 +0100 |
commit | 81677444e62d11bc690bb23ae580893bf2445483 (patch) | |
tree | b440a3c9300bf68323fb9a306e40ebd7a0e0f9ae /lib/igt_kms.c | |
parent | 570d161b01801759255a857845f6360daf23c930 (diff) |
igt_kms: Don't require intel hardware for kmstest_force_connector
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>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 989704e1..b6f2d690 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -623,15 +623,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: |