Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_kms: only check chamelium's presence in chamelium tests
@ 2021-03-22  5:26 Kunal Joshi
  2021-03-22  6:29 ` Martin Peres
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kunal Joshi @ 2021-03-22  5:26 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi, Petri Latvala

Avoid checking if chamelium is present or not in non chamelium
tests as its just an overhead.

Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 08d429a8..397635d8 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1958,21 +1958,26 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 
 #ifdef HAVE_CHAMELIUM
 	{
-		struct chamelium *chamelium;
-
-		chamelium = chamelium_init_rpc_only();
-		if (chamelium) {
-			igt_abort_on_f(!chamelium_wait_reachable(chamelium, 20),
-				       "cannot reach the configured chamelium!\n");
-			igt_abort_on_f(!chamelium_plug_all(chamelium),
-				       "failed to plug all the chamelium ports!\n");
-			igt_abort_on_f(!chamelium_wait_all_configured_ports_connected(chamelium, drm_fd),
-				       "not all configured chamelium ports are connected!\n");
-			chamelium_deinit_rpc_only(chamelium);
-		}
-	}
+		if (strstr(igt_test_name(), "feature_discovery") != NULL ||
+		    strstr(igt_test_name(), "cham") != NULL) {
+
+			struct chamelium *chamelium;
+
+			chamelium = chamelium_init_rpc_only();
+			if (chamelium) {
+				igt_abort_on_f(!chamelium_wait_reachable(chamelium, 20),
+					       "cannot reach the configured chamelium!\n");
+				igt_abort_on_f(!chamelium_plug_all(chamelium),
+					       "failed to plug all the chamelium ports!\n");
+				igt_abort_on_f(!chamelium_wait_all_configured_ports_connected(chamelium, drm_fd),
+					       "not all configured chamelium ports are connected!\n");
+				chamelium_deinit_rpc_only(chamelium);
+			}
+		}
+	}
 #endif
 
+
 	/*
 	 * With non-contiguous pipes display, crtc mapping is not always same
 	 * as pipe mapping, In i915 pipe is enum id of i915's crtc object.
-- 
2.25.1

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

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

end of thread, other threads:[~2021-03-22  8:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-22  5:26 [igt-dev] [PATCH i-g-t] lib/igt_kms: only check chamelium's presence in chamelium tests Kunal Joshi
2021-03-22  6:29 ` Martin Peres
2021-03-22  7:29   ` Kunal Joshi
2021-03-22  8:16     ` Martin Peres
2021-03-22  8:39       ` Kunal Joshi
2021-03-22  8:50         ` Martin Peres
2021-03-22  8:21     ` Petri Latvala
2021-03-22  6:41 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-03-22  7:54 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox