Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Yacoub <markyacoub@google.com>
To: igt-dev@lists.freedesktop.org
Cc: Mark Yacoub <markyacoub@google.com>
Subject: [PATCH] lib/igt_kms: Do not treat writeback and virtual connectors as connected
Date: Wed, 19 Aug 2026 15:07:40 -0400	[thread overview]
Message-ID: <20260819190740.1392859-1-markyacoub@google.com> (raw)

Writeback and virtual connectors (e.g. DRM_MODE_CONNECTOR_WRITEBACK and
DRM_MODE_CONNECTOR_VIRTUAL) do not represent physical display sinks and
cannot be modeset using standard CRTC / atomic commit operations without
configuring a writeback output framebuffer (WRITEBACK_FB_ID).

On drivers such as MSM, writeback connectors (e.g. Virtual-1, Virtual-2)
report connected status with virtual modes. When generic KMS tests iterate
over connected outputs via for_each_connected_output() or during initial
display setup in igt_display_init(), attempting standard modesets on these
connectors causes failures (-EINVAL) before test execution can begin.

Exclude DRM_MODE_CONNECTOR_WRITEBACK and DRM_MODE_CONNECTOR_VIRTUAL in
igt_output_is_connected() so generic KMS tests only target standard
physical display outputs, while dedicated writeback tests can continue to
iterate all outputs explicitly via for_each_output().

Signed-off-by: Mark Yacoub <markyacoub@google.com>
---
 lib/igt_kms.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 521a03c01..8d4d14847 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -668,6 +668,10 @@ static inline bool igt_output_is_connected(igt_output_t *output)
 	    !output->config.connector->count_modes)
 		return false;
 
+	if (output->config.connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK ||
+	    output->config.connector->connector_type == DRM_MODE_CONNECTOR_VIRTUAL)
+		return false;
+
 	if (output->config.connector->connection == DRM_MODE_CONNECTED)
 		return true;
 
-- 
2.55.0.737.g08866a6d13-goog


             reply	other threads:[~2026-08-19 19:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 19:07 Mark Yacoub [this message]
2026-08-19 21:05 ` ✓ Xe.CI.BAT: success for lib/igt_kms: Do not treat writeback and virtual connectors as connected Patchwork
2026-08-19 21:58 ` ✓ i915.CI.BAT: " Patchwork
2026-08-20  2:20 ` ✗ Xe.CI.FULL: 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=20260819190740.1392859-1-markyacoub@google.com \
    --to=markyacoub@google.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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