From: Karthik B S <karthik.b.s@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, santhosh.reddy.guddati@intel.com,
kunal1.joshi@intel.com, bhanuprakash.modem@intel.com,
Karthik B S <karthik.b.s@intel.com>
Subject: [PATCH i-g-t v2 2/3] lib/kms: Update force joiner helpers to accomodate Ultra joiner
Date: Wed, 11 Sep 2024 12:52:03 +0530 [thread overview]
Message-ID: <20240911072204.22825-3-karthik.b.s@intel.com> (raw)
In-Reply-To: <20240911072204.22825-1-karthik.b.s@intel.com>
v2: Split the lib updates to separate patch (Ankit)
Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
lib/igt_kms.c | 33 +++++++++++++++++++++++++--------
lib/igt_kms.h | 2 +-
tests/intel/kms_joiner.c | 2 +-
3 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index cf453dcfc..34e6d0cad 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1720,34 +1720,51 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector,
return true;
}
-static bool force_connector_bigjoiner(int drm_fd,
+static bool force_connector_joiner(int drm_fd,
drmModeConnector *connector,
const char *value)
{
return connector_attr_set_debugfs(drm_fd, connector,
- "i915_bigjoiner_force_enable",
+ "i915_joiner_force_enable",
value, "0");
}
/**
- * kmstest_force_connector_bigjoiner:
+ * kmstest_force_connector_joiner:
* @fd: drm file descriptor
* @connector: connector
*
- * Enable force bigjoiner state on the specified connector
+ * Enable force joiner state on the specified connector
* and install exit handler for resetting
*
* Returns: True on success
*/
-bool kmstest_force_connector_bigjoiner(int drm_fd, drmModeConnector *connector)
+bool kmstest_force_connector_joiner(int drm_fd, drmModeConnector *connector, int joined_pipes)
{
- const char *value = "1";
+ const char *value;
drmModeConnector *temp;
+ switch (joined_pipes) {
+ case 0:
+ value = "0";
+ break;
+ case 1:
+ value = "1";
+ break;
+ case 2:
+ value = "2";
+ break;
+ case 4:
+ value = "4";
+ break;
+ default:
+ igt_assert(0);
+ }
+
if (!is_intel_device(drm_fd))
return false;
- if (!force_connector_bigjoiner(drm_fd, connector, value))
+ if (!force_connector_joiner(drm_fd, connector, value))
return false;
dump_connector_attrs();
@@ -6420,7 +6437,7 @@ bool igt_has_force_joiner_debugfs(int drmfd, char *conn_name)
if (debugfs_fd < 0)
return false;
- ret = igt_debugfs_simple_read(debugfs_fd, "i915_bigjoiner_force_enable", buf, sizeof(buf));
+ ret = igt_debugfs_simple_read(debugfs_fd, "i915_joiner_force_enable", buf, sizeof(buf));
close(debugfs_fd);
return ret >= 0;
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 4455632f4..c25acbb5f 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -262,7 +262,7 @@ struct edid;
bool kmstest_force_connector(int fd, drmModeConnector *connector,
enum kmstest_force_connector_state state);
-bool kmstest_force_connector_bigjoiner(int drm_fd, drmModeConnector *connector);
+bool kmstest_force_connector_joiner(int drm_fd, drmModeConnector *connector, int joined_pipes);
void kmstest_force_edid(int drm_fd, drmModeConnector *connector,
const struct edid *edid);
diff --git a/tests/intel/kms_joiner.c b/tests/intel/kms_joiner.c
index 633bf51c7..13863d5e1 100644
--- a/tests/intel/kms_joiner.c
+++ b/tests/intel/kms_joiner.c
@@ -106,7 +106,7 @@ static void enable_force_joiner_on_all_non_big_joiner_outputs(data_t *data)
for (i = 0; i < data->non_big_joiner_output_count; i++) {
output = data->non_big_joiner_output[i];
- status = kmstest_force_connector_bigjoiner(data->drm_fd, output->config.connector);
+ status = kmstest_force_connector_joiner(data->drm_fd, output->config.connector, 2);
igt_assert_f(status, "Failed to toggle force joiner\n");
}
}
--
2.39.1
next prev parent reply other threads:[~2024-09-11 7:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 7:22 [PATCH i-g-t v2 0/3] Add tests for ultrajoiner validation Karthik B S
2024-09-11 7:22 ` [PATCH i-g-t v2 1/3] tests/kms_joiner: Add tests for Ultrajoiner validation Karthik B S
2024-09-17 5:06 ` Reddy Guddati, Santhosh
2024-09-18 7:13 ` Karthik B S
2024-09-11 7:22 ` Karthik B S [this message]
2024-09-11 7:43 ` [PATCH i-g-t v2 2/3] lib/kms: Update force joiner helpers to accomodate Ultra joiner Reddy Guddati, Santhosh
2024-09-18 7:14 ` Karthik B S
2024-09-11 7:22 ` [PATCH i-g-t v2 3/3] tests/kms_joiner: Add subtests for force ultra joiner validation Karthik B S
2024-09-12 4:47 ` ✓ Fi.CI.BAT: success for Add tests for ultrajoiner validation (rev2) Patchwork
2024-09-12 4:59 ` ✓ CI.xeBAT: " Patchwork
2024-09-12 23:01 ` ✗ 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=20240911072204.22825-3-karthik.b.s@intel.com \
--to=karthik.b.s@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kunal1.joshi@intel.com \
--cc=santhosh.reddy.guddati@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