Igt-dev Archive on 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>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Ankit Nautiyal" <ankit.k.nautiyal@intel.com>,
	"Bhanuprakash Modem" <bhanuprakash.modem@intel.com>
Subject: [PATCH i-g-t 5/7] tests/intel/kms_big_joiner: use kmstest_force_connector_bigjoiner
Date: Fri, 19 Apr 2024 12:09:59 +0530	[thread overview]
Message-ID: <20240419064001.2401850-6-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20240419064001.2401850-1-kunal1.joshi@intel.com>

use kmstest_force_connector_bigjoiner instead of
kmstest_force_connector_bigjoiner

v2: use igt_reset_connectors (Bhanu)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/intel/kms_big_joiner.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c
index f325a9839..4979cac06 100644
--- a/tests/intel/kms_big_joiner.c
+++ b/tests/intel/kms_big_joiner.c
@@ -87,7 +87,7 @@ static void set_all_master_pipes_for_platform(data_t *data)
 	}
 }
 
-static void toggle_force_joiner_on_all_non_big_joiner_outputs(data_t *data, bool toggle)
+static void enable_force_joiner_on_all_non_big_joiner_outputs(data_t *data)
 {
 	bool status;
 	igt_output_t *output;
@@ -95,7 +95,7 @@ static void toggle_force_joiner_on_all_non_big_joiner_outputs(data_t *data, bool
 
 	for (i = 0; i < data->non_big_joiner_output_count; i++) {
 		output = data->non_big_joiner_output[i];
-		status = igt_force_and_check_bigjoiner_status(data->drm_fd, output->name, toggle);
+		status = kmstest_force_connector_bigjoiner(data->drm_fd, output->config.connector);
 		igt_assert_f(status, "Failed to toggle force joiner\n");
 	}
 }
@@ -383,15 +383,15 @@ igt_main
 		igt_require_f(data.n_pipes > 1,
 			      "Minimum 2 pipes required\n");
 		igt_dynamic_f("single") {
-			toggle_force_joiner_on_all_non_big_joiner_outputs(&data, true);
+			enable_force_joiner_on_all_non_big_joiner_outputs(&data);
 			test_single_joiner(&data, data.non_big_joiner_output_count, true);
-			toggle_force_joiner_on_all_non_big_joiner_outputs(&data, false);
+			igt_reset_connectors();
 		}
 		if (data.non_big_joiner_output_count > 1) {
 			igt_dynamic_f("multi") {
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, true);
+				enable_force_joiner_on_all_non_big_joiner_outputs(&data);
 				test_multi_joiner(&data, data.non_big_joiner_output_count, true);
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, false);
+				igt_reset_connectors();
 			}
 		}
 	}
@@ -405,16 +405,16 @@ igt_main
 			      "Minimum of 2 pipes are required\n");
 		if (data.non_big_joiner_output_count >= 1) {
 			igt_dynamic_f("big_joiner_on_last_pipe") {
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, true);
+				enable_force_joiner_on_all_non_big_joiner_outputs(&data);
 				test_joiner_on_last_pipe(&data, true);
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, false);
+				igt_reset_connectors();
 			}
 		}
 		if (data.non_big_joiner_output_count > 1) {
 			igt_dynamic_f("invalid_combinations") {
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, true);
+				enable_force_joiner_on_all_non_big_joiner_outputs(&data);
 				test_invalid_modeset_two_joiner(&data, false, true);
-				toggle_force_joiner_on_all_non_big_joiner_outputs(&data, false);
+				igt_reset_connectors();
 			}
 		}
 	}
@@ -422,5 +422,6 @@ igt_main
 	igt_fixture {
 		igt_display_fini(&data.display);
 		drm_close_driver(data.drm_fd);
+		igt_reset_connectors();
 	}
 }
-- 
2.25.1


  parent reply	other threads:[~2024-04-19  6:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19  6:39 [PATCH i-g-t 0/7] cleanup and fixes for kms_big_joiner Kunal Joshi
2024-04-19  6:39 ` [PATCH i-g-t 1/7] lib/igt_kms: don't run on unsupported platform Kunal Joshi
2024-04-19  9:32   ` Modem, Bhanuprakash
2024-04-19 11:31     ` Joshi, Kunal1
2024-04-19  6:39 ` [PATCH i-g-t 2/7] tests/intel/kms_big_joiner: fix crash in multi joiner test Kunal Joshi
2024-04-19  9:42   ` Modem, Bhanuprakash
2024-04-19  6:39 ` [PATCH i-g-t 3/7] tests/intel/kms_big_joiner: add missing commit after reset Kunal Joshi
2024-04-19  9:53   ` Modem, Bhanuprakash
2024-04-19 10:09     ` Joshi, Kunal1
2024-04-19 10:51       ` Modem, Bhanuprakash
2024-04-19  6:39 ` [PATCH i-g-t 4/7] lib/igt_kms: add support for forcing bigjoiner on particular connector Kunal Joshi
2024-04-19 10:26   ` Modem, Bhanuprakash
2024-04-19 11:34     ` Joshi, Kunal1
2024-04-19  6:39 ` Kunal Joshi [this message]
2024-04-19  6:40 ` [PATCH i-g-t 6/7] lib/igt_kms: remove unused igt_force_and_check_bigjoiner_status Kunal Joshi
2024-04-19 10:32   ` Modem, Bhanuprakash
2024-04-19  6:40 ` [PATCH i-g-t 7/7] HAX: Do not merge Kunal Joshi
2024-04-19  7:13 ` ✗ Fi.CI.BAT: failure for cleanup and fixes for kms_big_joiner (rev3) Patchwork
2024-04-19  7:17 ` ✓ CI.xeBAT: success " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-04-22  5:34 [PATCH i-g-t 0/7] cleanup and fixes for kms_big_joiner Kunal Joshi
2024-04-22  5:34 ` [PATCH i-g-t 5/7] tests/intel/kms_big_joiner: use kmstest_force_connector_bigjoiner Kunal Joshi
2024-04-22 11:09   ` Modem, Bhanuprakash
2024-04-18 15:28 [PATCH i-g-t 0/7] cleanup and fixes for kms_big_joiner Kunal Joshi
2024-04-18 15:28 ` [PATCH i-g-t 5/7] tests/intel/kms_big_joiner: use kmstest_force_connector_bigjoiner Kunal Joshi

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=20240419064001.2401850-6-kunal1.joshi@intel.com \
    --to=kunal1.joshi@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox