All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, kunal1.joshi@intel.com,
	Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t 1/2] lib/igt_kms: Prevent bigjoiner assignment if next pipe is already in use
Date: Thu,  3 Apr 2025 16:11:48 +0530	[thread overview]
Message-ID: <20250403104149.2033579-2-jeevan.b@intel.com> (raw)
In-Reply-To: <20250403104149.2033579-1-jeevan.b@intel.com>

Added a check to prevent a bigjoiner pipe from using the next pipe
if it's already assigned, avoiding conflicts and ensuring pipe
allocation goes smoothly.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 lib/igt_kms.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 99c8707c7..f3bc481f2 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6777,6 +6777,14 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
 				return false;
 			}
 
+			for (int j = 0; j < pipes_in_use; j++) {
+				if (pipes[j].idx == pipes[i].idx + 1) {
+					igt_info("pipe-%s: Next pipe is already assigned to another output.\n",
+						 kmstest_pipe_name(pipes[j].idx));
+					return false;
+				}
+			}
+
 			if (!display->pipes[pipes[i].idx + 1].enabled) {
 				igt_info("Consecutive pipe-%s: Fused-off, couldn't be used as a Bigjoiner Secondary.\n",
 					 kmstest_pipe_name(display->pipes[pipes[i].idx + 1].pipe));
-- 
2.25.1


  reply	other threads:[~2025-04-03 10:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 10:41 [PATCH i-g-t 0/2] Fix display_mode test for joiner output Jeevan B
2025-04-03 10:41 ` Jeevan B [this message]
2025-04-17  5:40   ` [PATCH i-g-t 1/2] lib/igt_kms: Prevent bigjoiner assignment if next pipe is already in use Karthik B S
2025-04-03 10:41 ` [PATCH i-g-t 2/2] Revert "tests/kms_display_modes: Skip test if joiner display is connected" Jeevan B
2025-04-17  5:41   ` Karthik B S
2025-04-03 14:57 ` ✓ i915.CI.BAT: success for Fix display_mode test for joiner output Patchwork
2025-04-03 15:05 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-04-03 17:39 ` ✓ i915.CI.Full: success " Patchwork
2025-04-03 18:46 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-03 20:49 ` ✓ i915.CI.BAT: success for Fix display_mode test for joiner output (rev2) Patchwork
2025-04-03 22:01 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-04  0:17 ` ✗ i915.CI.Full: failure " Patchwork
2025-04-04  5:51 ` ✓ Xe.CI.Full: 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=20250403104149.2033579-2-jeevan.b@intel.com \
    --to=jeevan.b@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@intel.com \
    --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.