All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kunal Joshi <kunal1.joshi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kunal Joshi <kunal1.joshi@intel.com>
Subject: [igt-dev] [PATCH i-g-t v1 1/5] tests/chamelium/kms_chamelium.c: test cleanup
Date: Tue, 27 Sep 2022 00:23:17 +0530	[thread overview]
Message-ID: <20220926185321.2897136-2-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20220926185321.2897136-1-kunal1.joshi@intel.com>

-> Sanitize the state before starting the subtest

Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/chamelium/kms_chamelium.c | 48 +++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/tests/chamelium/kms_chamelium.c b/tests/chamelium/kms_chamelium.c
index 1be1c41a..985a906c 100644
--- a/tests/chamelium/kms_chamelium.c
+++ b/tests/chamelium/kms_chamelium.c
@@ -756,6 +756,13 @@ static void test_display_one_mode(data_t *data, struct chamelium_port *port,
 	igt_output_t *output;
 	igt_plane_t *primary;
 
+	/*
+	 * Reset basic pipes, connectors and planes on
+	 * @display back to default values.
+	 */
+	igt_display_reset(&data->display);
+
+
 	igt_modeset_disable_all_outputs(&data->display);
 	chamelium_reset_state(&data->display, data->chamelium,
 			      port, data->ports, data->port_count);
@@ -792,6 +799,12 @@ static void test_display_all_modes(data_t *data, struct chamelium_port *port,
 	if (check == CHAMELIUM_CHECK_ANALOG)
 		bridge = check_analog_bridge(data, port);
 
+	/*
+	 * Reset basic pipes, connectors and planes on
+	 * @display back to default values.
+	 */
+	igt_display_reset(&data->display);
+
 	i = 0;
 	do {
 		igt_output_t *output;
@@ -847,6 +860,12 @@ test_display_frame_dump(data_t *data, struct chamelium_port *port)
 
 	int i, count_modes;
 
+	/*
+	 * Reset basic pipes, connectors and planes on
+	 * @display back to default values.
+	 */
+	igt_display_reset(&data->display);
+
 	i = 0;
 	do {
 		igt_output_t *output;
@@ -986,6 +1005,12 @@ static void test_mode_timings(data_t *data, struct chamelium_port *port)
 {
 	int i, count_modes;
 
+	/*
+	 * Reset basic pipes, connectors and planes on
+	 * @display back to default values.
+	 */
+	igt_display_reset(&data->display);
+
 	i = 0;
 	igt_require(chamelium_supports_get_video_params(data->chamelium));
 	do {
@@ -1104,6 +1129,11 @@ static void test_display_aspect_ratio(data_t *data, struct chamelium_port *port)
 	uint32_t aspect_ratio;
 	enum infoframe_avi_picture_aspect_ratio frame_ar;
 
+	/*
+	 * Reset basic pipes, connectors and planes on
+	 * @display back to default values.
+	 */
+	igt_display_reset(&data->display);
 	igt_require(chamelium_supports_get_last_infoframe(data->chamelium));
 
 	igt_modeset_disable_all_outputs(&data->display);
@@ -1835,6 +1865,12 @@ test_display_audio(data_t *data, struct chamelium_port *port,
 	 * chamelium_get_audio_format support. */
 	igt_require(chamelium_has_audio_support(data->chamelium, port));
 
+	/*
+	 * Reset basic pipes, connectors and planes on
+	 * @display back to default values.
+	 */
+	igt_display_reset(&data->display);
+
 	alsa = alsa_init();
 	igt_assert(alsa);
 
@@ -1921,6 +1957,12 @@ test_display_audio_edid(data_t *data, struct chamelium_port *port,
 
 	igt_require(eld_is_supported());
 
+	/*
+	 * Reset basic pipes, connectors and planes on
+	 * @display back to default values.
+	 */
+	igt_display_reset(&data->display);
+
 	igt_modeset_disable_all_outputs(&data->display);
 	chamelium_reset_state(&data->display, data->chamelium,
 			      port, data->ports, data->port_count);
@@ -2348,6 +2390,12 @@ static void test_display_planes_random(data_t *data,
 	unsigned int i;
 	unsigned int fb_id;
 
+	/*
+	 * Reset basic pipes, connectors and planes on
+	 * @display back to default values.
+	 */
+	igt_display_reset(&data->display);
+
 	switch (check) {
 	case CHAMELIUM_CHECK_CRC:
 		allow_scaling = false;
-- 
2.25.1

  reply	other threads:[~2022-09-26 18:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 18:53 [igt-dev] [PATCH i-g-t v1 0/5] IGT test cleanup Kunal Joshi
2022-09-26 18:53 ` Kunal Joshi [this message]
2022-09-27  8:58   ` [igt-dev] [PATCH i-g-t v1 1/5] tests/chamelium/kms_chamelium.c: " B, Jeevan
2022-09-27 13:50   ` Swati Sharma
2022-09-26 18:53 ` [igt-dev] [PATCH i-g-t v1 2/5] tests/i915/kms_pipe_b_c_ivb.c: " Kunal Joshi
2022-09-27  2:45   ` B, Jeevan
2022-09-27  8:26     ` Joshi, Kunal1
2022-09-27  8:34       ` B, Jeevan
2022-09-27 13:53   ` Swati Sharma
2022-09-26 18:53 ` [igt-dev] [PATCH i-g-t v1 3/5] tests/i915/kms_pwrite_crc.c: cleanup Kunal Joshi
2022-09-27  8:56   ` B, Jeevan
2022-09-27 13:57   ` Swati Sharma
2022-09-26 18:53 ` [igt-dev] [PATCH i-g-t v1 4/5] tests/kms_invalid_mode.c Kunal Joshi
2022-09-27  8:54   ` B, Jeevan
2022-09-27 13:59   ` Swati Sharma
2022-09-26 18:53 ` [igt-dev] [PATCH i-g-t v1 5/5] tests/kms_hdmi_inject: test cleanup Kunal Joshi
2022-09-27  8:51   ` B, Jeevan
2022-09-27 14:00   ` Swati Sharma
2022-09-26 19:23 ` [igt-dev] ✗ GitLab.Pipeline: warning for IGT " Patchwork
2022-09-26 19:47 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2022-09-27  3:51 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220926185321.2897136-2-kunal1.joshi@intel.com \
    --to=kunal1.joshi@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.