All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] tests/kms_chamelium: Test HPD for a connector with all valid pipes
@ 2020-09-07  3:26 Mohammed Khajapasha
  2020-09-07  3:54 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Mohammed Khajapasha @ 2020-09-07  3:26 UTC (permalink / raw)
  To: anshuman.gupta, kishore.kunche, kunal1.joshi, petri.latvala,
	igt-dev

Test hpd test for a connector with all valid pipes set in
it's valid crtc mask.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 tests/kms_chamelium.c | 50 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index e1c81e01..52baf1ae 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -427,6 +427,48 @@ static igt_output_t *get_output_for_port(data_t *data,
 	return output;
 }
 
+static const char test_hotplug_for_each_pipe_desc[] =
+	"Check that we get uevents and updated connector status on "
+	"hotplug and unplug for each pipe with valid output";
+static void
+test_hotplug_for_each_pipe(data_t *data, struct chamelium_port *port)
+{
+	igt_output_t *output;
+	enum pipe pipe;
+	struct udev_monitor *mon = igt_watch_uevents();
+
+	reset_state(data, NULL);
+	igt_hpd_storm_set_threshold(data->drm_fd, 0);
+	/* Disconnect if any port got connected */
+	chamelium_unplug(data->chamelium, port);
+	wait_for_connector_after_hotplug(data, mon, port,
+			DRM_MODE_DISCONNECTED);
+
+	for_each_pipe(&data->display, pipe) {
+		igt_flush_uevents(mon);
+		/* Check if we get a sysfs hotplug event */
+		chamelium_plug(data->chamelium, port);
+		wait_for_connector_after_hotplug(data, mon, port,
+				DRM_MODE_CONNECTED);
+		igt_flush_uevents(mon);
+		output = get_output_for_port(data, port);
+
+		/* If pipe is valid for output then set it */
+		if (igt_pipe_connector_valid(pipe, output)) {
+			igt_output_set_pipe(output, pipe);
+			igt_display_commit2(&data->display, COMMIT_ATOMIC);
+		}
+
+		chamelium_unplug(data->chamelium, port);
+		wait_for_connector_after_hotplug(data, mon, port,
+				DRM_MODE_DISCONNECTED);
+		igt_flush_uevents(mon);
+	}
+
+	igt_cleanup_uevents(mon);
+	igt_hpd_storm_reset(data->drm_fd);
+}
+
 static const char test_basic_hotplug_desc[] =
 	"Check that we get uevents and updated connector status on "
 	"hotplug and unplug";
@@ -2777,6 +2819,10 @@ igt_main
 		connector_subtest("dp-audio-edid", DisplayPort)
 			test_display_audio_edid(&data, port,
 						TEST_EDID_DP_AUDIO);
+
+		igt_describe(test_hotplug_for_each_pipe_desc);
+		connector_subtest("dp-hpd-for-each-pipe", DisplayPort)
+			test_hotplug_for_each_pipe(&data, port);
 	}
 
 	igt_describe("HDMI tests");
@@ -2952,6 +2998,10 @@ igt_main
 		igt_describe(test_display_aspect_ratio_desc);
 		connector_subtest("hdmi-aspect-ratio", HDMIA)
 			test_display_aspect_ratio(&data, port);
+
+		igt_describe(test_hotplug_for_each_pipe_desc);
+		connector_subtest("hdmi-hpd-for-each-pipe", HDMIA)
+			test_hotplug_for_each_pipe(&data, port);
 	}
 
 	igt_describe("VGA tests");
-- 
2.24.1

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

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

end of thread, other threads:[~2020-09-30 11:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-07  3:26 [igt-dev] [PATCH] tests/kms_chamelium: Test HPD for a connector with all valid pipes Mohammed Khajapasha
2020-09-07  3:54 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-09-07  9:08 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-09-07 19:04 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2020-09-24  6:25 ` [igt-dev] [PATCH 0/2] " Mohammed Khajapasha
2020-09-24  6:25   ` [igt-dev] [PATCH 1/2] tests/kms_chamelium: Test HPD for " Mohammed Khajapasha
2020-09-24  6:25   ` [igt-dev] [PATCH 2/2] HAX: Run in BAT Mohammed Khajapasha
2020-09-24  7:24 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_chamelium: Test HPD for a connector with all valid pipes (rev2) Patchwork
2020-09-24  8:27 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-09-30 11:39 ` [igt-dev] [PATCH] tests/kms_chamelium: Test HPD for a connector with all valid pipes Kunal Joshi

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.