Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v4 0/2] lib/igt_kms: Skip non-scanout connectors
@ 2026-12-05  4:03 Gil Dekel
  2026-12-05  4:03 ` [PATCH i-g-t v4 1/2] " Gil Dekel
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gil Dekel @ 2026-12-05  4:03 UTC (permalink / raw)
  To: igt-dev
  Cc: Gil Dekel, Karthik B S, Swati Sharma, Juha-Pekka Heikkila,
	Kamil Konieczny, Jani Nikula, Melissa Wen, Louis Chauvet,
	Alex Hung, Thadeu Lima de Souza Cascardo, Mark Yacoub

igt_output_is_connected() treats any DRM_MODE_CONNECTED connector with
modes as a display output. That assumption breaks whenever a driver
exposes a non-scanout connector such as a writeback connector or a
non-scanout DRM_MODE_CONNECTOR_VIRTUAL endpoint alongside physical
displays: generic KMS tests select that connector and fail their first
modeset with -EINVAL. For example, Qualcomm's downstream msm SDE driver
exposes its writeback output as an always-connected VIRTUAL connector
next to physical eDP and DP connectors.

Earlier commit 321448df7fc9 ("lib/igt_kms: Do not treat writeback and
virtual connectors as connected") [1] skipped all VIRTUAL connectors,
which broke VKMS and had to be reverted [2].

This series classifies non-scanout connectors from standard KMS uAPI
without affecting virtual-only drivers (VKMS, virtio-gpu, vmwgfx) or
adding any ioctl overhead on physical-only drivers (i915, xe, amdgpu,
nouveau, upstream msm):
- Patch 1/2 marks WRITEBACK connectors, connectors exposing
  WRITEBACK_FB_ID, and connected VIRTUAL connectors that coexist with
  physical connectors and reject a primary-plane
  DRM_MODE_ATOMIC_TEST_ONLY modeset across all compatible CRTCs as
  non_scanout_sink in igt_display_reset_outputs().
- Patch 2/2 teaches kms_setmode, which enumerates raw drmModeRes
  connectors on a legacy fd, to skip connectors flagged as
  non_scanout_sink.

No code changes since v3 [3] (which passed Xe.CI.BAT, i915.CI.BAT, and
Xe.CI.FULL); resending rebased on master with an expanded Cc list to
reach active KMS, kms_setmode, and VKMS maintainers. Review or feedback
on whether this probe approach looks acceptable for upstream would be
much appreciated.

[1] https://lore.kernel.org/igt-dev/20260819190740.1392859-1-markyacoub@google.com/
[2] https://lore.kernel.org/igt-dev/20260828-vkms_virtual_output_fix-v1-1-789718f4cb00@igalia.com/
[3] https://lore.kernel.org/igt-dev/20261124194441.314626-1-gildekel@google.com/

v4:
- No code changes; rebased on master.
- Reframed cover letter and commit 1/2 around the general non-scanout
  connector contract, with downstream msm SDE as the concrete example.
- Expanded Cc to active KMS, kms_setmode, and VKMS maintainers.
v3:
- Split kms_setmode into patch 2/2 and use for_each_output() in
  igt_display_reset_outputs(), per Jani Nikula's feedback.
- Clarify driver motivation and zero-ioctl CI path in patch 1/2.
v2:
- Replace custom libdrm dumb-buffer probing with an igt_display_t/igt_fb
  TEST_ONLY probe in igt_display_reset_outputs().

Cc: Karthik B S <karthik.b.s@intel.com>
Cc: Swati Sharma <swati2.sharma@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Melissa Wen <mwen@igalia.com>
Cc: Louis Chauvet <louis.chauvet@bootlin.com>
Cc: Alex Hung <alex.hung@amd.com>
Cc: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Cc: Mark Yacoub <markyacoub@google.com>

Gil Dekel (2):
  lib/igt_kms: Skip non-scanout connectors
  tests/kms_setmode: Skip non-scanout sinks

 lib/igt_kms.c       | 86 +++++++++++++++++++++++++++++++++++++++++++--
 lib/igt_kms.h       |  8 +++--
 tests/kms_setmode.c | 37 +++++++++++++++++++
 3 files changed, 125 insertions(+), 6 deletions(-)

-- 
Gil Dekel, Senior SWE, Google | Android Laptops & Tablets Display


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-12-05 23:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05  4:03 [PATCH i-g-t v4 0/2] lib/igt_kms: Skip non-scanout connectors Gil Dekel
2026-12-05  4:03 ` [PATCH i-g-t v4 1/2] " Gil Dekel
2026-12-05  4:03 ` [PATCH i-g-t v4 2/2] tests/kms_setmode: Skip non-scanout sinks Gil Dekel
2026-12-05  6:16 ` ✓ Xe.CI.BAT: success for lib/igt_kms: Skip non-scanout connectors (rev2) Patchwork
2026-12-05  6:34 ` ✓ i915.CI.BAT: " Patchwork
2026-12-05 23:09 ` ✓ i915.CI.Full: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox