Igt-dev Archive on 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: [PATCH i-g-t 2/6] lib/igt_kms: Force joiner support in bigjoiner checks
Date: Wed, 17 Apr 2024 20:03:21 +0530	[thread overview]
Message-ID: <20240417143325.720515-3-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240417143325.720515-1-bhanuprakash.modem@intel.com>

As we recently introduced the option (through debugfs) to
force the bigjoiner, needs to extend the support in bigjoiner
checks to handle the force joiner.

Cc: Kunal Joshi <kunal1.joshi@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 lib/igt_kms.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5271010be..80c22a86d 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6334,6 +6334,7 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
 	struct {
 		enum pipe idx;
 		drmModeModeInfo *mode;
+		bool force_joiner;
 	} pipes[IGT_MAX_PIPES];
 	int max_dotclock;
 
@@ -6351,6 +6352,7 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
 
 		pipes[pipes_in_use].idx = output->pending_pipe;
 		pipes[pipes_in_use].mode = igt_output_get_mode(output);
+		pipes[pipes_in_use].force_joiner = igt_check_force_joiner_status(display->drm_fd, output->name);
 		pipes_in_use++;
 	}
 
@@ -6362,21 +6364,24 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
 	max_dotclock = igt_get_max_dotclock(display->drm_fd);
 
 	/*
-	 * if mode resolution > 5K (or) mode.clock > max dot-clock, then ignore
+	 * if force joiner (or) mode resolution > 5K (or) mode.clock > max dot-clock,
+	 * then ignore
 	 *  - if the consecutive pipe is not available
 	 *  - last crtc in single/multi-connector config
 	 *  - consecutive crtcs in multi-connector config
 	 *
 	 * in multi-connector config ignore if
-	 *  - previous crtc (mode resolution > 5K or mode.clock > max dot-clock) and
+	 *  - previous crtc (force joiner or mode resolution > 5K or mode.clock > max dot-clock) and
 	 *  - current & previous crtcs are consecutive
 	 */
 	for (i = 0; i < pipes_in_use; i++) {
-		if ((igt_bigjoiner_possible(pipes[i].mode, max_dotclock) &&
+		if (((pipes[i].force_joiner ||
+		      igt_bigjoiner_possible(pipes[i].mode, max_dotclock)) &&
 		     ((pipes[i].idx >= (total_pipes - 1)) ||
 		      (!display->pipes[pipes[i].idx + 1].enabled) ||
 		      ((i < (pipes_in_use - 1)) && (abs(pipes[i + 1].idx - pipes[i].idx) <= 1)))) ||
-		    ((i > 0) && igt_bigjoiner_possible(pipes[i - 1].mode, max_dotclock) &&
+		    ((i > 0) && (pipes[i - 1].force_joiner ||
+				 igt_bigjoiner_possible(pipes[i - 1].mode, max_dotclock)) &&
 		     ((!display->pipes[pipes[i - 1].idx + 1].enabled) ||
 		      (abs(pipes[i].idx - pipes[i - 1].idx) <= 1)))) {
 			igt_debug("Pipe/Output combo is not possible with selected mode(s).\n");
-- 
2.43.2


  parent reply	other threads:[~2024-04-17 14:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 14:33 [PATCH i-g-t 0/6] Force joiner support in bigjoiner checks Bhanuprakash Modem
2024-04-17 14:33 ` [PATCH i-g-t 1/6] lib/igt_kms: New helper to check force joiner status Bhanuprakash Modem
2024-04-17 14:33 ` Bhanuprakash Modem [this message]
2024-04-17 14:33 ` [PATCH i-g-t 3/6] tests/intel/kms_pm_lpsp: Force joiner support in bigjoiner checks Bhanuprakash Modem
2024-04-17 14:33 ` [PATCH i-g-t 4/6] tests/kms_flip: " Bhanuprakash Modem
2024-04-17 14:33 ` [PATCH i-g-t 5/6] tests/kms_setmode: " Bhanuprakash Modem
2024-04-17 14:33 ` [PATCH i-g-t 6/6] HAX: Test force joiner on BAT Bhanuprakash Modem
2024-04-17 21:07 ` ✗ Fi.CI.BAT: failure for Force joiner support in bigjoiner checks (rev2) Patchwork
2024-04-17 21:13 ` ✓ CI.xeBAT: success " 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=20240417143325.720515-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox