All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_force_connector_basic: Execute with HDMI connectors
@ 2018-05-23 15:56 Ville Syrjala
  2018-05-23 18:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Ville Syrjala @ 2018-05-23 15:56 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

If we can't find a VGA connector, let's look for a HDMI connector
instead. We can run all but the load detect subtests with HDMI.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/kms_force_connector_basic.c | 95 ++++++++++++++++++++++++---------------
 1 file changed, 59 insertions(+), 36 deletions(-)

diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c
index 6e96c6be7dab..e4487854884e 100644
--- a/tests/kms_force_connector_basic.c
+++ b/tests/kms_force_connector_basic.c
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
 	/* force the VGA output and test that it worked */
 	int drm_fd = 0;
 	drmModeRes *res;
-	drmModeConnector *vga_connector = NULL, *temp;
+	drmModeConnector *connector = NULL, *temp;
 	int start_n_modes, start_connection;
 	struct option long_opts[] = {
 		{"reset", 0, 0, 'r'},
@@ -86,41 +86,64 @@ int main(int argc, char **argv)
 				    opt_handler, NULL);
 
 	igt_fixture {
-		unsigned vga_connector_id = 0;
+		unsigned connector_id = 0;
 
 		drm_fd = drm_open_driver_master(DRIVER_INTEL);
 		res = drmModeGetResources(drm_fd);
 		igt_assert(res);
 
-		/* find the vga connector */
+		/* find a vga connector */
 		for (int i = 0; i < res->count_connectors; i++) {
-			vga_connector = drmModeGetConnectorCurrent(drm_fd,
-								   res->connectors[i]);
+			connector = drmModeGetConnectorCurrent(drm_fd,
+							       res->connectors[i]);
 
-			if (vga_connector->connector_type == DRM_MODE_CONNECTOR_VGA) {
+			if (connector->connector_type == DRM_MODE_CONNECTOR_VGA) {
 				/* Ensure that no override was left in place. */
 				kmstest_force_connector(drm_fd,
-							vga_connector,
+							connector,
 							FORCE_CONNECTOR_UNSPECIFIED);
 
 				/* Only use the first VGA connector. */
-				if (!vga_connector_id)
-					vga_connector_id = res->connectors[i];
+				if (!connector_id)
+					connector_id = res->connectors[i];
 			}
 
-			drmModeFreeConnector(vga_connector);
+			drmModeFreeConnector(connector);
 		}
 
-		igt_require(vga_connector_id);
+		/* find a hdmi connector if we didn't find vga */
+		for (int i = 0; i < res->count_connectors; i++) {
+			connector = drmModeGetConnectorCurrent(drm_fd,
+							       res->connectors[i]);
+
+			if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+			    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
+				/* Ensure that no override was left in place. */
+				kmstest_force_connector(drm_fd,
+							connector,
+							FORCE_CONNECTOR_UNSPECIFIED);
+
+				/* Use the the first HDMI connector. */
+				if (!connector_id)
+					connector_id = res->connectors[i];
+			}
+
+			drmModeFreeConnector(connector);
+		}
+
+		igt_require(connector_id);
 
 		/* Reacquire status after clearing any previous overrides */
-		vga_connector = drmModeGetConnector(drm_fd, vga_connector_id);
+		connector = drmModeGetConnector(drm_fd, connector_id);
 
-		start_n_modes = vga_connector->count_modes;
-		start_connection = vga_connector->connection;
+		start_n_modes = connector->count_modes;
+		start_connection = connector->connection;
 	}
 
 	igt_subtest("force-load-detect") {
+		/* no load detect on HDMI */
+		igt_require(connector->connector_type == DRM_MODE_CONNECTOR_VGA);
+
 		/*
 		 * disable all outputs to make sure we have a
 		 * free crtc available for load detect
@@ -133,7 +156,7 @@ int main(int argc, char **argv)
 		/* This can't use drmModeGetConnectorCurrent
 		 * because connector probing is the point of this test.
 		 */
-		temp = drmModeGetConnector(drm_fd, vga_connector->connector_id);
+		temp = drmModeGetConnector(drm_fd, connector->connector_id);
 
 		igt_set_module_param_int("load_detect_test", 0);
 
@@ -146,9 +169,9 @@ int main(int argc, char **argv)
 		igt_display_t display;
 
 		/* force the connector on and check the reported values */
-		kmstest_force_connector(drm_fd, vga_connector, FORCE_CONNECTOR_ON);
+		kmstest_force_connector(drm_fd, connector, FORCE_CONNECTOR_ON);
 		temp = drmModeGetConnectorCurrent(drm_fd,
-						  vga_connector->connector_id);
+						  connector->connector_id);
 		igt_assert_eq(temp->connection, DRM_MODE_CONNECTED);
 		igt_assert_lt(0, temp->count_modes);
 		drmModeFreeConnector(temp);
@@ -161,35 +184,35 @@ int main(int argc, char **argv)
 
 
 		/* force the connector off */
-		kmstest_force_connector(drm_fd, vga_connector,
+		kmstest_force_connector(drm_fd, connector,
 					FORCE_CONNECTOR_OFF);
 		temp = drmModeGetConnectorCurrent(drm_fd,
-						  vga_connector->connector_id);
+						  connector->connector_id);
 		igt_assert_eq(temp->connection, DRM_MODE_DISCONNECTED);
 		igt_assert_eq(0, temp->count_modes);
 		drmModeFreeConnector(temp);
 
 		/* check that the previous state is restored */
-		kmstest_force_connector(drm_fd, vga_connector,
+		kmstest_force_connector(drm_fd, connector,
 					FORCE_CONNECTOR_UNSPECIFIED);
 		temp = drmModeGetConnectorCurrent(drm_fd,
-						  vga_connector->connector_id);
+						  connector->connector_id);
 		igt_assert_eq(temp->connection, start_connection);
 		drmModeFreeConnector(temp);
 	}
 
 	igt_subtest("force-edid") {
-		kmstest_force_connector(drm_fd, vga_connector,
+		kmstest_force_connector(drm_fd, connector,
 					FORCE_CONNECTOR_ON);
 		temp = drmModeGetConnectorCurrent(drm_fd,
-						  vga_connector->connector_id);
+						  connector->connector_id);
 		drmModeFreeConnector(temp);
 
 		/* test edid forcing */
-		kmstest_force_edid(drm_fd, vga_connector,
+		kmstest_force_edid(drm_fd, connector,
 				   igt_kms_get_base_edid(), EDID_LENGTH);
 		temp = drmModeGetConnectorCurrent(drm_fd,
-						  vga_connector->connector_id);
+						  connector->connector_id);
 
 		igt_debug("num_conn %i\n", temp->count_modes);
 
@@ -200,11 +223,11 @@ int main(int argc, char **argv)
 		drmModeFreeConnector(temp);
 
 		/* remove edid */
-		kmstest_force_edid(drm_fd, vga_connector, NULL, 0);
-		kmstest_force_connector(drm_fd, vga_connector,
+		kmstest_force_edid(drm_fd, connector, NULL, 0);
+		kmstest_force_connector(drm_fd, connector,
 					FORCE_CONNECTOR_UNSPECIFIED);
 		temp = drmModeGetConnectorCurrent(drm_fd,
-						  vga_connector->connector_id);
+						  connector->connector_id);
 		/* the connector should now have the same number of modes that
 		 * it started with */
 		igt_assert_eq(temp->count_modes, start_n_modes);
@@ -215,14 +238,14 @@ int main(int argc, char **argv)
 	igt_subtest("prune-stale-modes") {
 		int i;
 
-		kmstest_force_connector(drm_fd, vga_connector,
+		kmstest_force_connector(drm_fd, connector,
 					FORCE_CONNECTOR_ON);
 
 		/* test pruning of stale modes */
-		kmstest_force_edid(drm_fd, vga_connector,
+		kmstest_force_edid(drm_fd, connector,
 				   igt_kms_get_alt_edid(), EDID_LENGTH);
 		temp = drmModeGetConnectorCurrent(drm_fd,
-						  vga_connector->connector_id);
+						  connector->connector_id);
 
 		for (i = 0; i < temp->count_modes; i++) {
 			if (temp->modes[i].hdisplay == 1400 &&
@@ -233,10 +256,10 @@ int main(int argc, char **argv)
 
 		drmModeFreeConnector(temp);
 
-		kmstest_force_edid(drm_fd, vga_connector,
+		kmstest_force_edid(drm_fd, connector,
 				   igt_kms_get_base_edid(), EDID_LENGTH);
 		temp = drmModeGetConnectorCurrent(drm_fd,
-						  vga_connector->connector_id);
+						  connector->connector_id);
 
 		for (i = 0; i < temp->count_modes; i++) {
 			if (temp->modes[i].hdisplay == 1400 &&
@@ -247,13 +270,13 @@ int main(int argc, char **argv)
 
 		drmModeFreeConnector(temp);
 
-		kmstest_force_edid(drm_fd, vga_connector, NULL, 0);
-		kmstest_force_connector(drm_fd, vga_connector,
+		kmstest_force_edid(drm_fd, connector, NULL, 0);
+		kmstest_force_connector(drm_fd, connector,
 					FORCE_CONNECTOR_UNSPECIFIED);
 	}
 
 	igt_fixture {
-		drmModeFreeConnector(vga_connector);
+		drmModeFreeConnector(connector);
 		close(drm_fd);
 
 		reset_connectors();
-- 
2.16.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_force_connector_basic: Execute with HDMI connectors
  2018-05-23 15:56 [igt-dev] [PATCH i-g-t] tests/kms_force_connector_basic: Execute with HDMI connectors Ville Syrjala
@ 2018-05-23 18:49 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-05-23 18:49 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: igt-dev

== Series Details ==

Series: tests/kms_force_connector_basic: Execute with HDMI connectors
URL   : https://patchwork.freedesktop.org/series/43643/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4225 -> IGTPW_1388 =

== Summary - FAILURE ==

  Serious unknown changes coming with IGTPW_1388 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1388, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/43643/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1388:

  === IGT changes ===

    ==== Possible regressions ====

    igt@kms_force_connector_basic@force-connector-state:
      fi-bdw-gvtdvm:      SKIP -> FAIL
      fi-hsw-4770r:       SKIP -> FAIL

    igt@kms_force_connector_basic@force-edid:
      fi-bdw-5557u:       SKIP -> CRASH
      fi-hsw-peppy:       SKIP -> CRASH
      fi-hsw-4200u:       SKIP -> CRASH

    igt@kms_force_connector_basic@prune-stale-modes:
      fi-hsw-peppy:       SKIP -> FAIL +1
      fi-hsw-4200u:       SKIP -> FAIL +1
      fi-bdw-5557u:       SKIP -> FAIL +1

    
    ==== Warnings ====

    igt@kms_force_connector_basic@force-connector-state:
      fi-cfl-8700k:       SKIP -> PASS +2
      fi-skl-6600u:       SKIP -> PASS +2
      fi-kbl-r:           SKIP -> PASS +2
      fi-byt-n2820:       SKIP -> PASS +2
      fi-skl-6770hq:      SKIP -> PASS +2
      {fi-kbl-guc}:       SKIP -> PASS +2
      fi-cnl-y3:          SKIP -> PASS +2

    igt@kms_force_connector_basic@force-edid:
      fi-pnv-d510:        SKIP -> PASS +3
      fi-bdw-gvtdvm:      SKIP -> PASS +1
      fi-ilk-650:         SKIP -> PASS +3
      fi-skl-6260u:       SKIP -> PASS +2
      fi-cfl-u:           SKIP -> PASS +2
      fi-skl-gvtdvm:      SKIP -> PASS +2
      fi-cnl-psr:         SKIP -> PASS +2
      fi-hsw-4770r:       SKIP -> PASS +1

    igt@kms_force_connector_basic@force-load-detect:
      fi-hsw-4770:        SKIP -> PASS +3
      fi-ivb-3770:        SKIP -> PASS +3
      fi-blb-e6850:       SKIP -> PASS +3

    igt@kms_force_connector_basic@prune-stale-modes:
      fi-cfl-s3:          SKIP -> PASS +2
      fi-kbl-7500u:       SKIP -> PASS +2
      fi-gdg-551:         SKIP -> PASS +3
      fi-bxt-dsi:         SKIP -> PASS +2
      fi-bxt-j4205:       SKIP -> PASS +2
      {fi-cfl-guc}:       SKIP -> PASS +2
      fi-kbl-7567u:       SKIP -> PASS +2
      fi-skl-guc:         SKIP -> PASS +2
      fi-bsw-n3050:       SKIP -> PASS +2
      fi-glk-j4005:       SKIP -> PASS +2
      fi-skl-6700k2:      SKIP -> PASS +2

    
== Known issues ==

  Here are the changes found in IGTPW_1388 that come from known issues:

  === IGT changes ===

    ==== Possible fixes ====

    igt@gem_mmap_gtt@basic-small-bo-tiledx:
      fi-gdg-551:         FAIL (fdo#102575) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713


== Participating hosts (44 -> 39) ==

  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-skl-6700hq 


== Build changes ==

    * IGT: IGT_4493 -> IGTPW_1388
    * Piglit: piglit_4493 -> piglit_4495

  CI_DRM_4225: 88ca72d89921db7a46dfb1492e2059e04a7b6c5e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1388: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1388/
  IGT_4493: 0b381c7d1067a4fe520b72d4d391d4920834cbe0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4493: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
  piglit_4495: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1388/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-23 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 15:56 [igt-dev] [PATCH i-g-t] tests/kms_force_connector_basic: Execute with HDMI connectors Ville Syrjala
2018-05-23 18:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

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.