All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
	Kunal Joshi <kunal1.joshi@intel.com>
Subject: [i-g-t V5 2/8] lib/igt_kms: Update force joiner debugfs check
Date: Mon, 29 Apr 2024 14:39:24 +0530	[thread overview]
Message-ID: <20240429090930.1905110-3-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240429090930.1905110-1-bhanuprakash.modem@intel.com>

As we are using only connector name in the API, no need to
pass the igt_output struct, this patch will update the helper
accordingly.

Cc: Kunal Joshi <kunal1.joshi@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 lib/igt_kms.c                | 14 +++++++++-----
 lib/igt_kms.h                |  2 +-
 tests/intel/kms_big_joiner.c |  2 +-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 6a41b535b..743650321 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6306,15 +6306,17 @@ bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector,
 }
 
 /**
+ * igt_has_force_joiner_debugfs
+ * @drmfd: A drm file descriptor
+ * @conn_name: Name of the connector
+ *
  * Checks if the force big joiner debugfs is available
  * for a specific connector.
  *
- * @drmfd: file descriptor of the DRM device.
- * @output: output to check.
  * Returns:
  *  true if the debugfs is available, false otherwise.
  */
-bool igt_has_force_joiner_debugfs(int drmfd, igt_output_t *output)
+bool igt_has_force_joiner_debugfs(int drmfd, char *conn_name)
 {
 	char buf[512];
 	int debugfs_fd, ret;
@@ -6327,12 +6329,14 @@ bool igt_has_force_joiner_debugfs(int drmfd, igt_output_t *output)
 	if (intel_display_ver(intel_get_drm_devid(drmfd)) < 13)
 		return false;
 
-	igt_assert_f(output->name, "Connector name cannot be NULL\n");
-	debugfs_fd = igt_debugfs_connector_dir(drmfd, output->name, O_RDONLY);
+	igt_assert_f(conn_name, "Connector name cannot be NULL\n");
+	debugfs_fd = igt_debugfs_connector_dir(drmfd, conn_name, O_RDONLY);
 	if (debugfs_fd < 0)
 		return false;
+
 	ret = igt_debugfs_simple_read(debugfs_fd, "i915_bigjoiner_force_enable", buf, sizeof(buf));
 	close(debugfs_fd);
+
 	return ret >= 0;
 }
 
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 01604dac9..979cf1300 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -1215,7 +1215,7 @@ int igt_get_max_dotclock(int fd);
 bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock);
 bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector,
 			  int max_dotclock, drmModeModeInfo *mode);
-bool igt_has_force_joiner_debugfs(int drmfd, igt_output_t *output);
+bool igt_has_force_joiner_debugfs(int drmfd, char *conn_name);
 bool igt_check_bigjoiner_support(igt_display_t *display);
 bool igt_parse_mode_string(const char *mode_string, drmModeModeInfo *mode);
 bool intel_pipe_output_combo_valid(igt_display_t *display);
diff --git a/tests/intel/kms_big_joiner.c b/tests/intel/kms_big_joiner.c
index 4979cac06..7c370bc60 100644
--- a/tests/intel/kms_big_joiner.c
+++ b/tests/intel/kms_big_joiner.c
@@ -323,7 +323,7 @@ igt_main
 				data.big_joiner_output[data.big_joiner_output_count++] = output;
 				igt_output_override_mode(output, &mode);
 			} else {
-				if (igt_has_force_joiner_debugfs(data.drm_fd, output)) {
+				if (igt_has_force_joiner_debugfs(data.drm_fd, output->name)) {
 					force_joiner_supported = true;
 					data.non_big_joiner_output[data.non_big_joiner_output_count++] = output;
 				}
-- 
2.43.2


  parent reply	other threads:[~2024-04-29  9:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  9:09 [i-g-t V5 0/8] Force joiner support in bigjoiner checks Bhanuprakash Modem
2024-04-29  9:09 ` [i-g-t V5 1/8] lib/igt_kms: Split the bigjoiner check into multiple Bhanuprakash Modem
2024-04-29  9:09 ` Bhanuprakash Modem [this message]
2024-04-29  9:09 ` [i-g-t V5 3/8] lib/igt_kms: New helper to check force joiner status Bhanuprakash Modem
2024-04-29  9:09 ` [i-g-t V5 4/8] lib/igt_kms: Force joiner support in bigjoiner checks Bhanuprakash Modem
2024-04-29  9:09 ` [i-g-t V5 5/8] tests/intel/kms_pm_lpsp: " Bhanuprakash Modem
2024-04-29  9:09 ` [i-g-t V5 6/8] tests/kms_flip: " Bhanuprakash Modem
2024-04-29  9:09 ` [i-g-t V5 7/8] tests/kms_setmode: " Bhanuprakash Modem
2024-04-29  9:09 ` [i-g-t V5 8/8] HAX: Test force joiner on BAT Bhanuprakash Modem
2024-04-29  9:43 ` ✓ CI.xeBAT: success for Force joiner support in bigjoiner checks (rev6) Patchwork
2024-04-29  9:52 ` ✓ Fi.CI.BAT: " Patchwork
2024-04-29 10:40 ` ✗ CI.xeFULL: failure " Patchwork
2024-04-29 10:56 ` ✗ Fi.CI.IGT: " 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=20240429090930.1905110-3-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kunal1.joshi@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 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.