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>,
"Karthik B S" <karthik.b.s@intel.com>
Subject: [PATCH i-g-t 8/9] tests/intel/km_big_joiner: use kmstest_force_connector_debugfs for better cleanup functionality
Date: Wed, 10 Apr 2024 12:14:25 +0530 [thread overview]
Message-ID: <20240410064426.1968399-9-kunal1.joshi@intel.com> (raw)
In-Reply-To: <20240410064426.1968399-1-kunal1.joshi@intel.com>
use kmstest_force_connector_debugfs instead of igt_force_and_check_bigjoiner_status
for better cleanup of i915_bigjoiner_force_enable state.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
tests/intel/kms_big_joiner.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c
index 078f76ac1..ebeeaff9c 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,9 @@ 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_debugfs(data->drm_fd,
+ output->config.connector,
+ FORCE_JOINER, "1");
igt_assert_f(status, "Failed to toggle force joiner\n");
}
}
@@ -380,15 +382,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_debugfs();
}
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_debugfs();
}
}
}
@@ -402,16 +404,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_debugfs();
}
}
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_debugfs();
}
}
}
@@ -419,5 +421,6 @@ igt_main
igt_fixture {
igt_display_fini(&data.display);
drm_close_driver(data.drm_fd);
+ igt_reset_connectors_debugfs();
}
}
--
2.34.1
next prev parent reply other threads:[~2024-04-10 6:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 6:44 [PATCH i-g-t 0/9] enhancements for forcing debugfs of connector Kunal Joshi
2024-04-10 6:44 ` [PATCH i-g-t 1/9] lib/igt_kms: Refacror forced_connector struct Kunal Joshi
2024-04-10 6:44 ` [PATCH i-g-t 2/9] lib/igt_kms: add forced_connectors_debugfs array Kunal Joshi
2024-04-10 6:44 ` [PATCH i-g-t 3/9] lib/igt_kms: add enum kmstest_force_type Kunal Joshi
2024-04-10 6:44 ` [PATCH i-g-t 4/9] lib/igt_kms: refactor helpers forced_connectors helpers Kunal Joshi
2024-04-10 6:44 ` [PATCH i-g-t 5/9] lib/igt_kms: add igt_reset_connectors_debugfs Kunal Joshi
2024-04-10 6:44 ` [PATCH i-g-t 6/9] lib/igt_kms: add exit handler function to clear force debugfs state Kunal Joshi
2024-04-10 6:44 ` [PATCH i-g-t 7/9] lib/igt_kms: add kmstest_force_connector_debugfs Kunal Joshi
2024-04-10 6:44 ` Kunal Joshi [this message]
2024-04-10 6:44 ` [PATCH i-g-t 9/9] lib/igt_kms: remove unused igt_force_and_check_bigjoiner_status Kunal Joshi
2024-04-10 6:54 ` ✗ GitLab.Pipeline: warning for enhancements for forcing debugfs of connector Patchwork
2024-04-10 7:20 ` ✓ CI.xeBAT: success " Patchwork
2024-04-10 7:26 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-04-10 15:03 ` [PATCH i-g-t 0/9] " Ville Syrjälä
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=20240410064426.1968399-9-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=karthik.b.s@intel.com \
--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