Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation
@ 2026-11-26 10:07 Imre Deak
  2026-11-26 10:07 ` [PATCH 01/13] drm/i915/dp: Allow rebuilding the source rate list Imre Deak
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

This series adds support for dynamic DDI allocation on NVL+. This allows
a system to have more connectors than DDI HW resources by allocating
DDIs to connectors on demand.

The approach is described in "drm/i915/ddi_mgr: Add support for dynamic
DDI allocation".

For now, legacy DDIs are inherited from BIOS or allocated only during
driver loading and system resume. Runtime reallocation support will be
added in a follow-up series.

Imre Deak (13):
  drm/i915/dp: Allow rebuilding the source rate list
  drm/i915/hotplug: Set detector enable bits without a clear mask
  drm/i915/nvl+: Add support for remapping logical HPD pins to HW pins
  drm/xe/display: Distinguish failed system suspend recovery
  drm/i915/gmbus: Extract a helper for Type-C DDC pin mapping
  drm/i915/ddi_mgr: Add support for dynamic DDI allocation
  drm/i915/gmbus: Extract adapter creation and destruction
  drm/i915/gmbus: Add stable DDC adapters for the DDI pool
  drm/i915/ddi_mgr: Register encoders with dynamic DDI support
  drm/i915/ddi_mgr: Keep AUX access consistent with DDI pool routes
  drm/i915/ddi_mgr: Verify and restore DDI allocations after runtime
    resume
  drm/i915/ddi_mgr: Handle DDI pool system suspend and resume
  drm/i915/ddi_mgr: Enable dynamic DDI allocation at load

 drivers/gpu/drm/i915/Makefile                 |    1 +
 drivers/gpu/drm/i915/display/intel_atomic.c   |    4 +
 drivers/gpu/drm/i915/display/intel_ddi.c      |   18 +-
 drivers/gpu/drm/i915/display/intel_ddi_mgr.c  | 1107 +++++++++++++++++
 drivers/gpu/drm/i915/display/intel_ddi_mgr.h  |   32 +
 .../gpu/drm/i915/display/intel_ddi_mgr_regs.h |   40 +
 drivers/gpu/drm/i915/display/intel_display.c  |   12 +-
 .../gpu/drm/i915/display/intel_display_core.h |    8 +
 .../drm/i915/display/intel_display_driver.c   |    5 +
 drivers/gpu/drm/i915/display/intel_dp.c       |   16 +-
 drivers/gpu/drm/i915/display/intel_dp.h       |    2 +
 drivers/gpu/drm/i915/display/intel_dp_aux.c   |   15 +-
 drivers/gpu/drm/i915/display/intel_gmbus.c    |  214 +++-
 drivers/gpu/drm/i915/display/intel_gmbus.h    |    6 +
 drivers/gpu/drm/i915/display/intel_hdmi.c     |   19 +-
 .../gpu/drm/i915/display/intel_hotplug_irq.c  |  127 +-
 .../gpu/drm/i915/display/intel_hotplug_irq.h  |    4 +
 drivers/gpu/drm/i915/display/intel_tc.c       |   46 +-
 drivers/gpu/drm/i915/display/intel_tc.h       |    1 +
 drivers/gpu/drm/i915/i915_driver.c            |    7 +
 drivers/gpu/drm/xe/Makefile                   |    1 +
 drivers/gpu/drm/xe/display/xe_display.c       |   16 +-
 drivers/gpu/drm/xe/display/xe_display.h       |    4 +-
 drivers/gpu/drm/xe/xe_device.c                |    4 +-
 24 files changed, 1621 insertions(+), 88 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr.h
 create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h

-- 
2.49.1


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

* [PATCH 01/13] drm/i915/dp: Allow rebuilding the source rate list
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:07 ` [PATCH 02/13] drm/i915/hotplug: Set detector enable bits without a clear mask Imre Deak
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Follow-up changes will move the handling of a legacy PHY to a different
encoder, requiring the source and common link rates to be rebuilt.
Allow rebuilding the source rate list to support this.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 7 +------
 drivers/gpu/drm/i915/display/intel_dp.h | 1 +
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index ef164a7976187..6f03a169931eb 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -548,8 +548,7 @@ static int vbt_max_link_rate(struct intel_dp *intel_dp)
 	return max_rate;
 }
 
-static void
-intel_dp_set_source_rates(struct intel_dp *intel_dp)
+void intel_dp_set_source_rates(struct intel_dp *intel_dp)
 {
 	/* The values must be in increasing order */
 	static const int bmg_rates[] = {
@@ -580,10 +579,6 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp)
 	const int *source_rates;
 	int size, max_rate = 0, vbt_max_rate;
 
-	/* This should only be done once */
-	drm_WARN_ON(display->drm,
-		    intel_dp->source_rates || intel_dp->num_source_rates);
-
 	if (DISPLAY_VER(display) >= 14) {
 		if (display->platform.battlemage) {
 			source_rates = bmg_rates;
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index 1f4a3aff9abeb..36cd340d809f2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -58,6 +58,7 @@ void intel_dp_connector_sync_state(struct intel_connector *connector,
 				   const struct intel_crtc_state *crtc_state);
 void intel_dp_set_link_params(struct intel_dp *intel_dp,
 			      int link_rate, int lane_count);
+void intel_dp_set_source_rates(struct intel_dp *intel_dp);
 int intel_dp_get_active_pipes(struct intel_dp *intel_dp,
 			      struct drm_modeset_acquire_ctx *ctx,
 			      u8 *pipe_mask);
-- 
2.49.1


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

* [PATCH 02/13] drm/i915/hotplug: Set detector enable bits without a clear mask
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
  2026-11-26 10:07 ` [PATCH 01/13] drm/i915/dp: Allow rebuilding the source rate list Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:07 ` [PATCH 03/13] drm/i915/nvl+: Add support for remapping logical HPD pins to HW pins Imre Deak
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

The MTP DDI and TC HPD detection enable fields are single bits, so set
them without clearing them first. This simplifies a follow-up change
that remaps an encoder's logical HPD pin to a hardware pin.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hotplug_irq.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hotplug_irq.c b/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
index ce0c8f56106a9..81aaf38f1b130 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
@@ -1007,10 +1007,10 @@ static void mtp_ddi_hpd_detection_setup(struct intel_display *display)
 static void mtp_ddi_hpd_enable_detection(struct intel_encoder *encoder)
 {
 	struct intel_display *display = to_intel_display(encoder);
+	u32 enables = mtp_ddi_hotplug_enables(encoder);
 
-	intel_de_rmw(display, SHOTPLUG_CTL_DDI,
-		     mtp_ddi_hotplug_mask(encoder->hpd_pin),
-		     mtp_ddi_hotplug_enables(encoder));
+	/* Only set the enable bit; no clear mask is needed. */
+	intel_de_rmw(display, SHOTPLUG_CTL_DDI, 0, enables);
 }
 
 static void mtp_tc_hpd_detection_setup(struct intel_display *display)
@@ -1023,10 +1023,10 @@ static void mtp_tc_hpd_detection_setup(struct intel_display *display)
 static void mtp_tc_hpd_enable_detection(struct intel_encoder *encoder)
 {
 	struct intel_display *display = to_intel_display(encoder);
+	u32 enables = mtp_tc_hotplug_enables(encoder);
 
-	intel_de_rmw(display, SHOTPLUG_CTL_TC,
-		     mtp_tc_hotplug_mask(encoder->hpd_pin),
-		     mtp_tc_hotplug_enables(encoder));
+	/* Only set the enable bit; no clear mask is needed. */
+	intel_de_rmw(display, SHOTPLUG_CTL_TC, 0, enables);
 }
 
 static void mtp_hpd_invert(struct intel_display *display)
-- 
2.49.1


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

* [PATCH 03/13] drm/i915/nvl+: Add support for remapping logical HPD pins to HW pins
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
  2026-11-26 10:07 ` [PATCH 01/13] drm/i915/dp: Allow rebuilding the source rate list Imre Deak
  2026-11-26 10:07 ` [PATCH 02/13] drm/i915/hotplug: Set detector enable bits without a clear mask Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:07 ` [PATCH 04/13] drm/xe/display: Distinguish failed system suspend recovery Imre Deak
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Add support for remapping an encoder's logical HPD pin to north and PCH
HW pins. This prepares for moving a legacy port's handling to another
encoder, changing a TC encoder's legacy/alt mode role and its
legacy/DP-alt/TBT-alt HPD sources.

Only the legacy PCH mapping needs to select a different HW pin. North
pins retain their identity mapping or have their source disabled.

Limit support to NVL+ for now, leaving a unified approach for later.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 .../gpu/drm/i915/display/intel_display_core.h |   4 +
 .../gpu/drm/i915/display/intel_hotplug_irq.c  | 115 ++++++++++++++++--
 .../gpu/drm/i915/display/intel_hotplug_irq.h  |   4 +
 3 files changed, 113 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index b422d24e21b2d..72183bfee07a3 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -168,6 +168,10 @@ struct intel_hotplug {
 	struct delayed_work hotplug_work;
 
 	const u32 *hpd, *pch_hpd;
+	/* Mutable hardware sources for stable logical pins on NVL+. */
+	u32 hpd_map[HPD_NUM_PINS], pch_hpd_map[HPD_NUM_PINS];
+	/* Logical to physical PCH pin; HPD_NONE means no south source. */
+	enum hpd_pin pch_pin_map[HPD_NUM_PINS];
 
 	struct {
 		unsigned long last_jiffies;
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug_irq.c b/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
index 81aaf38f1b130..da45eb4775707 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
@@ -136,6 +136,14 @@ static const u32 hpd_mtp[HPD_NUM_PINS] = {
 static void intel_hpd_init_pins(struct intel_display *display)
 {
 	struct intel_hotplug *hpd = &display->hotplug;
+	enum hpd_pin pin;
+
+	/*
+	 * NOTE: the pin map is only used by MTL+, but for simplicity init it
+	 * for all platforms.
+	 */
+	for (pin = HPD_NONE; pin < HPD_NUM_PINS; pin++)
+		hpd->pch_pin_map[pin] = pin;
 
 	if (HAS_GMCH(display)) {
 		if (display->platform.g4x || display->platform.valleyview ||
@@ -146,7 +154,14 @@ static void intel_hpd_init_pins(struct intel_display *display)
 		return;
 	}
 
-	if (DISPLAY_VER(display) >= 14)
+	if (DISPLAY_VER(display) >= 35) {
+		/*
+		 * The (north) HPD map is only used by NVL+.
+		 * TODO: Make the mapping logic platform independent.
+		 */
+		memcpy(hpd->hpd_map, hpd_xelpdp, sizeof(hpd->hpd_map));
+		hpd->hpd = hpd->hpd_map;
+	} else if (DISPLAY_VER(display) >= 14)
 		hpd->hpd = hpd_xelpdp;
 	else if (DISPLAY_VER(display) >= 11)
 		hpd->hpd = hpd_gen11;
@@ -165,7 +180,14 @@ static void intel_hpd_init_pins(struct intel_display *display)
 	    (!HAS_PCH_SPLIT(display) || HAS_PCH_NOP(display)))
 		return;
 
-	if (INTEL_PCH_TYPE(display) >= PCH_MTL)
+	if (DISPLAY_VER(display) >= 35) {
+		/*
+		 * The PCH HPD map is only used by NVL+.
+		 * TODO: Make the mapping logic platform independent.
+		 */
+		memcpy(hpd->pch_hpd_map, hpd_mtp, sizeof(hpd->pch_hpd_map));
+		hpd->pch_hpd = hpd->pch_hpd_map;
+	} else if (INTEL_PCH_TYPE(display) >= PCH_MTL)
 		hpd->pch_hpd = hpd_mtp;
 	else if (INTEL_PCH_TYPE(display) >= PCH_DG1)
 		hpd->pch_hpd = hpd_sde_dg1;
@@ -181,6 +203,38 @@ static void intel_hpd_init_pins(struct intel_display *display)
 		MISSING_CASE(INTEL_PCH_TYPE(display));
 }
 
+/*
+ * Remap an encoder's logical TC HPD pin to separate north and PCH HW HPD
+ * pins. The north mapping must be an identity mapping or disable the
+ * source. The PCH mapping may select any TC HW pin or disable the source.
+ * Either source is disabled by mapping it to HPD_NONE.
+ *
+ * TODO: Make the remapping generic and independent of the platform.
+ */
+void intel_hpd_set_pin_sources(struct intel_display *display, enum
+			       hpd_pin logical_pin, enum hpd_pin hw_pin,
+			       enum hpd_pin pch_hw_pin)
+{
+	struct intel_hotplug *hpd = &display->hotplug;
+
+	if (drm_WARN_ON(display->drm, DISPLAY_VER(display) < 35))
+		return;
+
+	if (drm_WARN_ON(display->drm, logical_pin < HPD_PORT_TC1 || logical_pin > HPD_PORT_TC4))
+		return;
+
+	if (drm_WARN_ON(display->drm, hw_pin != HPD_NONE && logical_pin != hw_pin))
+		return;
+
+	if (drm_WARN_ON(display->drm, pch_hw_pin != HPD_NONE &&
+				      (pch_hw_pin < HPD_PORT_TC1 || pch_hw_pin > HPD_PORT_TC4)))
+		return;
+
+	hpd->hpd_map[logical_pin] = hpd_xelpdp[hw_pin];
+	hpd->pch_pin_map[logical_pin] = pch_hw_pin;
+	hpd->pch_hpd_map[logical_pin] = hpd_mtp[pch_hw_pin];
+}
+
 /* For display hotplug interrupt */
 void i915_hotplug_interrupt_update_locked(struct intel_display *display,
 					  u32 mask, u32 bits)
@@ -552,6 +606,28 @@ void xelpdp_pica_irq_handler(struct intel_display *display, u32 iir)
 			"Unexpected DE HPD/AUX interrupt 0x%08x\n", iir);
 }
 
+static void xe3plpd_tc_hpd_pins(struct intel_display *display,
+			      u32 *pin_mask, u32 *long_mask,
+			      u32 trigger, u32 hotplug_reg)
+{
+	enum hpd_pin pin;
+
+	for (pin = HPD_PORT_TC1; pin <= HPD_PORT_TC4; pin++) {
+		enum hpd_pin hw_pin = display->hotplug.pch_pin_map[pin];
+
+		if (!(display->hotplug.pch_hpd[pin] & trigger))
+			continue;
+
+		*pin_mask |= BIT(pin);
+		if (icp_tc_port_hotplug_long_detect(hw_pin, hotplug_reg))
+			*long_mask |= BIT(pin);
+	}
+
+	drm_dbg_kms(display->drm,
+		    "hotplug event received, stat 0x%08x, dig 0x%08x, pins 0x%08x, long 0x%08x\n",
+		    trigger, hotplug_reg, *pin_mask, *long_mask);
+}
+
 void icp_irq_handler(struct intel_display *display, u32 pch_iir)
 {
 	u32 ddi_hotplug_trigger = pch_iir & SDE_DDI_HOTPLUG_MASK_ICP;
@@ -577,10 +653,14 @@ void icp_irq_handler(struct intel_display *display, u32 pch_iir)
 
 		dig_hotplug_reg = intel_de_rmw_fw(display, SHOTPLUG_CTL_TC, 0, 0);
 
-		intel_get_hpd_pins(display, &pin_mask, &long_mask,
-				   tc_hotplug_trigger, dig_hotplug_reg,
-				   display->hotplug.pch_hpd,
-				   icp_tc_port_hotplug_long_detect);
+		if (DISPLAY_VER(display) >= 35)
+			xe3plpd_tc_hpd_pins(display, &pin_mask, &long_mask,
+					   tc_hotplug_trigger, dig_hotplug_reg);
+		else
+			intel_get_hpd_pins(display, &pin_mask, &long_mask,
+					   tc_hotplug_trigger, dig_hotplug_reg,
+					   display->hotplug.pch_hpd,
+					   icp_tc_port_hotplug_long_detect);
 	}
 
 	if (pin_mask)
@@ -994,7 +1074,10 @@ static u32 mtp_tc_hotplug_mask(enum hpd_pin hpd_pin)
 
 static u32 mtp_tc_hotplug_enables(struct intel_encoder *encoder)
 {
-	return mtp_tc_hotplug_mask(encoder->hpd_pin);
+	struct intel_display *display = to_intel_display(encoder);
+	enum hpd_pin hw_pin = display->hotplug.pch_pin_map[encoder->hpd_pin];
+
+	return mtp_tc_hotplug_mask(hw_pin);
 }
 
 static void mtp_ddi_hpd_detection_setup(struct intel_display *display)
@@ -1096,6 +1179,12 @@ static void _xelpdp_pica_hpd_detection_setup(struct intel_display *display,
 	u32 mask = XELPDP_TBT_HOTPLUG_ENABLE |
 		XELPDP_DP_ALT_HOTPLUG_ENABLE;
 
+	/*
+	 * North HPD mappings are either identity mappings or disabled, so the
+	 * logical pin passed here can also be used as the HW pin.
+	 *
+	 * TODO: Unify north and PCH HPD mapping handling.
+	 */
 	if (!is_xelpdp_pica_hpd_pin(hpd_pin))
 		return;
 
@@ -1119,7 +1208,8 @@ static void xelpdp_pica_hpd_detection_setup(struct intel_display *display)
 	BUILD_BUG_ON(BITS_PER_TYPE(available_pins) < HPD_NUM_PINS);
 
 	for_each_intel_encoder(display->drm, encoder)
-		available_pins |= BIT(encoder->hpd_pin);
+		if (display->hotplug.hpd[encoder->hpd_pin])
+			available_pins |= BIT(encoder->hpd_pin);
 
 	for_each_hpd_pin(pin)
 		_xelpdp_pica_hpd_detection_setup(display, pin, available_pins & BIT(pin));
@@ -1127,8 +1217,13 @@ static void xelpdp_pica_hpd_detection_setup(struct intel_display *display)
 
 static void xelpdp_hpd_enable_detection(struct intel_encoder *encoder)
 {
-	xelpdp_pica_hpd_enable_detection(encoder);
-	mtp_hpd_enable_detection(encoder);
+	struct intel_display *display = to_intel_display(encoder);
+
+	if (display->hotplug.hpd[encoder->hpd_pin])
+		xelpdp_pica_hpd_enable_detection(encoder);
+
+	if (display->hotplug.pch_hpd[encoder->hpd_pin])
+		mtp_hpd_enable_detection(encoder);
 }
 
 static void xelpdp_hpd_irq_setup(struct intel_display *display)
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug_irq.h b/drivers/gpu/drm/i915/display/intel_hotplug_irq.h
index 9063bb02a2e9a..9bfa446202b69 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug_irq.h
+++ b/drivers/gpu/drm/i915/display/intel_hotplug_irq.h
@@ -8,6 +8,7 @@
 
 #include <linux/types.h>
 
+enum hpd_pin;
 struct intel_display;
 struct intel_encoder;
 
@@ -27,6 +28,9 @@ void i915_hotplug_interrupt_update_locked(struct intel_display *display,
 void i915_hotplug_interrupt_update(struct intel_display *display,
 				   u32 mask, u32 bits);
 
+void intel_hpd_set_pin_sources(struct intel_display *display, enum hpd_pin logical_pin,
+			       enum hpd_pin hw_pin, enum hpd_pin pch_hw_pin);
+
 void intel_hpd_enable_detection(struct intel_encoder *encoder);
 void intel_hpd_irq_setup(struct intel_display *display);
 
-- 
2.49.1


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

* [PATCH 04/13] drm/xe/display: Distinguish failed system suspend recovery
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (2 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 03/13] drm/i915/nvl+: Add support for remapping logical HPD pins to HW pins Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 13:22   ` Jani Nikula
  2026-11-26 10:07 ` [PATCH 05/13] drm/i915/gmbus: Extract a helper for Type-C DDC pin mapping Imre Deak
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

A suspend failure before xe_irq_suspend() resumes display while its HPD
interrupts are still enabled. Pass that condition to the display resume
path so a later DDI-pool change can preserve its cached assignments and
HPD source tables on recovery.

Normal system resume continues after interrupt reset/postinstall, with HPD
masked until display initialization completes. Document replacing this
distinction with display-only interrupt shutdown/reinitialization once
those hooks are available.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/xe/display/xe_display.c | 7 ++++++-
 drivers/gpu/drm/xe/display/xe_display.h | 4 ++--
 drivers/gpu/drm/xe/xe_device.c          | 4 ++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 0236f69a0f883..f757cfad4bd6e 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -286,7 +286,12 @@ void xe_display_pm_resume_early(struct xe_device *xe)
 	intel_display_driver_pm_resume_early(display);
 }
 
-void xe_display_pm_resume(struct xe_device *xe)
+/*
+ * FIXME: Disable display-only interrupts at the end of xe_display_pm_suspend()
+ * and reinitialize them here, including failed-suspend recovery. That would
+ * remove the need to distinguish recovery without an interrupt reset.
+ */
+void xe_display_pm_resume(struct xe_device *xe, bool suspend_failed)
 {
 	struct intel_display *display = xe->display;
 
diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
index 6c580d9593b03..79f94be0cfb65 100644
--- a/drivers/gpu/drm/xe/display/xe_display.h
+++ b/drivers/gpu/drm/xe/display/xe_display.h
@@ -41,7 +41,7 @@ void xe_display_irq_postinstall(struct xe_device *xe);
 void xe_display_pm_suspend(struct xe_device *xe);
 void xe_display_pm_suspend_late(struct xe_device *xe);
 void xe_display_pm_resume_early(struct xe_device *xe);
-void xe_display_pm_resume(struct xe_device *xe);
+void xe_display_pm_resume(struct xe_device *xe, bool suspend_failed);
 void xe_display_pm_runtime_suspend(struct xe_device *xe);
 void xe_display_pm_runtime_suspend_late(struct xe_device *xe);
 void xe_display_pm_runtime_resume_early(struct xe_device *xe);
@@ -80,7 +80,7 @@ static inline void xe_display_irq_postinstall(struct xe_device *xe) {}
 static inline void xe_display_pm_suspend(struct xe_device *xe) {}
 static inline void xe_display_pm_suspend_late(struct xe_device *xe) {}
 static inline void xe_display_pm_resume_early(struct xe_device *xe) {}
-static inline void xe_display_pm_resume(struct xe_device *xe) {}
+static inline void xe_display_pm_resume(struct xe_device *xe, bool suspend_failed) {}
 static inline void xe_display_pm_runtime_suspend(struct xe_device *xe) {}
 static inline void xe_display_pm_runtime_suspend_late(struct xe_device *xe) {}
 static inline void xe_display_pm_runtime_resume_early(struct xe_device *xe) {}
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 36693df655941..884a2be28c17b 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1464,7 +1464,7 @@ int xe_device_suspend(struct xe_device *xe, bool hibernate, bool flr)
 	return 0;
 
 err_display:
-	xe_display_pm_resume(xe);
+	xe_display_pm_resume(xe, true);
 	xe_pxp_pm_resume(xe->pxp);
 	return err;
 }
@@ -1543,7 +1543,7 @@ int xe_device_resume(struct xe_device *xe, bool flr)
 		 * Try to bring up display before bailing from GT resume failure,
 		 * so we don't leave the user clueless with a blank screen.
 		 */
-		xe_display_pm_resume(xe);
+		xe_display_pm_resume(xe, false);
 		if (err)
 			return err;
 
-- 
2.49.1


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

* [PATCH 05/13] drm/i915/gmbus: Extract a helper for Type-C DDC pin mapping
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (3 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 04/13] drm/xe/display: Distinguish failed system suspend recovery Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:07 ` [PATCH 06/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Expose the Type-C port to GMBUS pin conversion and use it for the ICL+
HDMI default. The DDI manager will also need this mapping before output
setup, when the encoders do not exist yet.

The regular NVL+ HDMI default mapping does not use this helper yet;
that will be fixed in a follow-up series. This is unlikely to cause
problems in practice, as VBTs tend to specify the DDC pins explicitly.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_gmbus.c | 5 +++++
 drivers/gpu/drm/i915/display/intel_gmbus.h | 2 ++
 drivers/gpu/drm/i915/display/intel_hdmi.c  | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index d43c81d362e6c..e80822d3e9185 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -202,6 +202,11 @@ static const struct gmbus_pin *get_gmbus_pin(struct intel_display *display,
 	return &pins[pin];
 }
 
+u8 intel_gmbus_tc_port_to_pin(enum tc_port tc_port)
+{
+	return GMBUS_PIN_9_TC1 + tc_port - TC_PORT_1;
+}
+
 bool intel_gmbus_is_valid_pin(struct intel_display *display, unsigned int pin)
 {
 	return get_gmbus_pin(display, pin);
diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.h b/drivers/gpu/drm/i915/display/intel_gmbus.h
index 5c03100ce46b0..6f05456388329 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.h
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.h
@@ -9,6 +9,7 @@
 #include <linux/types.h>
 
 struct i2c_adapter;
+enum tc_port;
 struct intel_connector;
 struct intel_display;
 
@@ -37,6 +38,7 @@ struct intel_display;
 
 int intel_gmbus_setup(struct intel_display *display);
 void intel_gmbus_teardown(struct intel_display *display);
+u8 intel_gmbus_tc_port_to_pin(enum tc_port tc_port);
 bool intel_gmbus_is_valid_pin(struct intel_display *display, unsigned int pin);
 int intel_gmbus_output_aksv(struct i2c_adapter *adapter);
 
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 667d4514c375a..7be5eadcadf03 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -2880,7 +2880,7 @@ static u8 icl_encoder_to_ddc_pin(struct intel_encoder *encoder)
 	if (intel_encoder_is_combo(encoder))
 		return GMBUS_PIN_1 + port;
 	else if (intel_encoder_is_tc(encoder))
-		return GMBUS_PIN_9_TC1 + intel_encoder_to_tc(encoder);
+		return intel_gmbus_tc_port_to_pin(intel_encoder_to_tc(encoder));
 
 	drm_WARN(display->drm, 1, "Unknown port:%c\n", port_name(port));
 	return GMBUS_PIN_2;
-- 
2.49.1


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

* [PATCH 06/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (4 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 05/13] drm/i915/gmbus: Extract a helper for Type-C DDC pin mapping Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 13:23   ` Jani Nikula
  2026-11-26 10:07 ` [PATCH 07/13] drm/i915/gmbus: Extract adapter creation and destruction Imre Deak
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Type-C ports described in VBT need a DDI assignment to drive a legacy or
DP-alt PHY, or a TBT DP-in adapter. eDP panels on Type-C PHYs and
dedicated external ports have preallocated, fixed DDIs; the latter are
not controlled by the Type-C subsystem.

The driver allocates DDIs for dynamic legacy ports; IOM and TBT firmware
handle DP-alt and TBT-alt allocations, respectively. IOM_DP_RESOURCE_MNG
exposes the shared pool for VBT ports with dynamic-DDI support and
eligible alt-mode ports. A free DDI can be assigned to a PHY or DP-in
adapter on demand.

Firmware allocates and releases DDIs as alt-mode sinks connect and
disconnect, regardless of whether userspace enables them. Connected but
unused alt-mode sinks can therefore occupy DDIs needed by a legacy sink
the user wants to enable. Driver control over all allocations would let
assignments follow the requested display configuration. Alas, the
hardware design on current generations does not allow this and instead
imposes a complex allocation scheme involving both the OS and firmware.

Add a manager to read VBT and IOM state before GMBUS and output setup,
inherit existing legacy DDI assignments from BIOS and allocate free
supported DDIs, preferring DDI-to-PHY identity mappings. Each DRM
encoder keeps a fixed DDI in encoder->port. The DDI assigned to a legacy
PHY determines which encoder handles it, whether inherited from BIOS/GOP
for an active or inactive port or newly allocated by the driver.

For now, this enables only static legacy DDI allocation. Legacy DDIs are
inherited from BIOS or allocated only during driver loading and system
resume, and these assignments remain unchanged during runtime. Runtime
reallocation support will be added in a follow-up series.

AUX and DDI/PHY/PLL register accesses use the allocated DDI instance.
Legacy HPD and GMBUS DDC pins identify the PHY, while DP-alt/TBT-alt HPD
sources identify the DDI. An encoder selected for a legacy PHY must use
that PHY's HPD source, DDC pin and VBT capabilities, including link
limits, and switch to legacy Type-C mode. Its logical HPD pin stays
fixed; the HPD mapping selects the HW source. Other pool encoders remain
non-legacy, including those whose DDI is unallocated. PHY-specific VBT
data follows the selected PHY through encoder->devdata; AUX channel
selection stays tied to the fixed DDI.

DDC adapters for pool encoders must be separate from the ordinary
per-pin adapters:
a pool encoder's original VBT entry may specify no DDC pin, and its
default pin may already be used by a non-pool port. Each pool encoder
keeps the same DDC adapter while only the physical pin driven by that
adapter changes, so its HDMI connector's userspace DDC symlink remains
unchanged. Ordinary adapters retain their fixed physical pins.

If allocation fails after successfully reading and verifying the pool,
keep its encoders available for alt-mode sinks and disable legacy
operation. Earlier initialization failures retain the original port
configuration.

Follow-up patches will add the connector and DDC adapter support,
suspend/resume handling and activation of the pool.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/display/intel_ddi_mgr.c  | 808 ++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_ddi_mgr.h  |  18 +
 .../gpu/drm/i915/display/intel_ddi_mgr_regs.h |  40 +
 .../gpu/drm/i915/display/intel_display_core.h |   3 +
 drivers/gpu/drm/xe/Makefile                   |   1 +
 6 files changed, 871 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr.h
 create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index ba7eecfffdca1..3357d84ca56aa 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -349,6 +349,7 @@ i915-y += \
 	display/intel_cx0_phy.o \
 	display/intel_ddi.o \
 	display/intel_ddi_buf_trans.o \
+	display/intel_ddi_mgr.o \
 	display/intel_dip.o \
 	display/intel_display_device.o \
 	display/intel_display_trace.o \
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
new file mode 100644
index 0000000000000..7dc547a617990
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
@@ -0,0 +1,808 @@
+// SPDX-License-Identifier: MIT
+/* Copyright © 2026 Intel Corporation */
+
+#include <linux/iopoll.h>
+#include <linux/seq_buf.h>
+#include <linux/string.h>
+#include <drm/drm_managed.h>
+#include <drm/drm_print.h>
+
+#include "intel_bios.h"
+#include "intel_ddi_mgr.h"
+#include "intel_ddi_mgr_regs.h"
+#include "intel_de.h"
+#include "intel_display.h"
+#include "intel_display_core.h"
+#include "intel_display_regs.h"
+#include "intel_display_rpm.h"
+#include "intel_display_types.h"
+#include "intel_display_utils.h"
+#include "intel_dp.h"
+#include "intel_gmbus.h"
+#include "intel_hotplug_irq.h"
+#include "intel_tc.h"
+
+#define INTEL_DDI_MGR_NUM_PORTS 4
+
+enum intel_ddi_route_mode {
+	/* DP-alt/TBT-alt, with allocations managed by firmware. */
+	INTEL_DDI_ROUTE_ALT,
+	/* Legacy DP/HDMI, with allocations managed by the driver. */
+	INTEL_DDI_ROUTE_LEGACY,
+};
+
+struct intel_ddi_route {
+	/*
+	 * Physical legacy PHY, or TC_PORT_NONE in ALT mode.
+	 * TODO: Use a PHY enum instead of enum tc_port.
+	 */
+	enum tc_port phy;
+	enum intel_ddi_route_mode mode;
+};
+
+struct intel_ddi_mgr {
+	/* Only route entries with a bit set in pool_ddi_mask are used. */
+	struct intel_ddi_route route[INTEL_DDI_MGR_NUM_PORTS];
+	u8 ddc_pin[INTEL_DDI_MGR_NUM_PORTS];
+	u8 pool_ddi_mask;
+	u8 legacy_phy_mask;
+	u16 ddc_pins;
+	bool has_hdmi;
+	bool enabled;
+};
+
+struct intel_ddi_hw_state {
+	struct intel_ddi_route route[INTEL_DDI_MGR_NUM_PORTS];
+	u32 inherited_resources;
+	u32 current_resources;
+	u8 pool_ddi_mask;
+	u8 busy_ddi_mask;
+	u8 assigned_phy_mask;
+	u8 allocated_ddi_mask;
+};
+
+static enum port ddi_to_port(int ddi)
+{
+	return PORT_TC1 + ddi;
+}
+
+static enum tc_port ddi_to_tc(int ddi)
+{
+	return TC_PORT_1 + ddi;
+}
+
+static enum hpd_pin tc_to_hpd_pin(enum tc_port tc_port)
+{
+	return HPD_PORT_TC1 + tc_port - TC_PORT_1;
+}
+
+/* TODO: Fix the regular HDMI default selection on NVL+ and reuse it here. */
+static u8 default_ddc_pin(struct intel_display *display, enum port port)
+{
+	if (port >= PORT_TC1 && port <= PORT_TC4)
+		return intel_gmbus_tc_port_to_pin(intel_port_to_tc(display, port));
+
+	return intel_port_to_phy(display, port) + 1;
+}
+
+static bool intel_ddi_mgr_is_enabled(const struct intel_ddi_mgr *mgr)
+{
+	return mgr && mgr->enabled;
+}
+
+bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi)
+{
+	return display->ddi_mgr && ddi >= PORT_TC1 && ddi <= PORT_TC4 &&
+		display->ddi_mgr->pool_ddi_mask & BIT(ddi - PORT_TC1);
+}
+
+bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+
+	return mgr && mgr->pool_ddi_mask && mgr->has_hdmi;
+}
+
+static const char *iom_lock_owner(u32 semaphore)
+{
+	switch (semaphore & IOM_REQUESTOR_ID_MASK) {
+	case IOM_REQUESTOR_ID_IOM:
+		return "IOM";
+	case IOM_REQUESTOR_ID_TBT0:
+		return "TBT0";
+	case IOM_REQUESTOR_ID_TBT1:
+		return "TBT1";
+	case IOM_REQUESTOR_ID_DISPLAY_ENGINE:
+		return "Display Engine";
+	default:
+		return "unknown";
+	}
+}
+
+static bool iom_trylock(struct intel_display *display, u32 *semaphore)
+{
+	u32 request = IOM_DP_HW_SEMLOCK | IOM_REQUESTOR_ID_DISPLAY_ENGINE;
+	u32 mask = IOM_DP_HW_SEMLOCK | IOM_REQUESTOR_ID_MASK;
+
+	intel_de_rmw(display, IOM_DP_HW_RESOURCE_SEMAPHORE, mask, request);
+	*semaphore = intel_de_read(display, IOM_DP_HW_RESOURCE_SEMAPHORE);
+
+	return (*semaphore & mask) == request;
+}
+
+static int iom_lock(struct intel_display *display)
+{
+	u32 semaphore;
+	bool acquired;
+	int err;
+
+	assert_display_rpm_held(display);
+
+	intel_de_rmw(display, IOM_HIP_INDEX, IOM_HIP_INDEX_MASK,
+		     IOM_HIP_INDEX_RESOURCE_MGMT);
+
+	err = poll_timeout_us(acquired = iom_trylock(display, &semaphore),
+			      acquired, 10, 100000, false);
+	if (!err)
+		return 0;
+
+	drm_warn(display->drm,
+		 "DDIMGR: IOM DDI lock timeout: owner %s, register %#x\n",
+		 iom_lock_owner(semaphore), semaphore);
+
+	return err;
+}
+
+static void iom_unlock(struct intel_display *display)
+{
+	intel_de_rmw(display, IOM_DP_HW_RESOURCE_SEMAPHORE,
+		     IOM_DP_HW_SEMLOCK | IOM_REQUESTOR_ID_MASK, IOM_REQUESTOR_ID_DISPLAY_ENGINE);
+	intel_de_posting_read(display, IOM_DP_HW_RESOURCE_SEMAPHORE);
+}
+
+static int resource_to_available_ddi_count(struct intel_display *display, u32 semaphore)
+{
+	u32 gray = REG_FIELD_GET(IOM_DDI_AVAILABLE_MASK, semaphore);
+
+	switch (gray) {
+	case 0x0:
+		return 0;
+	case 0x1:
+		return 1;
+	case 0x2:
+		return 3;
+	case 0x3:
+		return 2;
+	case 0x6:
+		return IOM_DDI_REPORTED_MAX_FREE; /* At least four resources are available. */
+	default:
+		drm_WARN(display->drm, 1, "DDIMGR: Invalid DDI availability %#x (semaphore %#x)\n",
+			 gray, semaphore);
+
+		return -EINVAL;
+	}
+}
+
+static u8 resource_to_pool_ddi_mask(u32 resources)
+{
+	u8 pool_ddi_mask = 0;
+	int ddi;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++)
+		if (IOM_DDI_CONSUMER_GET(resources, ddi) != IOM_DDI_CONSUMER_RESERVED)
+			pool_ddi_mask |= BIT(ddi);
+
+	return pool_ddi_mask;
+}
+
+static void verify_ddi_counts(struct intel_display *display, u32 resources)
+{
+	u32 semaphore;
+	int available_ddis, free_ddis = 0;
+	int ddi;
+
+	semaphore = intel_de_read(display, IOM_DP_HW_RESOURCE_SEMAPHORE);
+	available_ddis = resource_to_available_ddi_count(display, semaphore);
+
+	/* The hardware count covers all eight slots, not just our four TC DDIs. */
+	for (ddi = 0; ddi < IOM_DDI_NUM_SLOTS; ddi++)
+		if (IOM_DDI_CONSUMER_GET(resources, ddi) == IOM_DDI_CONSUMER_FREE)
+			free_ddis++;
+
+	drm_WARN(display->drm, free_ddis > INTEL_DDI_MGR_NUM_PORTS,
+		 "DDIMGR: Free DDI count %d exceeds supported count %d\n",
+		 free_ddis, INTEL_DDI_MGR_NUM_PORTS);
+
+	if (available_ddis < 0 || available_ddis == min(free_ddis, IOM_DDI_REPORTED_MAX_FREE))
+		return;
+
+	drm_dbg_kms(display->drm,
+		    "DDIMGR: DDI count mismatch: available %d%s, free %d (semaphore %#x, table 0x%08x)\n",
+		    available_ddis, available_ddis == IOM_DDI_REPORTED_MAX_FREE ? "+" : "",
+		    free_ddis, semaphore, resources);
+}
+
+/* TC PHY consumer (legacy or DP-alt), rather than a TBT DP adapter. */
+static bool consumer_is_dpalt_legacy(u32 consumer)
+{
+	return consumer & IOM_DDI_CONSUMER_DPALT_LEGACY &&
+		REG_FIELD_GET(IOM_DDI_CONSUMER_PHY_MASK, consumer) < INTEL_DDI_MGR_NUM_PORTS;
+}
+
+/* Caller must first check consumer_is_dpalt_legacy(). */
+static enum tc_port consumer_to_phy(u32 consumer)
+{
+	return TC_PORT_1 + REG_FIELD_GET(IOM_DDI_CONSUMER_PHY_MASK, consumer);
+}
+
+static void format_ddi_consumer(struct seq_buf *s, const struct intel_ddi_mgr *mgr,
+				u32 consumer, const char *origin)
+{
+	if (consumer == IOM_DDI_CONSUMER_FREE) {
+		seq_buf_puts(s, "free");
+
+		return;
+	}
+
+	if (consumer == IOM_DDI_CONSUMER_RESERVED) {
+		seq_buf_puts(s, "reserved");
+
+		return;
+	}
+
+	if (consumer_is_dpalt_legacy(consumer)) {
+		enum tc_port phy = consumer_to_phy(consumer);
+		bool legacy = mgr->legacy_phy_mask & BIT(phy);
+
+		if (!legacy)
+			origin = NULL;
+
+		seq_buf_printf(s, "PHY TC#%d (%s%s%s)", phy - TC_PORT_1 + 1,
+			       legacy ? "legacy" : "dp-alt", origin ? ", " : "", origin ?: "");
+
+		return;
+	}
+
+	if (!(consumer & IOM_DDI_CONSUMER_DPALT_LEGACY) &&
+	    REG_FIELD_GET(IOM_DDI_CONSUMER_TBT_DPIN_MASK, consumer)) {
+		seq_buf_printf(s, "TBT%u DPIN%u",
+			       REG_FIELD_GET(IOM_DDI_CONSUMER_TBT_DOMAIN_MASK, consumer),
+			       REG_FIELD_GET(IOM_DDI_CONSUMER_TBT_DPIN_MASK, consumer) - 1);
+
+		return;
+	}
+
+	seq_buf_printf(s, "unknown(0x%x)", consumer);
+}
+
+static void print_ddi_allocations(struct drm_printer *p, const struct intel_ddi_mgr *mgr,
+				  const struct intel_ddi_hw_state *hw_state, int err)
+{
+	bool printed = false;
+	int ddi;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		u32 consumer = IOM_DDI_CONSUMER_GET(hw_state->current_resources, ddi);
+		DECLARE_SEQ_BUF(name, 64);
+		const char *origin = NULL;
+
+		if (consumer == IOM_DDI_CONSUMER_FREE || consumer == IOM_DDI_CONSUMER_RESERVED)
+			continue;
+
+		if (consumer == IOM_DDI_CONSUMER_GET(hw_state->inherited_resources, ddi))
+			origin = "inherited";
+		else if (!err && hw_state->allocated_ddi_mask & BIT(ddi))
+			origin = "allocated";
+
+		format_ddi_consumer(&name, mgr, consumer, origin);
+		drm_printf_indent(p, 1, "DDI TC#%d: %s\n", ddi + 1, seq_buf_str(&name));
+		printed = true;
+	}
+
+	if (!printed)
+		drm_printf_indent(p, 1, "none\n");
+}
+
+static void print_ddi_resources(struct intel_display *display,
+				const struct intel_ddi_hw_state *hw_state, int err)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	struct drm_printer p = drm_dbg_printer(display->drm, DRM_UT_KMS, "DDIMGR:");
+	unsigned long pool_ddi_mask = resource_to_pool_ddi_mask(hw_state->current_resources) << 1;
+	unsigned long unassigned_phy_mask =
+		(mgr->legacy_phy_mask & ~hw_state->assigned_phy_mask) << 1;
+
+	drm_printf(&p, "Resources=0x%08x, Pool DDIs=DDI TC#{%*pbl}\n",
+		   hw_state->current_resources, INTEL_DDI_MGR_NUM_PORTS + 1, &pool_ddi_mask);
+	if (err)
+		drm_printf(&p, "Configuration failed: %d\n", err);
+
+	/* ALT allocations are only a snapshot of firmware assignments. */
+	drm_printf(&p, "Assigned DDIs:\n");
+	print_ddi_allocations(&p, mgr, hw_state, err);
+
+	if (!err && unassigned_phy_mask)
+		drm_printf(&p, "Unassigned legacy PHYs=PHY TC#{%*pbl}\n",
+			   INTEL_DDI_MGR_NUM_PORTS + 1, &unassigned_phy_mask);
+}
+
+static int verify_ddi_pool(struct intel_display *display, u8 pool_ddi_mask)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	int ddi;
+
+	if (mgr->pool_ddi_mask && pool_ddi_mask != mgr->pool_ddi_mask) {
+		drm_dbg_kms(display->drm, "DDIMGR: DDI pool changed: expected %#x, read %#x\n",
+			    mgr->pool_ddi_mask, pool_ddi_mask);
+
+		return -EINVAL;
+	}
+
+	if (mgr->legacy_phy_mask & ~pool_ddi_mask) {
+		drm_err(display->drm,
+			"DDIMGR: Legacy PHYs missing from DDI pool: legacy=0x%02x pool=0x%02x\n",
+			mgr->legacy_phy_mask, pool_ddi_mask);
+
+		return -EINVAL;
+	}
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		const struct intel_bios_encoder_data *vbt;
+		bool alt_mode;
+
+		if (!(pool_ddi_mask & BIT(ddi)))
+			continue;
+
+		vbt = intel_bios_encoder_data_lookup(display, ddi_to_port(ddi));
+		if (!vbt) {
+			drm_err(display->drm, "DDIMGR: Missing VBT data for pool DDI%d\n", ddi);
+
+			return -EINVAL;
+		}
+
+		if (intel_bios_encoder_is_dedicated_external(vbt) ||
+		    intel_bios_encoder_supports_edp(vbt) ||
+		    intel_bios_encoder_supports_dsi(vbt) || intel_bios_encoder_is_lspcon(vbt)) {
+			drm_err(display->drm,
+				"DDIMGR: Unsupported pool DDI%d: dedicated=%d eDP=%d DSI=%d LSPCON=%d\n",
+				ddi, intel_bios_encoder_is_dedicated_external(vbt),
+				intel_bios_encoder_supports_edp(vbt),
+				intel_bios_encoder_supports_dsi(vbt),
+				intel_bios_encoder_is_lspcon(vbt));
+
+			return -EINVAL;
+		}
+
+		alt_mode = intel_bios_encoder_supports_typec_usb(vbt) ||
+			intel_bios_encoder_supports_tbt(vbt);
+		if (alt_mode == !!(mgr->legacy_phy_mask & BIT(ddi))) {
+			drm_err(display->drm,
+				"DDIMGR: Invalid VBT modes for pool DDI%d: alt=%d dyn-legacy=%d\n",
+				ddi, alt_mode, !!(mgr->legacy_phy_mask & BIT(ddi)));
+
+			return -EINVAL;
+		}
+	}
+
+	return 0;
+}
+
+static int verify_ddc_pins(struct intel_display *display, u8 pool_ddi_mask)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	enum port port;
+	int err = 0;
+
+	for (port = PORT_A; port < I915_MAX_PORTS; port++) {
+		const struct intel_bios_encoder_data *vbt;
+		int pin;
+
+		if (port >= PORT_TC1 && port <= PORT_TC4 &&
+		    pool_ddi_mask & BIT(port - PORT_TC1))
+			continue;
+
+		vbt = intel_bios_encoder_data_lookup(display, port);
+		if (!vbt || (!intel_bios_encoder_supports_hdmi(vbt) &&
+			     !intel_bios_encoder_supports_dvi(vbt)))
+			continue;
+
+		pin = intel_bios_hdmi_ddc_pin(vbt);
+		/* Match intel_hdmi_default_ddc_pin() for non-pool encoders. */
+		if (!pin)
+			pin = intel_port_to_phy(display, port) + 1;
+
+		if (pin >= GMBUS_NUM_PINS)
+			continue;
+
+		if (!(mgr->ddc_pins & BIT(pin)))
+			continue;
+
+		drm_err(display->drm, "DDIMGR: DDI pool DDC pin %d also used by port %c\n",
+			pin, port_name(port));
+
+		err = -EINVAL;
+	}
+
+	return err;
+}
+
+/* Record the DDI's mode and legacy PHY in software. */
+static void record_ddi_route(struct intel_ddi_route *route, enum tc_port legacy_phy)
+{
+	route->phy = legacy_phy;
+	route->mode = legacy_phy == TC_PORT_NONE ?
+		INTEL_DDI_ROUTE_ALT : INTEL_DDI_ROUTE_LEGACY;
+}
+
+static void fallback_to_alt(struct intel_ddi_mgr *mgr)
+{
+	int ddi;
+
+	mgr->enabled = false;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		if (!(mgr->pool_ddi_mask & BIT(ddi)))
+			continue;
+
+		record_ddi_route(&mgr->route[ddi], TC_PORT_NONE);
+	}
+}
+
+static int readout_ddi_resource(struct intel_display *display, int ddi,
+				struct intel_ddi_hw_state *hw_state)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	u32 consumer = IOM_DDI_CONSUMER_GET(hw_state->current_resources, ddi);
+	enum tc_port phy;
+
+	if (ddi < INTEL_DDI_MGR_NUM_PORTS)
+		record_ddi_route(&hw_state->route[ddi], TC_PORT_NONE);
+
+	if (hw_state->pool_ddi_mask & BIT(ddi) &&
+	    intel_de_read(display, DDI_BUF_CTL(ddi_to_port(ddi))) & DDI_BUF_CTL_ENABLE)
+		hw_state->busy_ddi_mask |= BIT(ddi);
+
+	if (!consumer_is_dpalt_legacy(consumer))
+		return 0;
+
+	phy = consumer_to_phy(consumer);
+
+	/* The IOM also assigns PHY consumers for DP-alt ports. */
+	if (!(mgr->legacy_phy_mask & BIT(phy)))
+		return 0;
+
+	/* Reject legacy PHY assignments outside the supported DDI range. */
+	if (ddi >= INTEL_DDI_MGR_NUM_PORTS) {
+		drm_err(display->drm,
+			"DDIMGR: Legacy PHY%d assigned to unsupported DDI%d (resources 0x%08x)\n",
+			phy, ddi, hw_state->current_resources);
+
+		return -EOPNOTSUPP;
+	}
+
+	/* Reject duplicate legacy PHY assignments. */
+	if (hw_state->assigned_phy_mask & BIT(phy)) {
+		drm_err(display->drm,
+			"DDIMGR: Duplicate legacy PHY%d assignment at DDI%d (resources 0x%08x)\n",
+			phy, ddi, hw_state->current_resources);
+
+		return -EINVAL;
+	}
+
+	record_ddi_route(&hw_state->route[ddi], phy);
+	hw_state->assigned_phy_mask |= BIT(phy);
+
+	return 0;
+}
+
+static int ddi_mgr_readout_hw_state(struct intel_display *display,
+				    struct intel_ddi_hw_state *hw_state)
+{
+	int ddi, err;
+
+	hw_state->current_resources = intel_de_read(display, IOM_DP_RESOURCE_MNG);
+	hw_state->inherited_resources = hw_state->current_resources;
+	hw_state->pool_ddi_mask = resource_to_pool_ddi_mask(hw_state->current_resources);
+	hw_state->busy_ddi_mask = 0;
+	hw_state->assigned_phy_mask = 0;
+	hw_state->allocated_ddi_mask = 0;
+
+	for (ddi = 0; ddi < IOM_DDI_NUM_SLOTS; ddi++) {
+		err = readout_ddi_resource(display, ddi, hw_state);
+		if (err)
+			return err;
+	}
+
+	return 0;
+}
+
+static int ddi_mgr_verify_hw_state(struct intel_display *display,
+				   const struct intel_ddi_hw_state *hw_state)
+{
+	int err;
+
+	verify_ddi_counts(display, hw_state->current_resources);
+
+	err = verify_ddi_pool(display, hw_state->pool_ddi_mask);
+	if (err)
+		return err;
+
+	return verify_ddc_pins(display, hw_state->pool_ddi_mask);
+}
+
+static void ddi_mgr_store_hw_state(struct intel_ddi_mgr *mgr,
+				   const struct intel_ddi_hw_state *hw_state)
+{
+	memcpy(mgr->route, hw_state->route, sizeof(mgr->route));
+	mgr->pool_ddi_mask = hw_state->pool_ddi_mask;
+}
+
+static int find_free_ddi(u8 ddi_mask, u32 resources)
+{
+	int ddi;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		if (!(ddi_mask & BIT(ddi)))
+			continue;
+
+		if (IOM_DDI_CONSUMER_GET(resources, ddi) != IOM_DDI_CONSUMER_FREE)
+			continue;
+
+		return ddi;
+	}
+
+	return -ENOSPC;
+}
+
+static int legacy_phy_to_ddi(const struct intel_ddi_route *routes, enum tc_port phy)
+{
+	int ddi;
+
+	if (!routes)
+		return -ENOENT;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		if (routes[ddi].mode != INTEL_DDI_ROUTE_LEGACY)
+			continue;
+
+		if (routes[ddi].phy == phy)
+			return ddi;
+	}
+
+	return -ENOENT;
+}
+
+static void allocate_ddi_for_phy(struct intel_ddi_hw_state *hw_state,
+				 u8 ddi_mask, enum tc_port phy)
+{
+	int ddi;
+
+	ddi = find_free_ddi(ddi_mask, hw_state->current_resources);
+	if (ddi < 0)
+		return;
+
+	hw_state->current_resources |= IOM_DDI_CONSUMER(ddi, IOM_DDI_CONSUMER_PHY(phy));
+	hw_state->allocated_ddi_mask |= BIT(ddi);
+	hw_state->assigned_phy_mask |= BIT(phy);
+	record_ddi_route(&hw_state->route[ddi], phy);
+}
+
+enum ddi_alloc_policy {
+	ALLOC_PREVIOUS_DDI,
+	ALLOC_IDENTITY_DDI,
+	ALLOC_ANY_FREE_DDI,
+
+	ALLOC_POLICY_NUM,
+};
+
+static u8 ddi_mask_for_policy(const struct intel_ddi_hw_state *hw_state,
+			      enum ddi_alloc_policy policy,
+			      const struct intel_ddi_route *old_routes, enum tc_port phy)
+{
+	u8 ddi_mask = hw_state->pool_ddi_mask & ~hw_state->busy_ddi_mask;
+	int old_ddi;
+
+	switch (policy) {
+	case ALLOC_PREVIOUS_DDI:
+		old_ddi = legacy_phy_to_ddi(old_routes, phy);
+		if (old_ddi < 0)
+			return 0;
+
+		ddi_mask &= BIT(old_ddi);
+
+		break;
+	case ALLOC_IDENTITY_DDI:
+		ddi_mask &= BIT(phy);
+
+		break;
+	case ALLOC_ANY_FREE_DDI:
+		break;
+	default:
+		MISSING_CASE(policy);
+		return 0;
+	}
+
+	return ddi_mask;
+}
+
+static int allocate_legacy_ddis(struct intel_display *display,
+				struct intel_ddi_hw_state *hw_state,
+				const struct intel_ddi_route *old_routes)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	u32 old_resources = hw_state->current_resources;
+	u32 new_resources;
+	enum ddi_alloc_policy policy;
+	enum tc_port phy;
+	u32 readback;
+
+	/* Prefer previous DDIs, then identity mappings, then any remaining DDI. */
+	for (policy = ALLOC_PREVIOUS_DDI; policy < ALLOC_POLICY_NUM; policy++) {
+		for (phy = TC_PORT_1; phy < INTEL_DDI_MGR_NUM_PORTS; phy++) {
+			u8 ddi_mask;
+
+			if (!(mgr->legacy_phy_mask & BIT(phy)))
+				continue;
+
+			if (hw_state->assigned_phy_mask & BIT(phy))
+				continue;
+
+			ddi_mask = ddi_mask_for_policy(hw_state, policy, old_routes, phy);
+			allocate_ddi_for_phy(hw_state, ddi_mask, phy);
+		}
+	}
+
+	new_resources = hw_state->current_resources;
+	if (new_resources == old_resources)
+		return 0;
+
+	intel_de_write(display, IOM_DP_RESOURCE_MNG, new_resources);
+	readback = intel_de_read(display, IOM_DP_RESOURCE_MNG);
+	hw_state->current_resources = readback;
+	if (readback != new_resources) {
+		drm_err(display->drm, "DDIMGR: DDI write mismatch: requested 0x%08x, read 0x%08x\n",
+			new_resources, readback);
+
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static int configure_ddi_resources(struct intel_display *display,
+				   const struct intel_ddi_route *old_routes)
+{
+	struct intel_ddi_hw_state hw_state;
+	int err;
+
+	err = iom_lock(display);
+	if (err)
+		return err;
+
+	err = ddi_mgr_readout_hw_state(display, &hw_state);
+	if (err)
+		goto out;
+
+	err = ddi_mgr_verify_hw_state(display, &hw_state);
+	if (err)
+		goto out;
+
+	err = allocate_legacy_ddis(display, &hw_state, old_routes);
+
+	ddi_mgr_store_hw_state(display->ddi_mgr, &hw_state);
+
+out:
+	iom_unlock(display);
+
+	print_ddi_resources(display, &hw_state, err);
+
+	return err;
+}
+
+/* Update HPD sources before TC initialization or HPD IRQ enable. */
+static void update_hpd_sources(struct intel_display *display)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	int ddi;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		const struct intel_ddi_route *route = &mgr->route[ddi];
+		enum hpd_pin logical_pin = tc_to_hpd_pin(ddi_to_tc(ddi));
+		enum hpd_pin pch_hw_pin = HPD_NONE;
+		enum hpd_pin hw_pin = HPD_NONE;
+
+		if (!(mgr->pool_ddi_mask & BIT(ddi)))
+			continue;
+
+		if (intel_ddi_mgr_is_enabled(mgr) && route->mode == INTEL_DDI_ROUTE_LEGACY)
+			pch_hw_pin = tc_to_hpd_pin(route->phy);
+		else
+			hw_pin = logical_pin;
+
+		intel_hpd_set_pin_sources(display, logical_pin, hw_pin, pch_hw_pin);
+	}
+}
+
+static int init_ddi_resource(struct intel_display *display, int ddi)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	const struct intel_bios_encoder_data *vbt;
+	int pin;
+
+	record_ddi_route(&mgr->route[ddi], TC_PORT_NONE);
+
+	vbt = intel_bios_encoder_data_lookup(display, ddi_to_port(ddi));
+	if (!vbt || !intel_bios_encoder_supports_dyn_port_over_tc(vbt))
+		return 0;
+
+	mgr->legacy_phy_mask |= BIT(ddi);
+
+	if (!intel_bios_encoder_supports_hdmi(vbt) &&
+	    !intel_bios_encoder_supports_dvi(vbt))
+		return 0;
+
+	mgr->has_hdmi = true;
+	pin = intel_bios_hdmi_ddc_pin(vbt);
+	if (!pin)
+		pin = default_ddc_pin(display, ddi_to_port(ddi));
+
+	if (!intel_gmbus_is_valid_pin(display, pin) || mgr->ddc_pins & BIT(pin)) {
+		drm_err(display->drm, "DDIMGR: Invalid/duplicate legacy DDC pin %d\n", pin);
+
+		return -EINVAL;
+	}
+
+	mgr->ddc_pin[ddi] = pin;
+	mgr->ddc_pins |= BIT(pin);
+
+	return 0;
+}
+
+void intel_ddi_mgr_init(struct intel_display *display)
+{
+	struct intel_ddi_mgr *mgr;
+	int ddi, err;
+
+	if (DISPLAY_VER(display) < 35)
+		return;
+
+	mgr = drmm_kzalloc(display->drm, sizeof(*mgr), GFP_KERNEL);
+	if (!mgr)
+		return;
+
+	display->ddi_mgr = mgr;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		err = init_ddi_resource(display, ddi);
+		if (err)
+			goto err;
+	}
+
+	if (!mgr->legacy_phy_mask)
+		goto out_free;
+
+	err = configure_ddi_resources(display, NULL);
+	if (err)
+		goto err;
+
+	mgr->enabled = true;
+	update_hpd_sources(display);
+
+	return;
+
+err:
+	if (mgr->pool_ddi_mask) {
+		fallback_to_alt(mgr);
+		drm_err(display->drm,
+			"DDIMGR: Cannot initialize DDI pool: %d; using ALT mode\n", err);
+		update_hpd_sources(display);
+
+		return;
+	}
+
+	drm_err(display->drm,
+		"DDIMGR: Cannot initialize DDI pool: %d; using default port configuration\n", err);
+out_free:
+	drmm_kfree(display->drm, mgr);
+	display->ddi_mgr = NULL;
+}
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
new file mode 100644
index 0000000000000..b1793b848c238
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright © 2026 Intel Corporation */
+
+#ifndef __INTEL_DDI_MGR_H__
+#define __INTEL_DDI_MGR_H__
+
+#include <linux/types.h>
+
+enum port;
+
+struct intel_display;
+
+void intel_ddi_mgr_init(struct intel_display *display);
+
+bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
+bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display);
+
+#endif
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h
new file mode 100644
index 0000000000000..2a65c27a1f099
--- /dev/null
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#ifndef __INTEL_DDI_MGR_REGS_H__
+#define __INTEL_DDI_MGR_REGS_H__
+
+#include "intel_display_reg_defs.h"
+
+#define IOM_HIP_INDEX				_MMIO(0x1010a0)
+#define  IOM_HIP_INDEX_MASK			REG_GENMASK(3, 0)
+#define  IOM_HIP_INDEX_RESOURCE_MGMT		REG_FIELD_PREP(IOM_HIP_INDEX_MASK, 1)
+
+#define IOM_DP_HW_RESOURCE_SEMAPHORE		_MMIO(0x168038)
+#define  IOM_DDI_AVAILABLE_MASK			REG_GENMASK(30, 28)
+#define  IOM_DP_HW_SEMLOCK			REG_BIT(31)
+#define  IOM_REQUESTOR_ID_MASK			REG_GENMASK(3, 0)
+#define  IOM_REQUESTOR_ID_IOM			REG_FIELD_PREP(IOM_REQUESTOR_ID_MASK, 0)
+#define  IOM_REQUESTOR_ID_TBT0			REG_FIELD_PREP(IOM_REQUESTOR_ID_MASK, 1)
+#define  IOM_REQUESTOR_ID_TBT1			REG_FIELD_PREP(IOM_REQUESTOR_ID_MASK, 2)
+#define  IOM_REQUESTOR_ID_DISPLAY_ENGINE		REG_FIELD_PREP(IOM_REQUESTOR_ID_MASK, 4)
+
+#define IOM_DDI_REPORTED_MAX_FREE		4
+
+#define IOM_DDI_NUM_SLOTS			8
+
+#define IOM_DP_RESOURCE_MNG			_MMIO(0x16802c)
+#define  IOM_DDI_CONSUMER_MASK(ddi)		(0xfu << ((ddi) * 4))
+#define  IOM_DDI_CONSUMER(ddi, consumer)		((u32)(consumer) << ((ddi) * 4))
+#define  IOM_DDI_CONSUMER_GET(val, ddi)		(((val) >> ((ddi) * 4)) & 0xf)
+#define  IOM_DDI_CONSUMER_FREE			0x0
+#define  IOM_DDI_CONSUMER_TBT_DOMAIN_MASK	REG_BIT(2)
+#define  IOM_DDI_CONSUMER_TBT_DPIN_MASK	REG_GENMASK(1, 0)
+#define  IOM_DDI_CONSUMER_DPALT_LEGACY	REG_BIT(3)
+#define  IOM_DDI_CONSUMER_PHY_MASK		REG_GENMASK(2, 0)
+#define  IOM_DDI_CONSUMER_PHY(phy)		(IOM_DDI_CONSUMER_DPALT_LEGACY | (phy))
+#define  IOM_DDI_CONSUMER_RESERVED		0xf
+
+#endif /* __INTEL_DDI_MGR_REGS_H__ */
diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index 72183bfee07a3..ec02f61a13706 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -41,6 +41,7 @@ struct intel_cdclk_vals;
 struct intel_color_funcs;
 struct intel_crtc;
 struct intel_crtc_state;
+struct intel_ddi_mgr;
 struct intel_display_parent_interface;
 struct intel_dmc;
 struct intel_dpll_global_funcs;
@@ -312,6 +313,8 @@ struct intel_display {
 	/* drm device backpointer */
 	struct drm_device *drm;
 
+	struct intel_ddi_mgr *ddi_mgr;
+
 	/* Platform (and subplatform, if any) identification */
 	struct intel_display_platforms platform;
 
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index 52f0d5dd54680..ea8ab7cb16204 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -263,6 +263,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
 	i915-display/intel_dbuf_bw.o \
 	i915-display/intel_ddi.o \
 	i915-display/intel_ddi_buf_trans.o \
+	i915-display/intel_ddi_mgr.o \
 	i915-display/intel_de.o \
 	i915-display/intel_dip.o \
 	i915-display/intel_display.o \
-- 
2.49.1


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

* [PATCH 07/13] drm/i915/gmbus: Extract adapter creation and destruction
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (5 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 06/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:07 ` [PATCH 08/13] drm/i915/gmbus: Add stable DDC adapters for the DDI pool Imre Deak
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Move allocation, initialization and registration of an adapter into a
helper, and share its teardown.

This allows additional adapters to use the same setup and cleanup paths.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_gmbus.c | 113 +++++++++++----------
 1 file changed, 62 insertions(+), 51 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index e80822d3e9185..8736b39e1ea62 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -28,6 +28,7 @@
  */
 
 #include <linux/debugfs.h>
+#include <linux/err.h>
 #include <linux/export.h>
 #include <linux/i2c-algo-bit.h>
 #include <linux/i2c.h>
@@ -1013,13 +1014,69 @@ static const struct i2c_lock_operations gmbus_lock_ops = {
 	.unlock_bus =  gmbus_unlock_bus,
 };
 
+static struct intel_gmbus *
+intel_gmbus_create(struct intel_display *display, unsigned int pin)
+{
+	struct pci_dev *pdev = to_pci_dev(display->drm->dev);
+	const struct gmbus_pin *gmbus_pin = get_gmbus_pin(display, pin);
+	struct intel_gmbus *bus;
+	int ret;
+
+	if (!gmbus_pin)
+		return NULL;
+
+	bus = kzalloc_obj(*bus);
+	if (!bus)
+		return ERR_PTR(-ENOMEM);
+
+	bus->adapter.owner = THIS_MODULE;
+	snprintf(bus->adapter.name, sizeof(bus->adapter.name),
+		 "i915 gmbus %s", gmbus_pin->name);
+	bus->adapter.dev.parent = &pdev->dev;
+	bus->display = display;
+	bus->adapter.algo = &gmbus_algorithm;
+	bus->adapter.lock_ops = &gmbus_lock_ops;
+
+	/*
+	 * We wish to retry with bit banging
+	 * after a timed out GMBUS attempt.
+	 */
+	bus->adapter.retries = 1;
+
+	/* By default use a conservative clock rate */
+	bus->reg0 = pin | GMBUS_RATE_100KHZ;
+
+	/* gmbus seems to be broken on i830 */
+	if (display->platform.i830)
+		bus->force_bit = 1;
+
+	intel_gpio_setup(bus, GPIO(display, gmbus_pin->gpio));
+
+	ret = i2c_add_adapter(&bus->adapter);
+	if (ret) {
+		kfree(bus);
+
+		return ERR_PTR(ret);
+	}
+
+	return bus;
+}
+
+static void intel_gmbus_destroy(struct intel_gmbus *bus)
+{
+	if (!bus)
+		return;
+
+	i2c_del_adapter(&bus->adapter);
+	kfree(bus);
+}
+
 /**
  * intel_gmbus_setup - instantiate all Intel i2c GMBuses
  * @display: display device
  */
 int intel_gmbus_setup(struct intel_display *display)
 {
-	struct pci_dev *pdev = to_pci_dev(display->drm->dev);
 	unsigned int pin;
 	int ret;
 
@@ -1036,48 +1093,10 @@ int intel_gmbus_setup(struct intel_display *display)
 	init_waitqueue_head(&display->gmbus.wait_queue);
 
 	for (pin = 0; pin < ARRAY_SIZE(display->gmbus.bus); pin++) {
-		const struct gmbus_pin *gmbus_pin;
-		struct intel_gmbus *bus;
+		struct intel_gmbus *bus = intel_gmbus_create(display, pin);
 
-		gmbus_pin = get_gmbus_pin(display, pin);
-		if (!gmbus_pin)
-			continue;
-
-		bus = kzalloc_obj(*bus);
-		if (!bus) {
-			ret = -ENOMEM;
-			goto err;
-		}
-
-		bus->adapter.owner = THIS_MODULE;
-		snprintf(bus->adapter.name,
-			 sizeof(bus->adapter.name),
-			 "i915 gmbus %s", gmbus_pin->name);
-
-		bus->adapter.dev.parent = &pdev->dev;
-		bus->display = display;
-
-		bus->adapter.algo = &gmbus_algorithm;
-		bus->adapter.lock_ops = &gmbus_lock_ops;
-
-		/*
-		 * We wish to retry with bit banging
-		 * after a timed out GMBUS attempt.
-		 */
-		bus->adapter.retries = 1;
-
-		/* By default use a conservative clock rate */
-		bus->reg0 = pin | GMBUS_RATE_100KHZ;
-
-		/* gmbus seems to be broken on i830 */
-		if (display->platform.i830)
-			bus->force_bit = 1;
-
-		intel_gpio_setup(bus, GPIO(display, gmbus_pin->gpio));
-
-		ret = i2c_add_adapter(&bus->adapter);
-		if (ret) {
-			kfree(bus);
+		if (IS_ERR(bus)) {
+			ret = PTR_ERR(bus);
 			goto err;
 		}
 
@@ -1132,15 +1151,7 @@ void intel_gmbus_teardown(struct intel_display *display)
 	unsigned int pin;
 
 	for (pin = 0; pin < ARRAY_SIZE(display->gmbus.bus); pin++) {
-		struct intel_gmbus *bus;
-
-		bus = display->gmbus.bus[pin];
-		if (!bus)
-			continue;
-
-		i2c_del_adapter(&bus->adapter);
-
-		kfree(bus);
+		intel_gmbus_destroy(display->gmbus.bus[pin]);
 		display->gmbus.bus[pin] = NULL;
 	}
 }
-- 
2.49.1


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

* [PATCH 08/13] drm/i915/gmbus: Add stable DDC adapters for the DDI pool
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (6 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 07/13] drm/i915/gmbus: Extract adapter creation and destruction Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:07 ` [PATCH 09/13] drm/i915/ddi_mgr: Register encoders with dynamic DDI support Imre Deak
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Pool encoders use the DDIs shared by dynamic legacy and DP-alt/TBT-alt
ports; non-pool encoders do not participate in that allocation scheme.
Pool HDMI connectors need stable adapters even when their original VBT
entries provide no DDC pin. Add separate adapters indexed by DDI instead
of reusing the ordinary pin-indexed adapters. This lets a non-pool
connector use a pool DDI's default pin without competing for the same
adapter slot.

Keep ordinary adapters fixed to their physical pins and usable. All
adapters share the GMBUS mutex, including GPIO fallback and direct HDCP
AKSV transfers, so access through aliases is serialized.

Register the additional adapters with fixed DDI names. Start them
disabled and enable an adapter only when its DDI is assigned to a legacy
PHY with HDMI/DVI support and a valid DDC pin.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi_mgr.c  |  17 +++
 drivers/gpu/drm/i915/display/intel_ddi_mgr.h  |   1 +
 .../gpu/drm/i915/display/intel_display_core.h |   1 +
 drivers/gpu/drm/i915/display/intel_gmbus.c    | 108 +++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_gmbus.h    |   4 +
 drivers/gpu/drm/i915/display/intel_hdmi.c     |  17 ++-
 6 files changed, 139 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
index 7dc547a617990..a4a4673dda585 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
@@ -103,6 +103,23 @@ bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display)
 	return mgr && mgr->pool_ddi_mask && mgr->has_hdmi;
 }
 
+/* Zero means that this DDI has no valid legacy DDC route. */
+u8 intel_ddi_mgr_ddc_pin_for_ddi(struct intel_display *display, enum port ddi)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	const struct intel_ddi_route *route;
+
+	if (!intel_ddi_mgr_is_enabled(mgr) ||
+	    !intel_ddi_mgr_is_pool_ddi(display, ddi))
+		return 0;
+
+	route = &mgr->route[ddi - PORT_TC1];
+	if (route->mode != INTEL_DDI_ROUTE_LEGACY)
+		return 0;
+
+	return mgr->ddc_pin[route->phy];
+}
+
 static const char *iom_lock_owner(u32 semaphore)
 {
 	switch (semaphore & IOM_REQUESTOR_ID_MASK) {
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
index b1793b848c238..0f84c7286dab6 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
@@ -14,5 +14,6 @@ void intel_ddi_mgr_init(struct intel_display *display);
 
 bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
 bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display);
+u8 intel_ddi_mgr_ddc_pin_for_ddi(struct intel_display *display, enum port ddi);
 
 #endif
diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index ec02f61a13706..eb383abeabb4e 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -452,6 +452,7 @@ struct intel_display {
 		struct mutex mutex;
 
 		struct intel_gmbus *bus[GMBUS_NUM_PINS];
+		struct intel_gmbus *ddi_bus[I915_MAX_PORTS];
 
 		wait_queue_head_t wait_queue;
 	} gmbus;
diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c b/drivers/gpu/drm/i915/display/intel_gmbus.c
index 8736b39e1ea62..4b395976fc8e9 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -37,6 +37,7 @@
 #include <drm/drm_print.h>
 #include <drm/display/drm_hdcp_helper.h>
 
+#include "intel_ddi_mgr.h"
 #include "intel_de.h"
 #include "intel_display_regs.h"
 #include "intel_display_types.h"
@@ -52,6 +53,7 @@ struct intel_gmbus {
 	bool debugfs_force_bit;
 	u32 reg0;
 	intel_reg_t gpio_reg;
+	bool disabled;
 	struct i2c_algo_bit_data bit_algo;
 	struct intel_display *display;
 };
@@ -697,6 +699,9 @@ do_gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num,
 	int i = 0, inc, try = 0;
 	int ret = 0;
 
+	if (bus->disabled)
+		return -ENXIO;
+
 	/* Display WA #0868: skl,bxt,kbl,cfl,glk */
 	if (display->platform.geminilake || display->platform.broxton)
 		bxt_gmbus_clock_gating(display, false);
@@ -827,6 +832,9 @@ gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
 	struct ref_tracker *wakeref;
 	int ret;
 
+	if (bus->disabled)
+		return -ENXIO;
+
 	wakeref = intel_display_power_get(display, POWER_DOMAIN_GMBUS);
 
 	if (bus->force_bit) {
@@ -1015,14 +1023,14 @@ static const struct i2c_lock_operations gmbus_lock_ops = {
 };
 
 static struct intel_gmbus *
-intel_gmbus_create(struct intel_display *display, unsigned int pin)
+intel_gmbus_create(struct intel_display *display, unsigned int pin, enum port ddi)
 {
 	struct pci_dev *pdev = to_pci_dev(display->drm->dev);
 	const struct gmbus_pin *gmbus_pin = get_gmbus_pin(display, pin);
 	struct intel_gmbus *bus;
 	int ret;
 
-	if (!gmbus_pin)
+	if (ddi == PORT_NONE && !gmbus_pin)
 		return NULL;
 
 	bus = kzalloc_obj(*bus);
@@ -1030,8 +1038,14 @@ intel_gmbus_create(struct intel_display *display, unsigned int pin)
 		return ERR_PTR(-ENOMEM);
 
 	bus->adapter.owner = THIS_MODULE;
-	snprintf(bus->adapter.name, sizeof(bus->adapter.name),
-		 "i915 gmbus %s", gmbus_pin->name);
+	if (ddi == PORT_NONE)
+		snprintf(bus->adapter.name, sizeof(bus->adapter.name),
+			 "i915 gmbus %s", gmbus_pin->name);
+	else
+		snprintf(bus->adapter.name, sizeof(bus->adapter.name),
+			 "i915 gmbus DDI TC%d", ddi - PORT_TC1 + 1);
+
+	bus->disabled = ddi != PORT_NONE;
 	bus->adapter.dev.parent = &pdev->dev;
 	bus->display = display;
 	bus->adapter.algo = &gmbus_algorithm;
@@ -1050,7 +1064,7 @@ intel_gmbus_create(struct intel_display *display, unsigned int pin)
 	if (display->platform.i830)
 		bus->force_bit = 1;
 
-	intel_gpio_setup(bus, GPIO(display, gmbus_pin->gpio));
+	intel_gpio_setup(bus, gmbus_pin ? GPIO(display, gmbus_pin->gpio) : INTEL_REG_INVALID);
 
 	ret = i2c_add_adapter(&bus->adapter);
 	if (ret) {
@@ -1071,6 +1085,80 @@ static void intel_gmbus_destroy(struct intel_gmbus *bus)
 	kfree(bus);
 }
 
+/* Keep each pool connector's adapter fixed while changing its physical pins. */
+void intel_gmbus_ddi_pool_update(struct intel_display *display, bool enable)
+{
+	enum port ddi;
+
+	mutex_lock(&display->gmbus.mutex);
+
+	for (ddi = PORT_A; ddi < I915_MAX_PORTS; ddi++) {
+		struct intel_gmbus *bus = display->gmbus.ddi_bus[ddi];
+		const struct gmbus_pin *gmbus_pin;
+		u8 pin;
+
+		if (!bus)
+			continue;
+
+		bus->disabled = true;
+
+		if (!enable)
+			continue;
+
+		pin = intel_ddi_mgr_ddc_pin_for_ddi(display, ddi);
+		gmbus_pin = get_gmbus_pin(display, pin);
+		if (!gmbus_pin)
+			continue;
+
+		/* Retry hardware only when switching to different DDC pins. */
+		if (bus->reg0 != (pin | GMBUS_RATE_100KHZ))
+			bus->force_bit &= ~GMBUS_FORCE_BIT_RETRY;
+
+		bus->reg0 = pin | GMBUS_RATE_100KHZ;
+		bus->gpio_reg = GPIO(display, gmbus_pin->gpio);
+
+		bus->disabled = false;
+	}
+
+	mutex_unlock(&display->gmbus.mutex);
+}
+
+struct i2c_adapter *
+intel_gmbus_get_ddi_adapter(struct intel_display *display, enum port ddi)
+{
+	struct intel_gmbus *bus;
+
+	if (!intel_ddi_mgr_is_pool_ddi(display, ddi))
+		return NULL;
+
+	bus = display->gmbus.ddi_bus[ddi];
+
+	return bus ? &bus->adapter : NULL;
+}
+
+static void intel_gmbus_ddi_pool_setup(struct intel_display *display)
+{
+	enum port ddi;
+
+	if (!intel_ddi_mgr_pool_supports_hdmi(display))
+		return;
+
+	for (ddi = PORT_A; ddi < I915_MAX_PORTS; ddi++) {
+		struct intel_gmbus *bus;
+
+		if (!intel_ddi_mgr_is_pool_ddi(display, ddi))
+			continue;
+
+		bus = intel_gmbus_create(display, 0, ddi);
+		if (IS_ERR(bus))
+			continue;
+
+		display->gmbus.ddi_bus[ddi] = bus;
+	}
+
+	intel_gmbus_ddi_pool_update(display, true);
+}
+
 /**
  * intel_gmbus_setup - instantiate all Intel i2c GMBuses
  * @display: display device
@@ -1093,7 +1181,7 @@ int intel_gmbus_setup(struct intel_display *display)
 	init_waitqueue_head(&display->gmbus.wait_queue);
 
 	for (pin = 0; pin < ARRAY_SIZE(display->gmbus.bus); pin++) {
-		struct intel_gmbus *bus = intel_gmbus_create(display, pin);
+		struct intel_gmbus *bus = intel_gmbus_create(display, pin, PORT_NONE);
 
 		if (IS_ERR(bus)) {
 			ret = PTR_ERR(bus);
@@ -1103,6 +1191,8 @@ int intel_gmbus_setup(struct intel_display *display)
 		display->gmbus.bus[pin] = bus;
 	}
 
+	intel_gmbus_ddi_pool_setup(display);
+
 	intel_gmbus_reset(display);
 
 	return 0;
@@ -1149,6 +1239,12 @@ bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter)
 void intel_gmbus_teardown(struct intel_display *display)
 {
 	unsigned int pin;
+	enum port ddi;
+
+	for (ddi = PORT_A; ddi < I915_MAX_PORTS; ddi++) {
+		intel_gmbus_destroy(display->gmbus.ddi_bus[ddi]);
+		display->gmbus.ddi_bus[ddi] = NULL;
+	}
 
 	for (pin = 0; pin < ARRAY_SIZE(display->gmbus.bus); pin++) {
 		intel_gmbus_destroy(display->gmbus.bus[pin]);
diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.h b/drivers/gpu/drm/i915/display/intel_gmbus.h
index 6f05456388329..3c8abc06f1e01 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.h
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.h
@@ -9,6 +9,7 @@
 #include <linux/types.h>
 
 struct i2c_adapter;
+enum port;
 enum tc_port;
 struct intel_connector;
 struct intel_display;
@@ -44,6 +45,9 @@ int intel_gmbus_output_aksv(struct i2c_adapter *adapter);
 
 struct i2c_adapter *
 intel_gmbus_get_adapter(struct intel_display *display, unsigned int pin);
+struct i2c_adapter *
+intel_gmbus_get_ddi_adapter(struct intel_display *display, enum port ddi);
+void intel_gmbus_ddi_pool_update(struct intel_display *display, bool enable);
 void intel_gmbus_connector_debugfs_add(struct intel_connector *connector);
 void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit);
 bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter);
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 7be5eadcadf03..2622d754d8605 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -50,6 +50,7 @@
 #include "intel_connector.h"
 #include "intel_cx0_phy.h"
 #include "intel_ddi.h"
+#include "intel_ddi_mgr.h"
 #include "intel_de.h"
 #include "intel_display_driver.h"
 #include "intel_display_regs.h"
@@ -3133,6 +3134,7 @@ bool intel_hdmi_init_connector(struct intel_digital_port *dig_port,
 	struct drm_device *dev = intel_encoder->base.dev;
 	enum port port = intel_encoder->port;
 	struct cec_connector_info conn_info;
+	struct i2c_adapter *ddc;
 	u8 ddc_pin;
 
 	drm_dbg_kms(display->drm,
@@ -3148,14 +3150,23 @@ bool intel_hdmi_init_connector(struct intel_digital_port *dig_port,
 		     intel_encoder->base.name))
 		return false;
 
-	ddc_pin = intel_hdmi_ddc_pin(intel_encoder);
-	if (!ddc_pin)
+	if (intel_ddi_mgr_is_pool_ddi(display, port)) {
+		ddc = intel_gmbus_get_ddi_adapter(display, port);
+	} else {
+		ddc_pin = intel_hdmi_ddc_pin(intel_encoder);
+		if (!ddc_pin)
+			return false;
+
+		ddc = intel_gmbus_get_adapter(display, ddc_pin);
+	}
+
+	if (!ddc)
 		return false;
 
 	drm_connector_init_with_ddc(dev, connector,
 				    &intel_hdmi_connector_funcs,
 				    DRM_MODE_CONNECTOR_HDMIA,
-				    intel_gmbus_get_adapter(display, ddc_pin));
+				    ddc);
 
 	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
 
-- 
2.49.1


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

* [PATCH 09/13] drm/i915/ddi_mgr: Register encoders with dynamic DDI support
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (7 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 08/13] drm/i915/gmbus: Add stable DDC adapters for the DDI pool Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:26   ` sashiko-bot
  2026-11-26 10:07 ` [PATCH 10/13] drm/i915/ddi_mgr: Keep AUX access consistent with DDI pool routes Imre Deak
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Register encoders for the DDI pool shared by dynamic legacy and
DP-alt/TBT-alt ports. Each pool encoder keeps a fixed DDI but may serve
a different legacy PHY or an alt-mode sink, depending on the allocation.

Register a DP connector for every pool encoder, even when its original
VBT entry describes an HDMI-only legacy port, since it may instead serve
a DP-alt/TBT-alt sink. If any dynamic legacy port supports HDMI/DVI,
register an HDMI connector for every pool encoder too: an encoder
originally described as an alt-mode port may be selected to drive that
legacy PHY.

VBT attributes such as the maximum link rate must follow the legacy PHY,
regardless of which encoder serves it. Let the DDI manager select
encoder->devdata from the assigned PHY's VBT entry and determine the
Type-C port's legacy mode from the current allocation. Pool encoders
without a legacy assignment remain non-legacy.

Legacy lane reversal is described both by VBT and by DDI_BUF_CTL for the
allocated DDI. Derive each pool encoder's lane reversal from the
selected PHY's VBT entry and the allocated DDI's register state,
clearing it for non-legacy encoders.

Reject modesets for a connector when the current allocation cannot
support it, while allowing the connector to be detached.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_atomic.c  |  4 ++
 drivers/gpu/drm/i915/display/intel_ddi.c     | 18 ++++-
 drivers/gpu/drm/i915/display/intel_ddi_mgr.c | 71 ++++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_ddi_mgr.h |  8 +++
 4 files changed, 98 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
index b042c3cc78e11..d5968ca39fc60 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic.c
@@ -37,6 +37,7 @@
 
 #include "intel_atomic.h"
 #include "intel_cdclk.h"
+#include "intel_ddi_mgr.h"
 #include "intel_display_core.h"
 #include "intel_display_types.h"
 #include "intel_dp_tunnel.h"
@@ -129,6 +130,9 @@ int intel_digital_connector_atomic_check(struct drm_connector *conn,
 	if (!new_state->crtc)
 		return 0;
 
+	if (!intel_ddi_mgr_connector_available(to_intel_connector(conn)))
+		return -ENODEV;
+
 	crtc_state = drm_atomic_get_new_crtc_state(state, new_state->crtc);
 
 	/*
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index e21c237b39f4f..c3f486b81e0c3 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -48,6 +48,7 @@
 #include "intel_cx0_phy_regs.h"
 #include "intel_ddi.h"
 #include "intel_ddi_buf_trans.h"
+#include "intel_ddi_mgr.h"
 #include "intel_de.h"
 #include "intel_dip.h"
 #include "intel_display_power.h"
@@ -5298,6 +5299,12 @@ void intel_ddi_init(struct intel_display *display,
 		intel_bios_encoder_supports_hdmi(devdata);
 	init_dp = intel_bios_encoder_supports_dp(devdata);
 
+	if (intel_ddi_mgr_is_pool_ddi(display, port)) {
+		init_dp = true;
+		init_hdmi = intel_ddi_mgr_pool_supports_hdmi(display);
+		devdata = intel_ddi_mgr_get_devdata_for_ddi(display, port);
+	}
+
 	if (intel_bios_encoder_is_lspcon(devdata)) {
 		/*
 		 * Lspcon device needs to be driven with DP connector
@@ -5480,8 +5487,11 @@ void intel_ddi_init(struct intel_display *display,
 
 	ddi_buf_ctl = intel_de_read(display, DDI_BUF_CTL(port));
 
-	dig_port->lane_reversal = intel_bios_encoder_lane_reversal(devdata) ||
-		ddi_buf_ctl & DDI_BUF_PORT_REVERSAL;
+	if (intel_ddi_mgr_is_pool_ddi(display, port))
+		dig_port->lane_reversal = intel_ddi_mgr_encoder_has_lane_reversal(encoder);
+	else
+		dig_port->lane_reversal = intel_bios_encoder_lane_reversal(devdata) ||
+			ddi_buf_ctl & DDI_BUF_PORT_REVERSAL;
 
 	dig_port->ddi_a_4_lanes = DISPLAY_VER(display) < 11 && ddi_buf_ctl & DDI_A_4_LANES;
 
@@ -5509,7 +5519,9 @@ void intel_ddi_init(struct intel_display *display,
 			!intel_bios_encoder_supports_typec_usb(devdata) &&
 			!intel_bios_encoder_supports_tbt(devdata);
 
-		if (!is_legacy && init_hdmi) {
+		if (intel_ddi_mgr_is_pool_ddi(display, port)) {
+			is_legacy = intel_ddi_mgr_is_legacy_pool_encoder(encoder);
+		} else if (!is_legacy && init_hdmi) {
 			is_legacy = !init_dp;
 
 			drm_dbg_kms(display->drm,
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
index a4a4673dda585..58e48a61b8160 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
@@ -71,6 +71,11 @@ static enum tc_port ddi_to_tc(int ddi)
 	return TC_PORT_1 + ddi;
 }
 
+static enum port tc_to_port(enum tc_port tc_port)
+{
+	return PORT_TC1 + tc_port - TC_PORT_1;
+}
+
 static enum hpd_pin tc_to_hpd_pin(enum tc_port tc_port)
 {
 	return HPD_PORT_TC1 + tc_port - TC_PORT_1;
@@ -120,6 +125,72 @@ u8 intel_ddi_mgr_ddc_pin_for_ddi(struct intel_display *display, enum port ddi)
 	return mgr->ddc_pin[route->phy];
 }
 
+bool intel_ddi_mgr_is_legacy_pool_encoder(struct intel_encoder *encoder)
+{
+	struct intel_display *display = to_intel_display(encoder);
+
+	return intel_ddi_mgr_is_enabled(display->ddi_mgr) &&
+		intel_ddi_mgr_is_pool_ddi(display, encoder->port) &&
+		display->ddi_mgr->route[encoder->port - PORT_TC1].mode == INTEL_DDI_ROUTE_LEGACY;
+}
+
+bool intel_ddi_mgr_encoder_has_lane_reversal(struct intel_encoder *encoder)
+{
+	struct intel_display *display = to_intel_display(encoder);
+
+	if (!intel_ddi_mgr_is_legacy_pool_encoder(encoder))
+		return false;
+
+	return intel_bios_encoder_lane_reversal(encoder->devdata) ||
+		intel_de_read(display, DDI_BUF_CTL(encoder->port)) & DDI_BUF_PORT_REVERSAL;
+}
+
+const struct intel_bios_encoder_data *
+intel_ddi_mgr_get_devdata_for_ddi(struct intel_display *display, enum port ddi)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	enum port port = ddi;
+
+	if (intel_ddi_mgr_is_enabled(mgr) && intel_ddi_mgr_is_pool_ddi(display, ddi)) {
+		const struct intel_ddi_route *route = &mgr->route[ddi - PORT_TC1];
+
+		if (route->mode == INTEL_DDI_ROUTE_LEGACY)
+			port = tc_to_port(route->phy);
+	}
+
+	return intel_bios_encoder_data_lookup(display, port);
+}
+
+static struct intel_digital_port *connector_dig_port(struct intel_connector *connector)
+{
+	if (intel_attached_encoder(connector))
+		return intel_attached_dig_port(connector);
+
+	if (connector->mst.dp)
+		return dp_to_dig_port(connector->mst.dp);
+
+	return NULL;
+}
+
+bool intel_ddi_mgr_connector_available(struct intel_connector *connector)
+{
+	struct intel_digital_port *dig_port = connector_dig_port(connector);
+	struct intel_display *display = to_intel_display(connector);
+	struct intel_encoder *encoder;
+
+	if (!dig_port || !intel_ddi_mgr_is_pool_ddi(display, dig_port->base.port))
+		return true;
+
+	encoder = &dig_port->base;
+	if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA)
+		return intel_ddi_mgr_is_legacy_pool_encoder(encoder) &&
+			(intel_bios_encoder_supports_hdmi(encoder->devdata) ||
+			 intel_bios_encoder_supports_dvi(encoder->devdata));
+
+	return !intel_ddi_mgr_is_legacy_pool_encoder(encoder) ||
+		intel_bios_encoder_supports_dp(encoder->devdata);
+}
+
 static const char *iom_lock_owner(u32 semaphore)
 {
 	switch (semaphore & IOM_REQUESTOR_ID_MASK) {
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
index 0f84c7286dab6..887075e019770 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
@@ -8,12 +8,20 @@
 
 enum port;
 
+struct intel_bios_encoder_data;
+struct intel_connector;
 struct intel_display;
+struct intel_encoder;
 
 void intel_ddi_mgr_init(struct intel_display *display);
 
 bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
 bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display);
+bool intel_ddi_mgr_is_legacy_pool_encoder(struct intel_encoder *encoder);
+bool intel_ddi_mgr_encoder_has_lane_reversal(struct intel_encoder *encoder);
+bool intel_ddi_mgr_connector_available(struct intel_connector *connector);
 u8 intel_ddi_mgr_ddc_pin_for_ddi(struct intel_display *display, enum port ddi);
+const struct intel_bios_encoder_data *
+intel_ddi_mgr_get_devdata_for_ddi(struct intel_display *display, enum port ddi);
 
 #endif
-- 
2.49.1


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

* [PATCH 10/13] drm/i915/ddi_mgr: Keep AUX access consistent with DDI pool routes
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (8 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 09/13] drm/i915/ddi_mgr: Register encoders with dynamic DDI support Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:07 ` [PATCH 11/13] drm/i915/ddi_mgr: Verify and restore DDI allocations after runtime resume Imre Deak
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Select the AUX channel from the VBT entry for the encoder's fixed DDI.
The other VBT parameters follow the physical port through
encoder->devdata. Preserve the DDI's VBT AUX assignment and the existing
platform-default fallback when no channel is specified.

Reject AUX transfers when an encoder's DDI serves a legacy PHY whose
VBT entry has no DP support, such as an HDMI-only port. The DP connector
registered for possible alt-mode use must not issue AUX transfers to
that legacy port.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi_mgr.c | 11 +++++++++++
 drivers/gpu/drm/i915/display/intel_ddi_mgr.h |  1 +
 drivers/gpu/drm/i915/display/intel_dp_aux.c  | 15 ++++++++++++++-
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
index 58e48a61b8160..236146a37fc34 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
@@ -161,6 +161,17 @@ intel_ddi_mgr_get_devdata_for_ddi(struct intel_display *display, enum port ddi)
 	return intel_bios_encoder_data_lookup(display, port);
 }
 
+bool intel_ddi_mgr_aux_available(struct intel_encoder *encoder)
+{
+	struct intel_display *display = to_intel_display(encoder);
+
+	if (!intel_ddi_mgr_is_pool_ddi(display, encoder->port))
+		return true;
+
+	return !intel_ddi_mgr_is_legacy_pool_encoder(encoder) ||
+		intel_bios_encoder_supports_dp(encoder->devdata);
+}
+
 static struct intel_digital_port *connector_dig_port(struct intel_connector *connector)
 {
 	if (intel_attached_encoder(connector))
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
index 887075e019770..db10d0e8b3a97 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
@@ -19,6 +19,7 @@ bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
 bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display);
 bool intel_ddi_mgr_is_legacy_pool_encoder(struct intel_encoder *encoder);
 bool intel_ddi_mgr_encoder_has_lane_reversal(struct intel_encoder *encoder);
+bool intel_ddi_mgr_aux_available(struct intel_encoder *encoder);
 bool intel_ddi_mgr_connector_available(struct intel_connector *connector);
 u8 intel_ddi_mgr_ddc_pin_for_ddi(struct intel_display *display, enum port ddi);
 const struct intel_bios_encoder_data *
diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/drm/i915/display/intel_dp_aux.c
index 71bcb26240ffa..7d7bbf063be3a 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c
@@ -5,6 +5,7 @@
 
 #include <drm/drm_print.h>
 
+#include "intel_ddi_mgr.h"
 #include "intel_de.h"
 #include "intel_display_jiffies.h"
 #include "intel_display_types.h"
@@ -549,6 +550,9 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 	u32 flags = intel_dp_aux_xfer_flags(msg);
 	int ret;
 
+	if (!intel_ddi_mgr_aux_available(&dp_to_dig_port(intel_dp)->base))
+		return -ENXIO;
+
 	intel_dp_aux_header(txbuf, msg);
 
 	switch (msg->request & ~DP_AUX_I2C_MOT) {
@@ -933,12 +937,21 @@ get_encoder_by_aux_ch(struct intel_encoder *encoder,
 enum aux_ch intel_dp_aux_ch(struct intel_encoder *encoder)
 {
 	struct intel_display *display = to_intel_display(encoder);
+	const struct intel_bios_encoder_data *devdata = encoder->devdata;
 	struct intel_encoder *other;
 	const char *source;
 	enum aux_ch aux_ch;
 	char buf[AUX_CH_NAME_BUFSIZE];
 
-	aux_ch = intel_bios_dp_aux_ch(encoder->devdata);
+	/*
+	 * VBT parameters come from the PHY-specific encoder->devdata, except
+	 * for the AUX channel, which is tied to the fixed DDI. Use the VBT
+	 * entry for encoder->port to select the AUX channel.
+	 */
+	if (intel_ddi_mgr_is_pool_ddi(display, encoder->port))
+		devdata = intel_bios_encoder_data_lookup(display, encoder->port);
+
+	aux_ch = intel_bios_dp_aux_ch(devdata);
 	source = "VBT";
 
 	if (aux_ch == AUX_CH_NONE) {
-- 
2.49.1


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

* [PATCH 11/13] drm/i915/ddi_mgr: Verify and restore DDI allocations after runtime resume
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (9 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 10/13] drm/i915/ddi_mgr: Keep AUX access consistent with DDI pool routes Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 13:25   ` Jani Nikula
  2026-11-26 10:07 ` [PATCH 12/13] drm/i915/ddi_mgr: Handle DDI pool system suspend and resume Imre Deak
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Check that the IOM resource pool and recorded legacy PHY assignments are
preserved across runtime suspend. Restore missing legacy assignments to
their original DDIs when those DDIs are free and the PHYs have no other
assignment.

Firmware may reuse a legacy DDI while the device is suspended. Track
allocations that could not be restored separately from the saved routes,
and report their connectors as disconnected until the allocations can
be restored. Reject enabling these connectors, including when the loss
is discovered by the commit's runtime resume, while allowing them to be
detached.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi_mgr.c  | 123 ++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_ddi_mgr.h  |   2 +
 drivers/gpu/drm/i915/display/intel_display.c  |  12 +-
 .../drm/i915/display/intel_display_driver.c   |   3 +
 drivers/gpu/drm/i915/display/intel_tc.c       |  33 ++++-
 drivers/gpu/drm/xe/display/xe_display.c       |   3 +
 6 files changed, 174 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
index 236146a37fc34..8f32e7c8dff27 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: MIT
 /* Copyright © 2026 Intel Corporation */
 
+#include <linux/compiler.h>
 #include <linux/iopoll.h>
 #include <linux/seq_buf.h>
 #include <linux/string.h>
@@ -45,6 +46,7 @@ struct intel_ddi_mgr {
 	struct intel_ddi_route route[INTEL_DDI_MGR_NUM_PORTS];
 	u8 ddc_pin[INTEL_DDI_MGR_NUM_PORTS];
 	u8 pool_ddi_mask;
+	u8 disabled_ddi_mask;
 	u8 legacy_phy_mask;
 	u16 ddc_pins;
 	bool has_hdmi;
@@ -101,6 +103,16 @@ bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi)
 		display->ddi_mgr->pool_ddi_mask & BIT(ddi - PORT_TC1);
 }
 
+bool intel_ddi_mgr_is_ddi_disabled(struct intel_display *display, enum port ddi)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+
+	if (!mgr || ddi < PORT_TC1 || ddi > PORT_TC4)
+		return false;
+
+	return READ_ONCE(mgr->disabled_ddi_mask) & BIT(ddi - PORT_TC1);
+}
+
 bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display)
 {
 	struct intel_ddi_mgr *mgr = display->ddi_mgr;
@@ -165,6 +177,9 @@ bool intel_ddi_mgr_aux_available(struct intel_encoder *encoder)
 {
 	struct intel_display *display = to_intel_display(encoder);
 
+	if (intel_ddi_mgr_is_ddi_disabled(display, encoder->port))
+		return false;
+
 	if (!intel_ddi_mgr_is_pool_ddi(display, encoder->port))
 		return true;
 
@@ -193,6 +208,9 @@ bool intel_ddi_mgr_connector_available(struct intel_connector *connector)
 		return true;
 
 	encoder = &dig_port->base;
+	if (intel_ddi_mgr_is_ddi_disabled(display, encoder->port))
+		return false;
+
 	if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA)
 		return intel_ddi_mgr_is_legacy_pool_encoder(encoder) &&
 			(intel_bios_encoder_supports_hdmi(encoder->devdata) ||
@@ -822,6 +840,111 @@ static void update_hpd_sources(struct intel_display *display)
 	}
 }
 
+static u8 legacy_ddi_mismatch_mask(const struct intel_ddi_mgr *mgr, u32 resources)
+{
+	u8 ddi_mask = 0;
+	int ddi;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		const struct intel_ddi_route *route = &mgr->route[ddi];
+
+		if (!(mgr->pool_ddi_mask & BIT(ddi)) ||
+		    route->mode != INTEL_DDI_ROUTE_LEGACY)
+			continue;
+
+		if (IOM_DDI_CONSUMER_GET(resources, ddi) !=
+		    IOM_DDI_CONSUMER_PHY(route->phy))
+			ddi_mask |= BIT(ddi);
+	}
+
+	return ddi_mask;
+}
+
+static u32 restore_legacy_allocations(struct intel_display *display, u32 resources)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	u32 new_resources = resources;
+	u32 readback;
+	int ddi, slot;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
+		const struct intel_ddi_route *route = &mgr->route[ddi];
+		u32 consumer = IOM_DDI_CONSUMER_GET(resources, ddi);
+
+		if (!(mgr->pool_ddi_mask & BIT(ddi)) || route->mode != INTEL_DDI_ROUTE_LEGACY)
+			continue;
+
+		if (consumer != IOM_DDI_CONSUMER_FREE)
+			continue;
+
+		for (slot = 0; slot < IOM_DDI_NUM_SLOTS; slot++)
+			if (IOM_DDI_CONSUMER_GET(resources, slot) ==
+			    IOM_DDI_CONSUMER_PHY(route->phy))
+				break;
+
+		if (slot < IOM_DDI_NUM_SLOTS)
+			continue;
+
+		new_resources |= IOM_DDI_CONSUMER(ddi, IOM_DDI_CONSUMER_PHY(route->phy));
+	}
+
+	if (new_resources == resources)
+		return resources;
+
+	intel_de_write(display, IOM_DP_RESOURCE_MNG, new_resources);
+	readback = intel_de_read(display, IOM_DP_RESOURCE_MNG);
+	if (readback != new_resources)
+		drm_err(display->drm,
+			"DDIMGR: DDI restore mismatch: requested 0x%08x, read 0x%08x\n",
+			new_resources, readback);
+
+	return readback;
+}
+
+void intel_ddi_mgr_verify_state(struct intel_display *display)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	u8 old_disabled_ddi_mask, disabled_ddi_mask;
+	u32 resources;
+	int err;
+
+	if (!intel_ddi_mgr_is_enabled(mgr))
+		return;
+
+	old_disabled_ddi_mask = READ_ONCE(mgr->disabled_ddi_mask);
+
+	err = iom_lock(display);
+	if (err)
+		return;
+
+	resources = intel_de_read(display, IOM_DP_RESOURCE_MNG);
+	verify_ddi_counts(display, resources);
+
+	err = verify_ddi_pool(display, resource_to_pool_ddi_mask(resources));
+	if (err)
+		goto out;
+
+	if (!legacy_ddi_mismatch_mask(mgr, resources))
+		goto out;
+
+	drm_dbg_kms(display->drm,
+		    "DDIMGR: Legacy DDI allocations changed during runtime suspend: 0x%08x\n",
+		    resources);
+
+	resources = restore_legacy_allocations(display, resources);
+
+out:
+	iom_unlock(display);
+
+	disabled_ddi_mask = legacy_ddi_mismatch_mask(mgr, resources);
+	if (disabled_ddi_mask == old_disabled_ddi_mask)
+		return;
+
+	WRITE_ONCE(mgr->disabled_ddi_mask, disabled_ddi_mask);
+	drm_dbg_kms(display->drm, "DDIMGR: Disabled DDIs: 0x%02x -> 0x%02x\n",
+		    old_disabled_ddi_mask, disabled_ddi_mask);
+}
+
 static int init_ddi_resource(struct intel_display *display, int ddi)
 {
 	struct intel_ddi_mgr *mgr = display->ddi_mgr;
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
index db10d0e8b3a97..fddd69564b84d 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
@@ -14,8 +14,10 @@ struct intel_display;
 struct intel_encoder;
 
 void intel_ddi_mgr_init(struct intel_display *display);
+void intel_ddi_mgr_verify_state(struct intel_display *display);
 
 bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
+bool intel_ddi_mgr_is_ddi_disabled(struct intel_display *display, enum port ddi);
 bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display);
 bool intel_ddi_mgr_is_legacy_pool_encoder(struct intel_encoder *encoder);
 bool intel_ddi_mgr_encoder_has_lane_reversal(struct intel_encoder *encoder);
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 19caae633d29f..1c03e801e21cd 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -68,6 +68,7 @@
 #include "intel_cursor_regs.h"
 #include "intel_cx0_phy.h"
 #include "intel_ddi.h"
+#include "intel_ddi_mgr.h"
 #include "intel_de.h"
 #include "intel_dip.h"
 #include "intel_display_driver.h"
@@ -6812,7 +6813,16 @@ int intel_atomic_check(struct drm_device *dev,
 
 static int intel_atomic_prepare_commit(struct intel_atomic_state *state)
 {
-	int ret;
+	struct drm_connector *connector;
+	struct drm_connector_state *conn_state;
+	int i, ret;
+
+	/* Runtime resume may have invalidated a DDI after atomic check. */
+	for_each_new_connector_in_state(&state->base, connector, conn_state, i) {
+		if (conn_state->crtc &&
+		    !intel_ddi_mgr_connector_available(to_intel_connector(connector)))
+			return -ENODEV;
+	}
 
 	ret = drm_atomic_helper_prepare_planes(state->base.dev, &state->base);
 	if (ret < 0)
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index c13471a5a10e7..b018608eae032 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -30,6 +30,7 @@
 #include "intel_crtc.h"
 #include "intel_cursor.h"
 #include "intel_dbuf_bw.h"
+#include "intel_ddi_mgr.h"
 #include "intel_de.h"
 #include "intel_display_clock_gating.h"
 #include "intel_display_core.h"
@@ -962,6 +963,8 @@ void intel_display_driver_pm_runtime_resume_early(struct intel_display *display)
 /* after irq resume */
 void intel_display_driver_pm_runtime_resume(struct intel_display *display)
 {
+	intel_ddi_mgr_verify_state(display);
+
 	/*
 	 * On VLV/CHV display interrupts are part of the display
 	 * power well, so hpd is reinitialized from there. For
diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
index f878494bcb388..e01f367007424 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -10,6 +10,7 @@
 #include "intel_atomic.h"
 #include "intel_cx0_phy_regs.h"
 #include "intel_ddi.h"
+#include "intel_ddi_mgr.h"
 #include "intel_de.h"
 #include "intel_display.h"
 #include "intel_display_driver.h"
@@ -1173,6 +1174,17 @@ static void xelpdp_tc_phy_get_hw_state(struct intel_tc_port *tc)
 
 	tc_cold_wref = __tc_cold_block(tc, &domain);
 
+	if (intel_ddi_mgr_is_ddi_disabled(display, tc->dig_port->base.port)) {
+		tc->mode = TC_PORT_DISCONNECTED;
+		drm_dbg_kms(display->drm,
+			    "Port %s: skipping PHY readout, legacy DDI allocation unavailable\n",
+			    tc->port_name);
+
+		__tc_cold_unblock(tc, domain, tc_cold_wref);
+
+		return;
+	}
+
 	tc->mode = tc_phy_get_current_mode(tc);
 	if (tc->mode != TC_PORT_DISCONNECTED) {
 		tc->lock_wakeref = tc_cold_block(tc);
@@ -1195,6 +1207,8 @@ static void xelpdp_tc_phy_get_hw_state(struct intel_tc_port *tc)
 
 static bool xelpdp_tc_phy_connect(struct intel_tc_port *tc, int required_lanes)
 {
+	struct intel_display *display = to_intel_display(tc->dig_port);
+
 	tc->lock_wakeref = tc_cold_block(tc);
 
 	if (tc->mode == TC_PORT_TBT_ALT) {
@@ -1203,6 +1217,10 @@ static bool xelpdp_tc_phy_connect(struct intel_tc_port *tc, int required_lanes)
 		return true;
 	}
 
+	/* AUX transfers and modesets reject DDIs without their legacy allocation. */
+	if (intel_ddi_mgr_is_ddi_disabled(display, tc->dig_port->base.port))
+		return true;
+
 	if (!xelpdp_tc_phy_enable_tcss_power(tc, true))
 		goto out_unblock_tccold;
 
@@ -1227,6 +1245,14 @@ static bool xelpdp_tc_phy_connect(struct intel_tc_port *tc, int required_lanes)
 
 static void xelpdp_tc_phy_disconnect(struct intel_tc_port *tc)
 {
+	struct intel_display *display = to_intel_display(tc->dig_port);
+
+	if (intel_ddi_mgr_is_ddi_disabled(display, tc->dig_port->base.port)) {
+		tc_cold_unblock(tc, fetch_and_zero(&tc->lock_wakeref));
+
+		return;
+	}
+
 	switch (tc->mode) {
 	case TC_PORT_LEGACY:
 	case TC_PORT_DP_ALT:
@@ -1733,6 +1759,9 @@ bool intel_tc_port_connected(struct intel_encoder *encoder)
 
 	drm_WARN_ON(display->drm, !intel_tc_port_ref_held(dig_port));
 
+	if (intel_ddi_mgr_is_ddi_disabled(display, encoder->port))
+		return false;
+
 	if (tc->mode != TC_PORT_DISCONNECTED)
 		mask = BIT(tc->mode);
 
@@ -1880,7 +1909,9 @@ static void __intel_tc_port_lock(struct intel_tc_port *tc,
 					  false);
 
 	drm_WARN_ON(display->drm, tc->mode == TC_PORT_DISCONNECTED);
-	drm_WARN_ON(display->drm, tc->mode != TC_PORT_TBT_ALT && !tc_phy_is_owned(tc));
+	drm_WARN_ON(display->drm,
+		    !intel_ddi_mgr_is_ddi_disabled(display, tc->dig_port->base.port) &&
+		    tc->mode != TC_PORT_TBT_ALT && !tc_phy_is_owned(tc));
 }
 
 void intel_tc_port_lock(struct intel_digital_port *dig_port)
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index f757cfad4bd6e..b36a7cc83420d 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -13,6 +13,7 @@
 #include <drm/intel/display_member.h>
 #include <drm/intel/display_parent_interface.h>
 
+#include "intel_ddi_mgr.h"
 #include "intel_display.h"
 #include "intel_display_core.h"
 #include "intel_display_device.h"
@@ -340,6 +341,8 @@ static void xe_display_disable_d3cold(struct xe_device *xe)
 
 	intel_dmc_resume(display);
 
+	intel_ddi_mgr_verify_state(display);
+
 	if (intel_display_device_present(display))
 		drm_mode_config_reset(&xe->drm);
 
-- 
2.49.1


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

* [PATCH 12/13] drm/i915/ddi_mgr: Handle DDI pool system suspend and resume
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (10 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 11/13] drm/i915/ddi_mgr: Verify and restore DDI allocations after runtime resume Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 10:41   ` sashiko-bot
  2026-11-26 13:25   ` Jani Nikula
  2026-11-26 10:07 ` [PATCH 13/13] drm/i915/ddi_mgr: Enable dynamic DDI allocation at load Imre Deak
                   ` (3 subsequent siblings)
  15 siblings, 2 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Firmware may change DDI assignments during system suspend. Rebuild the
legacy routes on normal resume after IRQ postinstall masks HPD, and
refresh encoder VBT data, Type-C mode and lane reversal before hardware
readout and modeset restore. Update the logical HPD pin to HW IRQ source
mappings while keeping each encoder's logical pin fixed, so HPD block
counts need not be moved between pins.

Keep legacy assignments found in hardware. When a legacy PHY needs a
new assignment, prefer its pre-suspend DDI before identity or other free
DDIs, keeping the same DRM connector where possible.

Rebuild source and common link limits when a route changes, resetting
link-training/recovery state while retaining cached sink capabilities
for normal resume and detection.

Disable pool DDC adapters during suspend and restore their routes before
the resume modeset. On failed xe suspend recovery, preserve cached
allocations and HPD mappings because HW HPD IRQs stayed enabled
throughout the sequence.

When restoring the pre-suspend display configuration, reject modesets
for HDMI connectors whose encoders no longer serve HDMI-capable legacy
PHYs, or DP connectors whose encoders now serve legacy PHYs without DP
support. If DDI configuration fails, switch the pool encoders to ALT-only
operation, allowing DP restores while keeping HDMI unavailable.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi_mgr.c  | 77 +++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_ddi_mgr.h  |  2 +
 .../drm/i915/display/intel_display_driver.c   |  1 +
 drivers/gpu/drm/i915/display/intel_dp.c       |  9 +++
 drivers/gpu/drm/i915/display/intel_dp.h       |  1 +
 drivers/gpu/drm/i915/display/intel_tc.c       | 13 ++++
 drivers/gpu/drm/i915/display/intel_tc.h       |  1 +
 drivers/gpu/drm/i915/i915_driver.c            |  7 ++
 drivers/gpu/drm/xe/display/xe_display.c       |  6 ++
 9 files changed, 117 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
index 8f32e7c8dff27..a0157ff6afc04 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
@@ -840,6 +840,83 @@ static void update_hpd_sources(struct intel_display *display)
 	}
 }
 
+void intel_ddi_mgr_suspend(struct intel_display *display)
+{
+	if (!intel_ddi_mgr_is_enabled(display->ddi_mgr))
+		return;
+
+	intel_gmbus_ddi_pool_update(display, false);
+}
+
+static void resume_ddi_resource(struct intel_display *display,
+				struct intel_encoder *encoder,
+				const struct intel_ddi_route *old_route)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	struct intel_digital_port *dig_port;
+	const struct intel_ddi_route *route;
+
+	if (!encoder)
+		return;
+
+	route = &mgr->route[encoder->port - PORT_TC1];
+	dig_port = enc_to_dig_port(encoder);
+	encoder->devdata = intel_ddi_mgr_get_devdata_for_ddi(display, encoder->port);
+	intel_tc_port_set_legacy(dig_port, mgr->enabled &&
+				route->mode == INTEL_DDI_ROUTE_LEGACY);
+	dig_port->lane_reversal = intel_ddi_mgr_encoder_has_lane_reversal(encoder);
+
+	if (mgr->enabled && old_route->mode == route->mode &&
+	    old_route->phy == route->phy)
+		return;
+
+	intel_dp_update_source_caps(&dig_port->dp);
+}
+
+static void resume_ddi_resources(struct intel_display *display)
+{
+	struct intel_ddi_mgr *mgr = display->ddi_mgr;
+	struct intel_encoder *encoders[INTEL_DDI_MGR_NUM_PORTS] = {};
+	struct intel_ddi_route old_route[INTEL_DDI_MGR_NUM_PORTS];
+	struct intel_encoder *encoder;
+	int ddi, err;
+
+	/* Only normal resume gets here, with HPD masked by IRQ postinstall. */
+	memcpy(old_route, mgr->route, sizeof(old_route));
+
+	err = configure_ddi_resources(display, old_route);
+	WRITE_ONCE(mgr->disabled_ddi_mask, 0);
+	if (err)
+		fallback_to_alt(mgr);
+	else
+		mgr->enabled = true;
+
+	update_hpd_sources(display);
+
+	if (err)
+		drm_err(display->drm, "DDIMGR: Cannot restore DDI pool: %d; using ALT mode\n", err);
+
+	for_each_intel_encoder(display->drm, encoder)
+		if (encoder->type == INTEL_OUTPUT_DDI &&
+		    intel_ddi_mgr_is_pool_ddi(display, encoder->port))
+			encoders[encoder->port - PORT_TC1] = encoder;
+
+	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++)
+		resume_ddi_resource(display, encoders[ddi], &old_route[ddi]);
+}
+
+void intel_ddi_mgr_resume(struct intel_display *display, bool suspend_failed)
+{
+	if (!display->ddi_mgr)
+		return;
+
+	/* Failed suspend leaves HPD IRQs enabled: preserve cached assignments. */
+	if (!suspend_failed)
+		resume_ddi_resources(display);
+
+	intel_gmbus_ddi_pool_update(display, true);
+}
+
 static u8 legacy_ddi_mismatch_mask(const struct intel_ddi_mgr *mgr, u32 resources)
 {
 	u8 ddi_mask = 0;
diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
index fddd69564b84d..6ddb30e826d4c 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
+++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
@@ -14,6 +14,8 @@ struct intel_display;
 struct intel_encoder;
 
 void intel_ddi_mgr_init(struct intel_display *display);
+void intel_ddi_mgr_suspend(struct intel_display *display);
+void intel_ddi_mgr_resume(struct intel_display *display, bool suspend_failed);
 void intel_ddi_mgr_verify_state(struct intel_display *display);
 
 bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index b018608eae032..a9b03b4a1e76b 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -780,6 +780,7 @@ static int __intel_display_driver_pm_suspend(struct intel_display *display, bool
 	intel_display_driver_suspend_access(display);
 
 	intel_encoder_suspend_all(display);
+	intel_ddi_mgr_suspend(display);
 
 	intel_dmc_suspend(display);
 
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 6f03a169931eb..60f041bd62979 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -702,6 +702,15 @@ static bool intel_dp_set_common_link_params(struct intel_dp *intel_dp)
 	return params_changed;
 }
 
+/* Rebuild source limits after selecting a different physical port's VBT data. */
+void intel_dp_update_source_caps(struct intel_dp *intel_dp)
+{
+	intel_dp_set_source_rates(intel_dp);
+	intel_dp->reset_link_params = true;
+	intel_dp_set_common_link_params(intel_dp);
+	intel_dp_reset_link_params(intel_dp);
+}
+
 u32 intel_dp_mode_to_fec_clock(u32 mode_clock)
 {
 	return div_u64(mul_u32_u32(mode_clock, DP_DSC_FEC_OVERHEAD_FACTOR),
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index 36cd340d809f2..072facf627eba 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -59,6 +59,7 @@ void intel_dp_connector_sync_state(struct intel_connector *connector,
 void intel_dp_set_link_params(struct intel_dp *intel_dp,
 			      int link_rate, int lane_count);
 void intel_dp_set_source_rates(struct intel_dp *intel_dp);
+void intel_dp_update_source_caps(struct intel_dp *intel_dp);
 int intel_dp_get_active_pipes(struct intel_dp *intel_dp,
 			      struct drm_modeset_acquire_ctx *ctx,
 			      u8 *pipe_mask);
diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
index e01f367007424..df591966e08ef 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -1595,6 +1595,19 @@ static bool tc_port_is_enabled(struct intel_tc_port *tc)
 	       DDI_BUF_CTL_ENABLE;
 }
 
+void intel_tc_port_set_legacy(struct intel_digital_port *dig_port, bool legacy)
+{
+	struct intel_display *display = to_intel_display(dig_port);
+	struct intel_tc_port *tc = to_tc_port(dig_port);
+
+	mutex_lock(&tc->lock);
+
+	drm_WARN_ON(display->drm, tc->mode != TC_PORT_DISCONNECTED || tc->link_refcount);
+	tc->legacy_port = legacy;
+
+	mutex_unlock(&tc->lock);
+}
+
 /**
  * intel_tc_port_init_mode: Read out HW state and init the given port's TypeC mode
  * @dig_port: digital port
diff --git a/drivers/gpu/drm/i915/display/intel_tc.h b/drivers/gpu/drm/i915/display/intel_tc.h
index 6719aea5bd582..6d32eeb91d8da 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.h
+++ b/drivers/gpu/drm/i915/display/intel_tc.h
@@ -96,6 +96,7 @@ void intel_tc_port_set_fia_lane_count(struct intel_digital_port *dig_port,
 				      int required_lanes);
 
 void intel_tc_port_init_mode(struct intel_digital_port *dig_port);
+void intel_tc_port_set_legacy(struct intel_digital_port *dig_port, bool legacy);
 void intel_tc_port_sanitize_mode(struct intel_digital_port *dig_port,
 				 const struct intel_crtc_state *crtc_state);
 void intel_tc_port_lock(struct intel_digital_port *dig_port);
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 923b239714b7e..8f87ad87d45ac 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -54,6 +54,7 @@
 #include "display/i9xx_display_sr.h"
 #include "display/intel_cdclk.h"
 #include "display/intel_crtc.h"
+#include "display/intel_ddi_mgr.h"
 #include "display/intel_display_device.h"
 #include "display/intel_display_driver.h"
 #include "display/intel_display_power.h"
@@ -1237,6 +1238,12 @@ static int i915_drm_resume(struct drm_device *dev)
 	 */
 	intel_irq_resume(dev_priv);
 
+	/*
+	 * TODO: Move this to display code, keeping it before
+	 * drm_mode_config_reset().
+	 */
+	intel_ddi_mgr_resume(display, false);
+
 	if (intel_display_device_present(display))
 		drm_mode_config_reset(dev);
 
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index b36a7cc83420d..a267dc9ed93d4 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -301,6 +301,12 @@ void xe_display_pm_resume(struct xe_device *xe, bool suspend_failed)
 
 	intel_dmc_resume(display);
 
+	/*
+	 * TODO: Move this to display code, keeping it before
+	 * drm_mode_config_reset().
+	 */
+	intel_ddi_mgr_resume(display, suspend_failed);
+
 	if (intel_display_device_present(display))
 		drm_mode_config_reset(&xe->drm);
 
-- 
2.49.1


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

* [PATCH 13/13] drm/i915/ddi_mgr: Enable dynamic DDI allocation at load
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (11 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 12/13] drm/i915/ddi_mgr: Handle DDI pool system suspend and resume Imre Deak
@ 2026-11-26 10:07 ` Imre Deak
  2026-11-26 14:08 ` ✗ CI.checkpatch: warning for drm/i915/ddi_mgr: Add support for dynamic DDI allocation Patchwork
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Imre Deak @ 2026-11-26 10:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe

Initialize and enable the DDI manager before GMBUS and output setup so
legacy DDI allocations and HPD source mappings are ready when adapters
and encoders are created. Reconfigure the DDI assignments and encoder
mappings during system resume.

For now, this enables only static legacy DDI allocation. Legacy DDIs are
inherited from BIOS or allocated only during driver loading and system
resume, and these assignments remain unchanged during runtime. Runtime
reallocation support will be added in a follow-up series.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index a9b03b4a1e76b..5a70228599553 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -484,6 +484,7 @@ int intel_display_driver_probe_nogem(struct intel_display *display)
 
 	intel_pps_setup(display);
 
+	intel_ddi_mgr_init(display);
 	intel_gmbus_setup(display);
 
 	ret = intel_crtc_init(display);
-- 
2.49.1


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

* Re: [PATCH 09/13] drm/i915/ddi_mgr: Register encoders with dynamic DDI support
  2026-11-26 10:07 ` [PATCH 09/13] drm/i915/ddi_mgr: Register encoders with dynamic DDI support Imre Deak
@ 2026-11-26 10:26   ` sashiko-bot
  0 siblings, 0 replies; 23+ messages in thread
From: sashiko-bot @ 2026-11-26 10:26 UTC (permalink / raw)
  To: Imre Deak, intel-gfx, intel-xe

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/i915/ddi_mgr: legacy VBT assigned to alt-mode DDI in
  intel_ddi_mgr_get_devdata_for_ddi()
--

commit fb0303db841fcc8f1c97a0608f7a2f40859c71f0
Author: Imre Deak <imre.deak@intel.com>

drm/i915/ddi_mgr: Register encoders with dynamic DDI support

This commit registers DP and HDMI connectors for encoders in the shared
dynamic DDI pool, selects VBT encoder data and lane reversal based on the
assigned legacy PHY route, and rejects modesets on connectors that do not
match the current DDI allocation.

> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> index a4a4673dda585..58e48a61b8160 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
[ ... ]
> @@ -120,6 +125,72 @@ u8 intel_ddi_mgr_ddc_pin_for_ddi(struct intel_display *display, enum port ddi)
>  	return mgr->ddc_pin[route->phy];
>  }
>  
[ ... ]
> +const struct intel_bios_encoder_data *
> +intel_ddi_mgr_get_devdata_for_ddi(struct intel_display *display, enum port ddi)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	enum port port = ddi;
> +
> +	if (intel_ddi_mgr_is_enabled(mgr) && intel_ddi_mgr_is_pool_ddi(display, ddi)) {
> +		const struct intel_ddi_route *route = &mgr->route[ddi - PORT_TC1];
> +
> +		if (route->mode == INTEL_DDI_ROUTE_LEGACY)
> +			port = tc_to_port(route->phy);
> +	}
> +
> +	return intel_bios_encoder_data_lookup(display, port);
> +}

[Severity: Medium]
Can intel_ddi_mgr_get_devdata_for_ddi() assign a legacy PHY's VBT entry to
an alt-mode encoder when route->mode is INTEL_DDI_ROUTE_ALT?

If ddi corresponds to a dynamic legacy PHY in VBT (for example an
HDMI-only legacy port where child.dp_max_lane_count is 0), falling back to
port = ddi when that DDI is allocated to a DP-alt or TBT-alt sink attaches
the legacy VBT entry to encoder->devdata.  intel_dp_max_source_lane_count()
-> intel_bios_dp_max_lane_count() then evaluates
devdata->child.dp_max_lane_count + 1 and clamps the alt-mode DP sink on
that DDI to 1 lane (and applies any legacy VBT link-rate cap in
vbt_max_link_rate()).

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261126100755.1252635-1-imre.deak@intel.com?part=9

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

* Re: [PATCH 12/13] drm/i915/ddi_mgr: Handle DDI pool system suspend and resume
  2026-11-26 10:07 ` [PATCH 12/13] drm/i915/ddi_mgr: Handle DDI pool system suspend and resume Imre Deak
@ 2026-11-26 10:41   ` sashiko-bot
  2026-11-26 13:25   ` Jani Nikula
  1 sibling, 0 replies; 23+ messages in thread
From: sashiko-bot @ 2026-11-26 10:41 UTC (permalink / raw)
  To: Imre Deak, intel-gfx, intel-xe

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/i915/ddi_mgr: stale TC max_lane_count in
  resume_ddi_resource()
- [Medium] drm/i915/ddi_mgr: intel_ddi_mgr_suspend() disables DDC on
  shutdown
--

commit bca24baba50bb2986501c95a0a336e4e761dcc14
Author: Imre Deak <imre.deak@intel.com>

drm/i915/ddi_mgr: Handle DDI pool system suspend and resume

This commit adds system suspend and resume handling for the DDI pool
manager, disabling pool DDC adapters on suspend and rebuilding legacy DDI
routes, HPD mappings, Type-C port state, and DP source capabilities on
resume.

> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> index 8f32e7c8dff27..a0157ff6afc04 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> @@ -840,6 +840,83 @@ static void update_hpd_sources(struct intel_display *display)
>  	}
>  }
>  
> +void intel_ddi_mgr_suspend(struct intel_display *display)
> +{
> +	if (!intel_ddi_mgr_is_enabled(display->ddi_mgr))
> +		return;
> +
> +	intel_gmbus_ddi_pool_update(display, false);
> +}
> +
> +static void resume_ddi_resource(struct intel_display *display,
> +				struct intel_encoder *encoder,
> +				const struct intel_ddi_route *old_route)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	struct intel_digital_port *dig_port;
> +	const struct intel_ddi_route *route;
> +
> +	if (!encoder)
> +		return;
> +
> +	route = &mgr->route[encoder->port - PORT_TC1];
> +	dig_port = enc_to_dig_port(encoder);
> +	encoder->devdata = intel_ddi_mgr_get_devdata_for_ddi(display, encoder->port);
> +	intel_tc_port_set_legacy(dig_port, mgr->enabled &&
> +				route->mode == INTEL_DDI_ROUTE_LEGACY);
> +	dig_port->lane_reversal = intel_ddi_mgr_encoder_has_lane_reversal(encoder);
> +
> +	if (mgr->enabled && old_route->mode == route->mode &&
> +	    old_route->phy == route->phy)
> +		return;
> +
> +	intel_dp_update_source_caps(&dig_port->dp);
> +}

[Severity: Medium]
Does intel_dp_update_source_caps() rebuild dig_port->dp.link.caps using a
stale tc->max_lane_count here?

intel_ddi_mgr_resume() runs before drm_mode_config_reset() calls
intel_ddi_encoder_reset() -> intel_tc_port_init_mode(dig_port), and
intel_tc_port_set_legacy() only updates tc->legacy_port while tc->mode is
TC_PORT_DISCONNECTED.  When intel_dp_update_source_caps() calls
intel_dp_set_common_link_params() -> intel_dp_get_max_common_lane_count(),
intel_tc_port_max_lane_count(dig_port) still returns the pre-suspend
route's tc->max_lane_count.

If a pool encoder's route changes across suspend/resume between a 2-lane
DP-alt sink and a 4-lane legacy PHY (or vice versa), link.caps is clamped
to 2 lanes on a 4-lane route or retains 4-lane configurations on a 2-lane
route during the resume modeset restore.

[ ... ]

> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index b018608eae032..a9b03b4a1e76b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -780,6 +780,7 @@ static int __intel_display_driver_pm_suspend(struct intel_display *display, bool
>  	intel_display_driver_suspend_access(display);
>  
>  	intel_encoder_suspend_all(display);
> +	intel_ddi_mgr_suspend(display);
>  
>  	intel_dmc_suspend(display);
>  

[Severity: Medium]
When shutdown is true, does calling intel_ddi_mgr_suspend() here disable
the pool DDC adapters before intel_display_driver_shutdown() runs
intel_encoder_shutdown_all()?

In __intel_display_driver_pm_suspend(display, true),
drm_atomic_helper_shutdown() disables active outputs and turns off Type 2
DP dual-mode adaptor TMDS buffers over DDC.  intel_ddi_mgr_suspend() then
marks the pool GMBUS adapters disabled, so the subsequent
intel_encoder_shutdown_all() -> intel_hdmi_encoder_shutdown() ->
intel_dp_dual_mode_set_tmds_output(intel_hdmi, true) call fails in
gmbus_xfer() with -ENXIO instead of re-enabling the TMDS output buffer for
reboot.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261126100755.1252635-1-imre.deak@intel.com?part=12

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

* Re: [PATCH 04/13] drm/xe/display: Distinguish failed system suspend recovery
  2026-11-26 10:07 ` [PATCH 04/13] drm/xe/display: Distinguish failed system suspend recovery Imre Deak
@ 2026-11-26 13:22   ` Jani Nikula
  0 siblings, 0 replies; 23+ messages in thread
From: Jani Nikula @ 2026-11-26 13:22 UTC (permalink / raw)
  To: Imre Deak, intel-gfx, intel-xe

On Thu, 26 Nov 2026, Imre Deak <imre.deak@intel.com> wrote:
> A suspend failure before xe_irq_suspend() resumes display while its HPD
> interrupts are still enabled. Pass that condition to the display resume
> path so a later DDI-pool change can preserve its cached assignments and
> HPD source tables on recovery.
>
> Normal system resume continues after interrupt reset/postinstall, with HPD
> masked until display initialization completes. Document replacing this
> distinction with display-only interrupt shutdown/reinitialization once
> those hooks are available.

This needs to be the same for i915 and xe. No xe specific stuff, please.

BR,
Jani.

>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 7 ++++++-
>  drivers/gpu/drm/xe/display/xe_display.h | 4 ++--
>  drivers/gpu/drm/xe/xe_device.c          | 4 ++--
>  3 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 0236f69a0f883..f757cfad4bd6e 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -286,7 +286,12 @@ void xe_display_pm_resume_early(struct xe_device *xe)
>  	intel_display_driver_pm_resume_early(display);
>  }
>  
> -void xe_display_pm_resume(struct xe_device *xe)
> +/*
> + * FIXME: Disable display-only interrupts at the end of xe_display_pm_suspend()
> + * and reinitialize them here, including failed-suspend recovery. That would
> + * remove the need to distinguish recovery without an interrupt reset.
> + */
> +void xe_display_pm_resume(struct xe_device *xe, bool suspend_failed)
>  {
>  	struct intel_display *display = xe->display;
>  
> diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
> index 6c580d9593b03..79f94be0cfb65 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.h
> +++ b/drivers/gpu/drm/xe/display/xe_display.h
> @@ -41,7 +41,7 @@ void xe_display_irq_postinstall(struct xe_device *xe);
>  void xe_display_pm_suspend(struct xe_device *xe);
>  void xe_display_pm_suspend_late(struct xe_device *xe);
>  void xe_display_pm_resume_early(struct xe_device *xe);
> -void xe_display_pm_resume(struct xe_device *xe);
> +void xe_display_pm_resume(struct xe_device *xe, bool suspend_failed);
>  void xe_display_pm_runtime_suspend(struct xe_device *xe);
>  void xe_display_pm_runtime_suspend_late(struct xe_device *xe);
>  void xe_display_pm_runtime_resume_early(struct xe_device *xe);
> @@ -80,7 +80,7 @@ static inline void xe_display_irq_postinstall(struct xe_device *xe) {}
>  static inline void xe_display_pm_suspend(struct xe_device *xe) {}
>  static inline void xe_display_pm_suspend_late(struct xe_device *xe) {}
>  static inline void xe_display_pm_resume_early(struct xe_device *xe) {}
> -static inline void xe_display_pm_resume(struct xe_device *xe) {}
> +static inline void xe_display_pm_resume(struct xe_device *xe, bool suspend_failed) {}
>  static inline void xe_display_pm_runtime_suspend(struct xe_device *xe) {}
>  static inline void xe_display_pm_runtime_suspend_late(struct xe_device *xe) {}
>  static inline void xe_display_pm_runtime_resume_early(struct xe_device *xe) {}
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 36693df655941..884a2be28c17b 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -1464,7 +1464,7 @@ int xe_device_suspend(struct xe_device *xe, bool hibernate, bool flr)
>  	return 0;
>  
>  err_display:
> -	xe_display_pm_resume(xe);
> +	xe_display_pm_resume(xe, true);
>  	xe_pxp_pm_resume(xe->pxp);
>  	return err;
>  }
> @@ -1543,7 +1543,7 @@ int xe_device_resume(struct xe_device *xe, bool flr)
>  		 * Try to bring up display before bailing from GT resume failure,
>  		 * so we don't leave the user clueless with a blank screen.
>  		 */
> -		xe_display_pm_resume(xe);
> +		xe_display_pm_resume(xe, false);
>  		if (err)
>  			return err;

-- 
Jani Nikula, Intel

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

* Re: [PATCH 06/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation
  2026-11-26 10:07 ` [PATCH 06/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
@ 2026-11-26 13:23   ` Jani Nikula
  0 siblings, 0 replies; 23+ messages in thread
From: Jani Nikula @ 2026-11-26 13:23 UTC (permalink / raw)
  To: Imre Deak, intel-gfx, intel-xe

On Thu, 26 Nov 2026, Imre Deak <imre.deak@intel.com> wrote:
> Type-C ports described in VBT need a DDI assignment to drive a legacy or
> DP-alt PHY, or a TBT DP-in adapter. eDP panels on Type-C PHYs and
> dedicated external ports have preallocated, fixed DDIs; the latter are
> not controlled by the Type-C subsystem.
>
> The driver allocates DDIs for dynamic legacy ports; IOM and TBT firmware
> handle DP-alt and TBT-alt allocations, respectively. IOM_DP_RESOURCE_MNG
> exposes the shared pool for VBT ports with dynamic-DDI support and
> eligible alt-mode ports. A free DDI can be assigned to a PHY or DP-in
> adapter on demand.
>
> Firmware allocates and releases DDIs as alt-mode sinks connect and
> disconnect, regardless of whether userspace enables them. Connected but
> unused alt-mode sinks can therefore occupy DDIs needed by a legacy sink
> the user wants to enable. Driver control over all allocations would let
> assignments follow the requested display configuration. Alas, the
> hardware design on current generations does not allow this and instead
> imposes a complex allocation scheme involving both the OS and firmware.
>
> Add a manager to read VBT and IOM state before GMBUS and output setup,
> inherit existing legacy DDI assignments from BIOS and allocate free
> supported DDIs, preferring DDI-to-PHY identity mappings. Each DRM
> encoder keeps a fixed DDI in encoder->port. The DDI assigned to a legacy
> PHY determines which encoder handles it, whether inherited from BIOS/GOP
> for an active or inactive port or newly allocated by the driver.
>
> For now, this enables only static legacy DDI allocation. Legacy DDIs are
> inherited from BIOS or allocated only during driver loading and system
> resume, and these assignments remain unchanged during runtime. Runtime
> reallocation support will be added in a follow-up series.
>
> AUX and DDI/PHY/PLL register accesses use the allocated DDI instance.
> Legacy HPD and GMBUS DDC pins identify the PHY, while DP-alt/TBT-alt HPD
> sources identify the DDI. An encoder selected for a legacy PHY must use
> that PHY's HPD source, DDC pin and VBT capabilities, including link
> limits, and switch to legacy Type-C mode. Its logical HPD pin stays
> fixed; the HPD mapping selects the HW source. Other pool encoders remain
> non-legacy, including those whose DDI is unallocated. PHY-specific VBT
> data follows the selected PHY through encoder->devdata; AUX channel
> selection stays tied to the fixed DDI.
>
> DDC adapters for pool encoders must be separate from the ordinary
> per-pin adapters:
> a pool encoder's original VBT entry may specify no DDC pin, and its
> default pin may already be used by a non-pool port. Each pool encoder
> keeps the same DDC adapter while only the physical pin driven by that
> adapter changes, so its HDMI connector's userspace DDC symlink remains
> unchanged. Ordinary adapters retain their fixed physical pins.
>
> If allocation fails after successfully reading and verifying the pool,
> keep its encoders available for alt-mode sinks and disable legacy
> operation. Earlier initialization failures retain the original port
> configuration.
>
> Follow-up patches will add the connector and DDC adapter support,
> suspend/resume handling and activation of the pool.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/Makefile                 |   1 +
>  drivers/gpu/drm/i915/display/intel_ddi_mgr.c  | 808 ++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_ddi_mgr.h  |  18 +
>  .../gpu/drm/i915/display/intel_ddi_mgr_regs.h |  40 +
>  .../gpu/drm/i915/display/intel_display_core.h |   3 +
>  drivers/gpu/drm/xe/Makefile                   |   1 +
>  6 files changed, 871 insertions(+)
>  create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr.c
>  create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr.h
>  create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index ba7eecfffdca1..3357d84ca56aa 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -349,6 +349,7 @@ i915-y += \
>  	display/intel_cx0_phy.o \
>  	display/intel_ddi.o \
>  	display/intel_ddi_buf_trans.o \
> +	display/intel_ddi_mgr.o \
>  	display/intel_dip.o \
>  	display/intel_display_device.o \
>  	display/intel_display_trace.o \
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> new file mode 100644
> index 0000000000000..7dc547a617990
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> @@ -0,0 +1,808 @@
> +// SPDX-License-Identifier: MIT
> +/* Copyright © 2026 Intel Corporation */

Copy-pasting what I wrote to Suraj:

I would pretty much like to mandate that *every* file in display/ *must*
have a DOC: comment explaining what this stuff is about, what the
acronyms are, etc. Obviously not all the existing files have it, but all
new ones should.

You've basically written most of this already in the cover letter and
the commit messages. Add a bit of pixie dust on top and you're done.

> +
> +#include <linux/iopoll.h>
> +#include <linux/seq_buf.h>
> +#include <linux/string.h>
> +#include <drm/drm_managed.h>
> +#include <drm/drm_print.h>
> +
> +#include "intel_bios.h"
> +#include "intel_ddi_mgr.h"
> +#include "intel_ddi_mgr_regs.h"
> +#include "intel_de.h"
> +#include "intel_display.h"
> +#include "intel_display_core.h"
> +#include "intel_display_regs.h"
> +#include "intel_display_rpm.h"
> +#include "intel_display_types.h"
> +#include "intel_display_utils.h"
> +#include "intel_dp.h"
> +#include "intel_gmbus.h"
> +#include "intel_hotplug_irq.h"
> +#include "intel_tc.h"
> +
> +#define INTEL_DDI_MGR_NUM_PORTS 4
> +
> +enum intel_ddi_route_mode {
> +	/* DP-alt/TBT-alt, with allocations managed by firmware. */
> +	INTEL_DDI_ROUTE_ALT,
> +	/* Legacy DP/HDMI, with allocations managed by the driver. */
> +	INTEL_DDI_ROUTE_LEGACY,
> +};
> +
> +struct intel_ddi_route {
> +	/*
> +	 * Physical legacy PHY, or TC_PORT_NONE in ALT mode.
> +	 * TODO: Use a PHY enum instead of enum tc_port.
> +	 */
> +	enum tc_port phy;
> +	enum intel_ddi_route_mode mode;
> +};
> +
> +struct intel_ddi_mgr {
> +	/* Only route entries with a bit set in pool_ddi_mask are used. */
> +	struct intel_ddi_route route[INTEL_DDI_MGR_NUM_PORTS];
> +	u8 ddc_pin[INTEL_DDI_MGR_NUM_PORTS];
> +	u8 pool_ddi_mask;
> +	u8 legacy_phy_mask;
> +	u16 ddc_pins;
> +	bool has_hdmi;
> +	bool enabled;
> +};
> +
> +struct intel_ddi_hw_state {
> +	struct intel_ddi_route route[INTEL_DDI_MGR_NUM_PORTS];
> +	u32 inherited_resources;
> +	u32 current_resources;
> +	u8 pool_ddi_mask;
> +	u8 busy_ddi_mask;
> +	u8 assigned_phy_mask;
> +	u8 allocated_ddi_mask;
> +};
> +
> +static enum port ddi_to_port(int ddi)
> +{
> +	return PORT_TC1 + ddi;
> +}
> +
> +static enum tc_port ddi_to_tc(int ddi)
> +{
> +	return TC_PORT_1 + ddi;
> +}
> +
> +static enum hpd_pin tc_to_hpd_pin(enum tc_port tc_port)
> +{
> +	return HPD_PORT_TC1 + tc_port - TC_PORT_1;
> +}
> +
> +/* TODO: Fix the regular HDMI default selection on NVL+ and reuse it here. */
> +static u8 default_ddc_pin(struct intel_display *display, enum port port)
> +{
> +	if (port >= PORT_TC1 && port <= PORT_TC4)
> +		return intel_gmbus_tc_port_to_pin(intel_port_to_tc(display, port));
> +
> +	return intel_port_to_phy(display, port) + 1;
> +}
> +
> +static bool intel_ddi_mgr_is_enabled(const struct intel_ddi_mgr *mgr)
> +{
> +	return mgr && mgr->enabled;
> +}
> +
> +bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi)
> +{
> +	return display->ddi_mgr && ddi >= PORT_TC1 && ddi <= PORT_TC4 &&
> +		display->ddi_mgr->pool_ddi_mask & BIT(ddi - PORT_TC1);
> +}
> +
> +bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +
> +	return mgr && mgr->pool_ddi_mask && mgr->has_hdmi;
> +}
> +
> +static const char *iom_lock_owner(u32 semaphore)
> +{
> +	switch (semaphore & IOM_REQUESTOR_ID_MASK) {
> +	case IOM_REQUESTOR_ID_IOM:
> +		return "IOM";
> +	case IOM_REQUESTOR_ID_TBT0:
> +		return "TBT0";
> +	case IOM_REQUESTOR_ID_TBT1:
> +		return "TBT1";
> +	case IOM_REQUESTOR_ID_DISPLAY_ENGINE:
> +		return "Display Engine";
> +	default:
> +		return "unknown";
> +	}
> +}
> +
> +static bool iom_trylock(struct intel_display *display, u32 *semaphore)
> +{
> +	u32 request = IOM_DP_HW_SEMLOCK | IOM_REQUESTOR_ID_DISPLAY_ENGINE;
> +	u32 mask = IOM_DP_HW_SEMLOCK | IOM_REQUESTOR_ID_MASK;
> +
> +	intel_de_rmw(display, IOM_DP_HW_RESOURCE_SEMAPHORE, mask, request);
> +	*semaphore = intel_de_read(display, IOM_DP_HW_RESOURCE_SEMAPHORE);
> +
> +	return (*semaphore & mask) == request;
> +}
> +
> +static int iom_lock(struct intel_display *display)
> +{
> +	u32 semaphore;
> +	bool acquired;
> +	int err;
> +
> +	assert_display_rpm_held(display);
> +
> +	intel_de_rmw(display, IOM_HIP_INDEX, IOM_HIP_INDEX_MASK,
> +		     IOM_HIP_INDEX_RESOURCE_MGMT);
> +
> +	err = poll_timeout_us(acquired = iom_trylock(display, &semaphore),
> +			      acquired, 10, 100000, false);
> +	if (!err)
> +		return 0;
> +
> +	drm_warn(display->drm,
> +		 "DDIMGR: IOM DDI lock timeout: owner %s, register %#x\n",
> +		 iom_lock_owner(semaphore), semaphore);
> +
> +	return err;
> +}
> +
> +static void iom_unlock(struct intel_display *display)
> +{
> +	intel_de_rmw(display, IOM_DP_HW_RESOURCE_SEMAPHORE,
> +		     IOM_DP_HW_SEMLOCK | IOM_REQUESTOR_ID_MASK, IOM_REQUESTOR_ID_DISPLAY_ENGINE);
> +	intel_de_posting_read(display, IOM_DP_HW_RESOURCE_SEMAPHORE);
> +}
> +
> +static int resource_to_available_ddi_count(struct intel_display *display, u32 semaphore)
> +{
> +	u32 gray = REG_FIELD_GET(IOM_DDI_AVAILABLE_MASK, semaphore);
> +
> +	switch (gray) {
> +	case 0x0:
> +		return 0;
> +	case 0x1:
> +		return 1;
> +	case 0x2:
> +		return 3;
> +	case 0x3:
> +		return 2;
> +	case 0x6:
> +		return IOM_DDI_REPORTED_MAX_FREE; /* At least four resources are available. */
> +	default:
> +		drm_WARN(display->drm, 1, "DDIMGR: Invalid DDI availability %#x (semaphore %#x)\n",
> +			 gray, semaphore);
> +
> +		return -EINVAL;
> +	}
> +}
> +
> +static u8 resource_to_pool_ddi_mask(u32 resources)
> +{
> +	u8 pool_ddi_mask = 0;
> +	int ddi;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++)
> +		if (IOM_DDI_CONSUMER_GET(resources, ddi) != IOM_DDI_CONSUMER_RESERVED)
> +			pool_ddi_mask |= BIT(ddi);
> +
> +	return pool_ddi_mask;
> +}
> +
> +static void verify_ddi_counts(struct intel_display *display, u32 resources)
> +{
> +	u32 semaphore;
> +	int available_ddis, free_ddis = 0;
> +	int ddi;
> +
> +	semaphore = intel_de_read(display, IOM_DP_HW_RESOURCE_SEMAPHORE);
> +	available_ddis = resource_to_available_ddi_count(display, semaphore);
> +
> +	/* The hardware count covers all eight slots, not just our four TC DDIs. */
> +	for (ddi = 0; ddi < IOM_DDI_NUM_SLOTS; ddi++)
> +		if (IOM_DDI_CONSUMER_GET(resources, ddi) == IOM_DDI_CONSUMER_FREE)
> +			free_ddis++;
> +
> +	drm_WARN(display->drm, free_ddis > INTEL_DDI_MGR_NUM_PORTS,
> +		 "DDIMGR: Free DDI count %d exceeds supported count %d\n",
> +		 free_ddis, INTEL_DDI_MGR_NUM_PORTS);
> +
> +	if (available_ddis < 0 || available_ddis == min(free_ddis, IOM_DDI_REPORTED_MAX_FREE))
> +		return;
> +
> +	drm_dbg_kms(display->drm,
> +		    "DDIMGR: DDI count mismatch: available %d%s, free %d (semaphore %#x, table 0x%08x)\n",
> +		    available_ddis, available_ddis == IOM_DDI_REPORTED_MAX_FREE ? "+" : "",
> +		    free_ddis, semaphore, resources);
> +}
> +
> +/* TC PHY consumer (legacy or DP-alt), rather than a TBT DP adapter. */
> +static bool consumer_is_dpalt_legacy(u32 consumer)
> +{
> +	return consumer & IOM_DDI_CONSUMER_DPALT_LEGACY &&
> +		REG_FIELD_GET(IOM_DDI_CONSUMER_PHY_MASK, consumer) < INTEL_DDI_MGR_NUM_PORTS;
> +}
> +
> +/* Caller must first check consumer_is_dpalt_legacy(). */
> +static enum tc_port consumer_to_phy(u32 consumer)
> +{
> +	return TC_PORT_1 + REG_FIELD_GET(IOM_DDI_CONSUMER_PHY_MASK, consumer);
> +}
> +
> +static void format_ddi_consumer(struct seq_buf *s, const struct intel_ddi_mgr *mgr,
> +				u32 consumer, const char *origin)
> +{
> +	if (consumer == IOM_DDI_CONSUMER_FREE) {
> +		seq_buf_puts(s, "free");
> +
> +		return;
> +	}
> +
> +	if (consumer == IOM_DDI_CONSUMER_RESERVED) {
> +		seq_buf_puts(s, "reserved");
> +
> +		return;
> +	}
> +
> +	if (consumer_is_dpalt_legacy(consumer)) {
> +		enum tc_port phy = consumer_to_phy(consumer);
> +		bool legacy = mgr->legacy_phy_mask & BIT(phy);
> +
> +		if (!legacy)
> +			origin = NULL;
> +
> +		seq_buf_printf(s, "PHY TC#%d (%s%s%s)", phy - TC_PORT_1 + 1,
> +			       legacy ? "legacy" : "dp-alt", origin ? ", " : "", origin ?: "");
> +
> +		return;
> +	}
> +
> +	if (!(consumer & IOM_DDI_CONSUMER_DPALT_LEGACY) &&
> +	    REG_FIELD_GET(IOM_DDI_CONSUMER_TBT_DPIN_MASK, consumer)) {
> +		seq_buf_printf(s, "TBT%u DPIN%u",
> +			       REG_FIELD_GET(IOM_DDI_CONSUMER_TBT_DOMAIN_MASK, consumer),
> +			       REG_FIELD_GET(IOM_DDI_CONSUMER_TBT_DPIN_MASK, consumer) - 1);
> +
> +		return;
> +	}
> +
> +	seq_buf_printf(s, "unknown(0x%x)", consumer);
> +}
> +
> +static void print_ddi_allocations(struct drm_printer *p, const struct intel_ddi_mgr *mgr,
> +				  const struct intel_ddi_hw_state *hw_state, int err)
> +{
> +	bool printed = false;
> +	int ddi;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		u32 consumer = IOM_DDI_CONSUMER_GET(hw_state->current_resources, ddi);
> +		DECLARE_SEQ_BUF(name, 64);
> +		const char *origin = NULL;
> +
> +		if (consumer == IOM_DDI_CONSUMER_FREE || consumer == IOM_DDI_CONSUMER_RESERVED)
> +			continue;
> +
> +		if (consumer == IOM_DDI_CONSUMER_GET(hw_state->inherited_resources, ddi))
> +			origin = "inherited";
> +		else if (!err && hw_state->allocated_ddi_mask & BIT(ddi))
> +			origin = "allocated";
> +
> +		format_ddi_consumer(&name, mgr, consumer, origin);
> +		drm_printf_indent(p, 1, "DDI TC#%d: %s\n", ddi + 1, seq_buf_str(&name));
> +		printed = true;
> +	}
> +
> +	if (!printed)
> +		drm_printf_indent(p, 1, "none\n");
> +}
> +
> +static void print_ddi_resources(struct intel_display *display,
> +				const struct intel_ddi_hw_state *hw_state, int err)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	struct drm_printer p = drm_dbg_printer(display->drm, DRM_UT_KMS, "DDIMGR:");
> +	unsigned long pool_ddi_mask = resource_to_pool_ddi_mask(hw_state->current_resources) << 1;
> +	unsigned long unassigned_phy_mask =
> +		(mgr->legacy_phy_mask & ~hw_state->assigned_phy_mask) << 1;
> +
> +	drm_printf(&p, "Resources=0x%08x, Pool DDIs=DDI TC#{%*pbl}\n",
> +		   hw_state->current_resources, INTEL_DDI_MGR_NUM_PORTS + 1, &pool_ddi_mask);
> +	if (err)
> +		drm_printf(&p, "Configuration failed: %d\n", err);
> +
> +	/* ALT allocations are only a snapshot of firmware assignments. */
> +	drm_printf(&p, "Assigned DDIs:\n");
> +	print_ddi_allocations(&p, mgr, hw_state, err);
> +
> +	if (!err && unassigned_phy_mask)
> +		drm_printf(&p, "Unassigned legacy PHYs=PHY TC#{%*pbl}\n",
> +			   INTEL_DDI_MGR_NUM_PORTS + 1, &unassigned_phy_mask);
> +}
> +
> +static int verify_ddi_pool(struct intel_display *display, u8 pool_ddi_mask)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	int ddi;
> +
> +	if (mgr->pool_ddi_mask && pool_ddi_mask != mgr->pool_ddi_mask) {
> +		drm_dbg_kms(display->drm, "DDIMGR: DDI pool changed: expected %#x, read %#x\n",
> +			    mgr->pool_ddi_mask, pool_ddi_mask);
> +
> +		return -EINVAL;
> +	}
> +
> +	if (mgr->legacy_phy_mask & ~pool_ddi_mask) {
> +		drm_err(display->drm,
> +			"DDIMGR: Legacy PHYs missing from DDI pool: legacy=0x%02x pool=0x%02x\n",
> +			mgr->legacy_phy_mask, pool_ddi_mask);
> +
> +		return -EINVAL;
> +	}
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		const struct intel_bios_encoder_data *vbt;
> +		bool alt_mode;
> +
> +		if (!(pool_ddi_mask & BIT(ddi)))
> +			continue;
> +
> +		vbt = intel_bios_encoder_data_lookup(display, ddi_to_port(ddi));
> +		if (!vbt) {
> +			drm_err(display->drm, "DDIMGR: Missing VBT data for pool DDI%d\n", ddi);
> +
> +			return -EINVAL;
> +		}
> +
> +		if (intel_bios_encoder_is_dedicated_external(vbt) ||
> +		    intel_bios_encoder_supports_edp(vbt) ||
> +		    intel_bios_encoder_supports_dsi(vbt) || intel_bios_encoder_is_lspcon(vbt)) {
> +			drm_err(display->drm,
> +				"DDIMGR: Unsupported pool DDI%d: dedicated=%d eDP=%d DSI=%d LSPCON=%d\n",
> +				ddi, intel_bios_encoder_is_dedicated_external(vbt),
> +				intel_bios_encoder_supports_edp(vbt),
> +				intel_bios_encoder_supports_dsi(vbt),
> +				intel_bios_encoder_is_lspcon(vbt));
> +
> +			return -EINVAL;
> +		}
> +
> +		alt_mode = intel_bios_encoder_supports_typec_usb(vbt) ||
> +			intel_bios_encoder_supports_tbt(vbt);
> +		if (alt_mode == !!(mgr->legacy_phy_mask & BIT(ddi))) {
> +			drm_err(display->drm,
> +				"DDIMGR: Invalid VBT modes for pool DDI%d: alt=%d dyn-legacy=%d\n",
> +				ddi, alt_mode, !!(mgr->legacy_phy_mask & BIT(ddi)));
> +
> +			return -EINVAL;
> +		}
> +	}
> +
> +	return 0;
> +}
> +
> +static int verify_ddc_pins(struct intel_display *display, u8 pool_ddi_mask)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	enum port port;
> +	int err = 0;
> +
> +	for (port = PORT_A; port < I915_MAX_PORTS; port++) {
> +		const struct intel_bios_encoder_data *vbt;
> +		int pin;
> +
> +		if (port >= PORT_TC1 && port <= PORT_TC4 &&
> +		    pool_ddi_mask & BIT(port - PORT_TC1))
> +			continue;
> +
> +		vbt = intel_bios_encoder_data_lookup(display, port);
> +		if (!vbt || (!intel_bios_encoder_supports_hdmi(vbt) &&
> +			     !intel_bios_encoder_supports_dvi(vbt)))
> +			continue;
> +
> +		pin = intel_bios_hdmi_ddc_pin(vbt);
> +		/* Match intel_hdmi_default_ddc_pin() for non-pool encoders. */
> +		if (!pin)
> +			pin = intel_port_to_phy(display, port) + 1;
> +
> +		if (pin >= GMBUS_NUM_PINS)
> +			continue;
> +
> +		if (!(mgr->ddc_pins & BIT(pin)))
> +			continue;
> +
> +		drm_err(display->drm, "DDIMGR: DDI pool DDC pin %d also used by port %c\n",
> +			pin, port_name(port));
> +
> +		err = -EINVAL;
> +	}
> +
> +	return err;
> +}
> +
> +/* Record the DDI's mode and legacy PHY in software. */
> +static void record_ddi_route(struct intel_ddi_route *route, enum tc_port legacy_phy)
> +{
> +	route->phy = legacy_phy;
> +	route->mode = legacy_phy == TC_PORT_NONE ?
> +		INTEL_DDI_ROUTE_ALT : INTEL_DDI_ROUTE_LEGACY;
> +}
> +
> +static void fallback_to_alt(struct intel_ddi_mgr *mgr)
> +{
> +	int ddi;
> +
> +	mgr->enabled = false;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		if (!(mgr->pool_ddi_mask & BIT(ddi)))
> +			continue;
> +
> +		record_ddi_route(&mgr->route[ddi], TC_PORT_NONE);
> +	}
> +}
> +
> +static int readout_ddi_resource(struct intel_display *display, int ddi,
> +				struct intel_ddi_hw_state *hw_state)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	u32 consumer = IOM_DDI_CONSUMER_GET(hw_state->current_resources, ddi);
> +	enum tc_port phy;
> +
> +	if (ddi < INTEL_DDI_MGR_NUM_PORTS)
> +		record_ddi_route(&hw_state->route[ddi], TC_PORT_NONE);
> +
> +	if (hw_state->pool_ddi_mask & BIT(ddi) &&
> +	    intel_de_read(display, DDI_BUF_CTL(ddi_to_port(ddi))) & DDI_BUF_CTL_ENABLE)
> +		hw_state->busy_ddi_mask |= BIT(ddi);
> +
> +	if (!consumer_is_dpalt_legacy(consumer))
> +		return 0;
> +
> +	phy = consumer_to_phy(consumer);
> +
> +	/* The IOM also assigns PHY consumers for DP-alt ports. */
> +	if (!(mgr->legacy_phy_mask & BIT(phy)))
> +		return 0;
> +
> +	/* Reject legacy PHY assignments outside the supported DDI range. */
> +	if (ddi >= INTEL_DDI_MGR_NUM_PORTS) {
> +		drm_err(display->drm,
> +			"DDIMGR: Legacy PHY%d assigned to unsupported DDI%d (resources 0x%08x)\n",
> +			phy, ddi, hw_state->current_resources);
> +
> +		return -EOPNOTSUPP;
> +	}
> +
> +	/* Reject duplicate legacy PHY assignments. */
> +	if (hw_state->assigned_phy_mask & BIT(phy)) {
> +		drm_err(display->drm,
> +			"DDIMGR: Duplicate legacy PHY%d assignment at DDI%d (resources 0x%08x)\n",
> +			phy, ddi, hw_state->current_resources);
> +
> +		return -EINVAL;
> +	}
> +
> +	record_ddi_route(&hw_state->route[ddi], phy);
> +	hw_state->assigned_phy_mask |= BIT(phy);
> +
> +	return 0;
> +}
> +
> +static int ddi_mgr_readout_hw_state(struct intel_display *display,
> +				    struct intel_ddi_hw_state *hw_state)
> +{
> +	int ddi, err;
> +
> +	hw_state->current_resources = intel_de_read(display, IOM_DP_RESOURCE_MNG);
> +	hw_state->inherited_resources = hw_state->current_resources;
> +	hw_state->pool_ddi_mask = resource_to_pool_ddi_mask(hw_state->current_resources);
> +	hw_state->busy_ddi_mask = 0;
> +	hw_state->assigned_phy_mask = 0;
> +	hw_state->allocated_ddi_mask = 0;
> +
> +	for (ddi = 0; ddi < IOM_DDI_NUM_SLOTS; ddi++) {
> +		err = readout_ddi_resource(display, ddi, hw_state);
> +		if (err)
> +			return err;
> +	}
> +
> +	return 0;
> +}
> +
> +static int ddi_mgr_verify_hw_state(struct intel_display *display,
> +				   const struct intel_ddi_hw_state *hw_state)
> +{
> +	int err;
> +
> +	verify_ddi_counts(display, hw_state->current_resources);
> +
> +	err = verify_ddi_pool(display, hw_state->pool_ddi_mask);
> +	if (err)
> +		return err;
> +
> +	return verify_ddc_pins(display, hw_state->pool_ddi_mask);
> +}
> +
> +static void ddi_mgr_store_hw_state(struct intel_ddi_mgr *mgr,
> +				   const struct intel_ddi_hw_state *hw_state)
> +{
> +	memcpy(mgr->route, hw_state->route, sizeof(mgr->route));
> +	mgr->pool_ddi_mask = hw_state->pool_ddi_mask;
> +}
> +
> +static int find_free_ddi(u8 ddi_mask, u32 resources)
> +{
> +	int ddi;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		if (!(ddi_mask & BIT(ddi)))
> +			continue;
> +
> +		if (IOM_DDI_CONSUMER_GET(resources, ddi) != IOM_DDI_CONSUMER_FREE)
> +			continue;
> +
> +		return ddi;
> +	}
> +
> +	return -ENOSPC;
> +}
> +
> +static int legacy_phy_to_ddi(const struct intel_ddi_route *routes, enum tc_port phy)
> +{
> +	int ddi;
> +
> +	if (!routes)
> +		return -ENOENT;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		if (routes[ddi].mode != INTEL_DDI_ROUTE_LEGACY)
> +			continue;
> +
> +		if (routes[ddi].phy == phy)
> +			return ddi;
> +	}
> +
> +	return -ENOENT;
> +}
> +
> +static void allocate_ddi_for_phy(struct intel_ddi_hw_state *hw_state,
> +				 u8 ddi_mask, enum tc_port phy)
> +{
> +	int ddi;
> +
> +	ddi = find_free_ddi(ddi_mask, hw_state->current_resources);
> +	if (ddi < 0)
> +		return;
> +
> +	hw_state->current_resources |= IOM_DDI_CONSUMER(ddi, IOM_DDI_CONSUMER_PHY(phy));
> +	hw_state->allocated_ddi_mask |= BIT(ddi);
> +	hw_state->assigned_phy_mask |= BIT(phy);
> +	record_ddi_route(&hw_state->route[ddi], phy);
> +}
> +
> +enum ddi_alloc_policy {
> +	ALLOC_PREVIOUS_DDI,
> +	ALLOC_IDENTITY_DDI,
> +	ALLOC_ANY_FREE_DDI,
> +
> +	ALLOC_POLICY_NUM,
> +};
> +
> +static u8 ddi_mask_for_policy(const struct intel_ddi_hw_state *hw_state,
> +			      enum ddi_alloc_policy policy,
> +			      const struct intel_ddi_route *old_routes, enum tc_port phy)
> +{
> +	u8 ddi_mask = hw_state->pool_ddi_mask & ~hw_state->busy_ddi_mask;
> +	int old_ddi;
> +
> +	switch (policy) {
> +	case ALLOC_PREVIOUS_DDI:
> +		old_ddi = legacy_phy_to_ddi(old_routes, phy);
> +		if (old_ddi < 0)
> +			return 0;
> +
> +		ddi_mask &= BIT(old_ddi);
> +
> +		break;
> +	case ALLOC_IDENTITY_DDI:
> +		ddi_mask &= BIT(phy);
> +
> +		break;
> +	case ALLOC_ANY_FREE_DDI:
> +		break;
> +	default:
> +		MISSING_CASE(policy);
> +		return 0;
> +	}
> +
> +	return ddi_mask;
> +}
> +
> +static int allocate_legacy_ddis(struct intel_display *display,
> +				struct intel_ddi_hw_state *hw_state,
> +				const struct intel_ddi_route *old_routes)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	u32 old_resources = hw_state->current_resources;
> +	u32 new_resources;
> +	enum ddi_alloc_policy policy;
> +	enum tc_port phy;
> +	u32 readback;
> +
> +	/* Prefer previous DDIs, then identity mappings, then any remaining DDI. */
> +	for (policy = ALLOC_PREVIOUS_DDI; policy < ALLOC_POLICY_NUM; policy++) {
> +		for (phy = TC_PORT_1; phy < INTEL_DDI_MGR_NUM_PORTS; phy++) {
> +			u8 ddi_mask;
> +
> +			if (!(mgr->legacy_phy_mask & BIT(phy)))
> +				continue;
> +
> +			if (hw_state->assigned_phy_mask & BIT(phy))
> +				continue;
> +
> +			ddi_mask = ddi_mask_for_policy(hw_state, policy, old_routes, phy);
> +			allocate_ddi_for_phy(hw_state, ddi_mask, phy);
> +		}
> +	}
> +
> +	new_resources = hw_state->current_resources;
> +	if (new_resources == old_resources)
> +		return 0;
> +
> +	intel_de_write(display, IOM_DP_RESOURCE_MNG, new_resources);
> +	readback = intel_de_read(display, IOM_DP_RESOURCE_MNG);
> +	hw_state->current_resources = readback;
> +	if (readback != new_resources) {
> +		drm_err(display->drm, "DDIMGR: DDI write mismatch: requested 0x%08x, read 0x%08x\n",
> +			new_resources, readback);
> +
> +		return -EIO;
> +	}
> +
> +	return 0;
> +}
> +
> +static int configure_ddi_resources(struct intel_display *display,
> +				   const struct intel_ddi_route *old_routes)
> +{
> +	struct intel_ddi_hw_state hw_state;
> +	int err;
> +
> +	err = iom_lock(display);
> +	if (err)
> +		return err;
> +
> +	err = ddi_mgr_readout_hw_state(display, &hw_state);
> +	if (err)
> +		goto out;
> +
> +	err = ddi_mgr_verify_hw_state(display, &hw_state);
> +	if (err)
> +		goto out;
> +
> +	err = allocate_legacy_ddis(display, &hw_state, old_routes);
> +
> +	ddi_mgr_store_hw_state(display->ddi_mgr, &hw_state);
> +
> +out:
> +	iom_unlock(display);
> +
> +	print_ddi_resources(display, &hw_state, err);
> +
> +	return err;
> +}
> +
> +/* Update HPD sources before TC initialization or HPD IRQ enable. */
> +static void update_hpd_sources(struct intel_display *display)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	int ddi;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		const struct intel_ddi_route *route = &mgr->route[ddi];
> +		enum hpd_pin logical_pin = tc_to_hpd_pin(ddi_to_tc(ddi));
> +		enum hpd_pin pch_hw_pin = HPD_NONE;
> +		enum hpd_pin hw_pin = HPD_NONE;
> +
> +		if (!(mgr->pool_ddi_mask & BIT(ddi)))
> +			continue;
> +
> +		if (intel_ddi_mgr_is_enabled(mgr) && route->mode == INTEL_DDI_ROUTE_LEGACY)
> +			pch_hw_pin = tc_to_hpd_pin(route->phy);
> +		else
> +			hw_pin = logical_pin;
> +
> +		intel_hpd_set_pin_sources(display, logical_pin, hw_pin, pch_hw_pin);
> +	}
> +}
> +
> +static int init_ddi_resource(struct intel_display *display, int ddi)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	const struct intel_bios_encoder_data *vbt;
> +	int pin;
> +
> +	record_ddi_route(&mgr->route[ddi], TC_PORT_NONE);
> +
> +	vbt = intel_bios_encoder_data_lookup(display, ddi_to_port(ddi));
> +	if (!vbt || !intel_bios_encoder_supports_dyn_port_over_tc(vbt))
> +		return 0;
> +
> +	mgr->legacy_phy_mask |= BIT(ddi);
> +
> +	if (!intel_bios_encoder_supports_hdmi(vbt) &&
> +	    !intel_bios_encoder_supports_dvi(vbt))
> +		return 0;
> +
> +	mgr->has_hdmi = true;
> +	pin = intel_bios_hdmi_ddc_pin(vbt);
> +	if (!pin)
> +		pin = default_ddc_pin(display, ddi_to_port(ddi));
> +
> +	if (!intel_gmbus_is_valid_pin(display, pin) || mgr->ddc_pins & BIT(pin)) {
> +		drm_err(display->drm, "DDIMGR: Invalid/duplicate legacy DDC pin %d\n", pin);
> +
> +		return -EINVAL;
> +	}
> +
> +	mgr->ddc_pin[ddi] = pin;
> +	mgr->ddc_pins |= BIT(pin);
> +
> +	return 0;
> +}
> +
> +void intel_ddi_mgr_init(struct intel_display *display)
> +{
> +	struct intel_ddi_mgr *mgr;
> +	int ddi, err;
> +
> +	if (DISPLAY_VER(display) < 35)
> +		return;
> +
> +	mgr = drmm_kzalloc(display->drm, sizeof(*mgr), GFP_KERNEL);
> +	if (!mgr)
> +		return;
> +
> +	display->ddi_mgr = mgr;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		err = init_ddi_resource(display, ddi);
> +		if (err)
> +			goto err;
> +	}
> +
> +	if (!mgr->legacy_phy_mask)
> +		goto out_free;
> +
> +	err = configure_ddi_resources(display, NULL);
> +	if (err)
> +		goto err;
> +
> +	mgr->enabled = true;
> +	update_hpd_sources(display);
> +
> +	return;
> +
> +err:
> +	if (mgr->pool_ddi_mask) {
> +		fallback_to_alt(mgr);
> +		drm_err(display->drm,
> +			"DDIMGR: Cannot initialize DDI pool: %d; using ALT mode\n", err);
> +		update_hpd_sources(display);
> +
> +		return;
> +	}
> +
> +	drm_err(display->drm,
> +		"DDIMGR: Cannot initialize DDI pool: %d; using default port configuration\n", err);
> +out_free:
> +	drmm_kfree(display->drm, mgr);
> +	display->ddi_mgr = NULL;
> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
> new file mode 100644
> index 0000000000000..b1793b848c238
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: MIT */
> +/* Copyright © 2026 Intel Corporation */
> +
> +#ifndef __INTEL_DDI_MGR_H__
> +#define __INTEL_DDI_MGR_H__
> +
> +#include <linux/types.h>
> +
> +enum port;
> +
> +struct intel_display;
> +
> +void intel_ddi_mgr_init(struct intel_display *display);
> +
> +bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
> +bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display);
> +
> +#endif
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h
> new file mode 100644
> index 0000000000000..2a65c27a1f099
> --- /dev/null
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr_regs.h
> @@ -0,0 +1,40 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2026 Intel Corporation
> + */
> +
> +#ifndef __INTEL_DDI_MGR_REGS_H__
> +#define __INTEL_DDI_MGR_REGS_H__
> +
> +#include "intel_display_reg_defs.h"
> +
> +#define IOM_HIP_INDEX				_MMIO(0x1010a0)
> +#define  IOM_HIP_INDEX_MASK			REG_GENMASK(3, 0)
> +#define  IOM_HIP_INDEX_RESOURCE_MGMT		REG_FIELD_PREP(IOM_HIP_INDEX_MASK, 1)
> +
> +#define IOM_DP_HW_RESOURCE_SEMAPHORE		_MMIO(0x168038)
> +#define  IOM_DDI_AVAILABLE_MASK			REG_GENMASK(30, 28)
> +#define  IOM_DP_HW_SEMLOCK			REG_BIT(31)
> +#define  IOM_REQUESTOR_ID_MASK			REG_GENMASK(3, 0)
> +#define  IOM_REQUESTOR_ID_IOM			REG_FIELD_PREP(IOM_REQUESTOR_ID_MASK, 0)
> +#define  IOM_REQUESTOR_ID_TBT0			REG_FIELD_PREP(IOM_REQUESTOR_ID_MASK, 1)
> +#define  IOM_REQUESTOR_ID_TBT1			REG_FIELD_PREP(IOM_REQUESTOR_ID_MASK, 2)
> +#define  IOM_REQUESTOR_ID_DISPLAY_ENGINE		REG_FIELD_PREP(IOM_REQUESTOR_ID_MASK, 4)
> +
> +#define IOM_DDI_REPORTED_MAX_FREE		4
> +
> +#define IOM_DDI_NUM_SLOTS			8
> +
> +#define IOM_DP_RESOURCE_MNG			_MMIO(0x16802c)
> +#define  IOM_DDI_CONSUMER_MASK(ddi)		(0xfu << ((ddi) * 4))
> +#define  IOM_DDI_CONSUMER(ddi, consumer)		((u32)(consumer) << ((ddi) * 4))
> +#define  IOM_DDI_CONSUMER_GET(val, ddi)		(((val) >> ((ddi) * 4)) & 0xf)
> +#define  IOM_DDI_CONSUMER_FREE			0x0
> +#define  IOM_DDI_CONSUMER_TBT_DOMAIN_MASK	REG_BIT(2)
> +#define  IOM_DDI_CONSUMER_TBT_DPIN_MASK	REG_GENMASK(1, 0)
> +#define  IOM_DDI_CONSUMER_DPALT_LEGACY	REG_BIT(3)
> +#define  IOM_DDI_CONSUMER_PHY_MASK		REG_GENMASK(2, 0)
> +#define  IOM_DDI_CONSUMER_PHY(phy)		(IOM_DDI_CONSUMER_DPALT_LEGACY | (phy))
> +#define  IOM_DDI_CONSUMER_RESERVED		0xf
> +
> +#endif /* __INTEL_DDI_MGR_REGS_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
> index 72183bfee07a3..ec02f61a13706 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> @@ -41,6 +41,7 @@ struct intel_cdclk_vals;
>  struct intel_color_funcs;
>  struct intel_crtc;
>  struct intel_crtc_state;
> +struct intel_ddi_mgr;
>  struct intel_display_parent_interface;
>  struct intel_dmc;
>  struct intel_dpll_global_funcs;
> @@ -312,6 +313,8 @@ struct intel_display {
>  	/* drm device backpointer */
>  	struct drm_device *drm;
>  
> +	struct intel_ddi_mgr *ddi_mgr;
> +
>  	/* Platform (and subplatform, if any) identification */
>  	struct intel_display_platforms platform;
>  
> diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
> index 52f0d5dd54680..ea8ab7cb16204 100644
> --- a/drivers/gpu/drm/xe/Makefile
> +++ b/drivers/gpu/drm/xe/Makefile
> @@ -263,6 +263,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
>  	i915-display/intel_dbuf_bw.o \
>  	i915-display/intel_ddi.o \
>  	i915-display/intel_ddi_buf_trans.o \
> +	i915-display/intel_ddi_mgr.o \
>  	i915-display/intel_de.o \
>  	i915-display/intel_dip.o \
>  	i915-display/intel_display.o \

-- 
Jani Nikula, Intel

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

* Re: [PATCH 11/13] drm/i915/ddi_mgr: Verify and restore DDI allocations after runtime resume
  2026-11-26 10:07 ` [PATCH 11/13] drm/i915/ddi_mgr: Verify and restore DDI allocations after runtime resume Imre Deak
@ 2026-11-26 13:25   ` Jani Nikula
  0 siblings, 0 replies; 23+ messages in thread
From: Jani Nikula @ 2026-11-26 13:25 UTC (permalink / raw)
  To: Imre Deak, intel-gfx, intel-xe

On Thu, 26 Nov 2026, Imre Deak <imre.deak@intel.com> wrote:
> Check that the IOM resource pool and recorded legacy PHY assignments are
> preserved across runtime suspend. Restore missing legacy assignments to
> their original DDIs when those DDIs are free and the PHYs have no other
> assignment.
>
> Firmware may reuse a legacy DDI while the device is suspended. Track
> allocations that could not be restored separately from the saved routes,
> and report their connectors as disconnected until the allocations can
> be restored. Reject enabling these connectors, including when the loss
> is discovered by the commit's runtime resume, while allowing them to be
> detached.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi_mgr.c  | 123 ++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_ddi_mgr.h  |   2 +
>  drivers/gpu/drm/i915/display/intel_display.c  |  12 +-
>  .../drm/i915/display/intel_display_driver.c   |   3 +
>  drivers/gpu/drm/i915/display/intel_tc.c       |  33 ++++-
>  drivers/gpu/drm/xe/display/xe_display.c       |   3 +
>  6 files changed, 174 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> index 236146a37fc34..8f32e7c8dff27 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> @@ -1,6 +1,7 @@
>  // SPDX-License-Identifier: MIT
>  /* Copyright © 2026 Intel Corporation */
>  
> +#include <linux/compiler.h>
>  #include <linux/iopoll.h>
>  #include <linux/seq_buf.h>
>  #include <linux/string.h>
> @@ -45,6 +46,7 @@ struct intel_ddi_mgr {
>  	struct intel_ddi_route route[INTEL_DDI_MGR_NUM_PORTS];
>  	u8 ddc_pin[INTEL_DDI_MGR_NUM_PORTS];
>  	u8 pool_ddi_mask;
> +	u8 disabled_ddi_mask;
>  	u8 legacy_phy_mask;
>  	u16 ddc_pins;
>  	bool has_hdmi;
> @@ -101,6 +103,16 @@ bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi)
>  		display->ddi_mgr->pool_ddi_mask & BIT(ddi - PORT_TC1);
>  }
>  
> +bool intel_ddi_mgr_is_ddi_disabled(struct intel_display *display, enum port ddi)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +
> +	if (!mgr || ddi < PORT_TC1 || ddi > PORT_TC4)
> +		return false;
> +
> +	return READ_ONCE(mgr->disabled_ddi_mask) & BIT(ddi - PORT_TC1);
> +}
> +
>  bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display)
>  {
>  	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> @@ -165,6 +177,9 @@ bool intel_ddi_mgr_aux_available(struct intel_encoder *encoder)
>  {
>  	struct intel_display *display = to_intel_display(encoder);
>  
> +	if (intel_ddi_mgr_is_ddi_disabled(display, encoder->port))
> +		return false;
> +
>  	if (!intel_ddi_mgr_is_pool_ddi(display, encoder->port))
>  		return true;
>  
> @@ -193,6 +208,9 @@ bool intel_ddi_mgr_connector_available(struct intel_connector *connector)
>  		return true;
>  
>  	encoder = &dig_port->base;
> +	if (intel_ddi_mgr_is_ddi_disabled(display, encoder->port))
> +		return false;
> +
>  	if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA)
>  		return intel_ddi_mgr_is_legacy_pool_encoder(encoder) &&
>  			(intel_bios_encoder_supports_hdmi(encoder->devdata) ||
> @@ -822,6 +840,111 @@ static void update_hpd_sources(struct intel_display *display)
>  	}
>  }
>  
> +static u8 legacy_ddi_mismatch_mask(const struct intel_ddi_mgr *mgr, u32 resources)
> +{
> +	u8 ddi_mask = 0;
> +	int ddi;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		const struct intel_ddi_route *route = &mgr->route[ddi];
> +
> +		if (!(mgr->pool_ddi_mask & BIT(ddi)) ||
> +		    route->mode != INTEL_DDI_ROUTE_LEGACY)
> +			continue;
> +
> +		if (IOM_DDI_CONSUMER_GET(resources, ddi) !=
> +		    IOM_DDI_CONSUMER_PHY(route->phy))
> +			ddi_mask |= BIT(ddi);
> +	}
> +
> +	return ddi_mask;
> +}
> +
> +static u32 restore_legacy_allocations(struct intel_display *display, u32 resources)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	u32 new_resources = resources;
> +	u32 readback;
> +	int ddi, slot;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++) {
> +		const struct intel_ddi_route *route = &mgr->route[ddi];
> +		u32 consumer = IOM_DDI_CONSUMER_GET(resources, ddi);
> +
> +		if (!(mgr->pool_ddi_mask & BIT(ddi)) || route->mode != INTEL_DDI_ROUTE_LEGACY)
> +			continue;
> +
> +		if (consumer != IOM_DDI_CONSUMER_FREE)
> +			continue;
> +
> +		for (slot = 0; slot < IOM_DDI_NUM_SLOTS; slot++)
> +			if (IOM_DDI_CONSUMER_GET(resources, slot) ==
> +			    IOM_DDI_CONSUMER_PHY(route->phy))
> +				break;
> +
> +		if (slot < IOM_DDI_NUM_SLOTS)
> +			continue;
> +
> +		new_resources |= IOM_DDI_CONSUMER(ddi, IOM_DDI_CONSUMER_PHY(route->phy));
> +	}
> +
> +	if (new_resources == resources)
> +		return resources;
> +
> +	intel_de_write(display, IOM_DP_RESOURCE_MNG, new_resources);
> +	readback = intel_de_read(display, IOM_DP_RESOURCE_MNG);
> +	if (readback != new_resources)
> +		drm_err(display->drm,
> +			"DDIMGR: DDI restore mismatch: requested 0x%08x, read 0x%08x\n",
> +			new_resources, readback);
> +
> +	return readback;
> +}
> +
> +void intel_ddi_mgr_verify_state(struct intel_display *display)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	u8 old_disabled_ddi_mask, disabled_ddi_mask;
> +	u32 resources;
> +	int err;
> +
> +	if (!intel_ddi_mgr_is_enabled(mgr))
> +		return;
> +
> +	old_disabled_ddi_mask = READ_ONCE(mgr->disabled_ddi_mask);
> +
> +	err = iom_lock(display);
> +	if (err)
> +		return;
> +
> +	resources = intel_de_read(display, IOM_DP_RESOURCE_MNG);
> +	verify_ddi_counts(display, resources);
> +
> +	err = verify_ddi_pool(display, resource_to_pool_ddi_mask(resources));
> +	if (err)
> +		goto out;
> +
> +	if (!legacy_ddi_mismatch_mask(mgr, resources))
> +		goto out;
> +
> +	drm_dbg_kms(display->drm,
> +		    "DDIMGR: Legacy DDI allocations changed during runtime suspend: 0x%08x\n",
> +		    resources);
> +
> +	resources = restore_legacy_allocations(display, resources);
> +
> +out:
> +	iom_unlock(display);
> +
> +	disabled_ddi_mask = legacy_ddi_mismatch_mask(mgr, resources);
> +	if (disabled_ddi_mask == old_disabled_ddi_mask)
> +		return;
> +
> +	WRITE_ONCE(mgr->disabled_ddi_mask, disabled_ddi_mask);
> +	drm_dbg_kms(display->drm, "DDIMGR: Disabled DDIs: 0x%02x -> 0x%02x\n",
> +		    old_disabled_ddi_mask, disabled_ddi_mask);
> +}
> +
>  static int init_ddi_resource(struct intel_display *display, int ddi)
>  {
>  	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
> index db10d0e8b3a97..fddd69564b84d 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
> @@ -14,8 +14,10 @@ struct intel_display;
>  struct intel_encoder;
>  
>  void intel_ddi_mgr_init(struct intel_display *display);
> +void intel_ddi_mgr_verify_state(struct intel_display *display);
>  
>  bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
> +bool intel_ddi_mgr_is_ddi_disabled(struct intel_display *display, enum port ddi);
>  bool intel_ddi_mgr_pool_supports_hdmi(struct intel_display *display);
>  bool intel_ddi_mgr_is_legacy_pool_encoder(struct intel_encoder *encoder);
>  bool intel_ddi_mgr_encoder_has_lane_reversal(struct intel_encoder *encoder);
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 19caae633d29f..1c03e801e21cd 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -68,6 +68,7 @@
>  #include "intel_cursor_regs.h"
>  #include "intel_cx0_phy.h"
>  #include "intel_ddi.h"
> +#include "intel_ddi_mgr.h"
>  #include "intel_de.h"
>  #include "intel_dip.h"
>  #include "intel_display_driver.h"
> @@ -6812,7 +6813,16 @@ int intel_atomic_check(struct drm_device *dev,
>  
>  static int intel_atomic_prepare_commit(struct intel_atomic_state *state)
>  {
> -	int ret;
> +	struct drm_connector *connector;
> +	struct drm_connector_state *conn_state;
> +	int i, ret;
> +
> +	/* Runtime resume may have invalidated a DDI after atomic check. */
> +	for_each_new_connector_in_state(&state->base, connector, conn_state, i) {
> +		if (conn_state->crtc &&
> +		    !intel_ddi_mgr_connector_available(to_intel_connector(connector)))
> +			return -ENODEV;
> +	}
>  
>  	ret = drm_atomic_helper_prepare_planes(state->base.dev, &state->base);
>  	if (ret < 0)
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index c13471a5a10e7..b018608eae032 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -30,6 +30,7 @@
>  #include "intel_crtc.h"
>  #include "intel_cursor.h"
>  #include "intel_dbuf_bw.h"
> +#include "intel_ddi_mgr.h"
>  #include "intel_de.h"
>  #include "intel_display_clock_gating.h"
>  #include "intel_display_core.h"
> @@ -962,6 +963,8 @@ void intel_display_driver_pm_runtime_resume_early(struct intel_display *display)
>  /* after irq resume */
>  void intel_display_driver_pm_runtime_resume(struct intel_display *display)
>  {
> +	intel_ddi_mgr_verify_state(display);
> +
>  	/*
>  	 * On VLV/CHV display interrupts are part of the display
>  	 * power well, so hpd is reinitialized from there. For
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> index f878494bcb388..e01f367007424 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -10,6 +10,7 @@
>  #include "intel_atomic.h"
>  #include "intel_cx0_phy_regs.h"
>  #include "intel_ddi.h"
> +#include "intel_ddi_mgr.h"
>  #include "intel_de.h"
>  #include "intel_display.h"
>  #include "intel_display_driver.h"
> @@ -1173,6 +1174,17 @@ static void xelpdp_tc_phy_get_hw_state(struct intel_tc_port *tc)
>  
>  	tc_cold_wref = __tc_cold_block(tc, &domain);
>  
> +	if (intel_ddi_mgr_is_ddi_disabled(display, tc->dig_port->base.port)) {
> +		tc->mode = TC_PORT_DISCONNECTED;
> +		drm_dbg_kms(display->drm,
> +			    "Port %s: skipping PHY readout, legacy DDI allocation unavailable\n",
> +			    tc->port_name);
> +
> +		__tc_cold_unblock(tc, domain, tc_cold_wref);
> +
> +		return;
> +	}
> +
>  	tc->mode = tc_phy_get_current_mode(tc);
>  	if (tc->mode != TC_PORT_DISCONNECTED) {
>  		tc->lock_wakeref = tc_cold_block(tc);
> @@ -1195,6 +1207,8 @@ static void xelpdp_tc_phy_get_hw_state(struct intel_tc_port *tc)
>  
>  static bool xelpdp_tc_phy_connect(struct intel_tc_port *tc, int required_lanes)
>  {
> +	struct intel_display *display = to_intel_display(tc->dig_port);
> +
>  	tc->lock_wakeref = tc_cold_block(tc);
>  
>  	if (tc->mode == TC_PORT_TBT_ALT) {
> @@ -1203,6 +1217,10 @@ static bool xelpdp_tc_phy_connect(struct intel_tc_port *tc, int required_lanes)
>  		return true;
>  	}
>  
> +	/* AUX transfers and modesets reject DDIs without their legacy allocation. */
> +	if (intel_ddi_mgr_is_ddi_disabled(display, tc->dig_port->base.port))
> +		return true;
> +
>  	if (!xelpdp_tc_phy_enable_tcss_power(tc, true))
>  		goto out_unblock_tccold;
>  
> @@ -1227,6 +1245,14 @@ static bool xelpdp_tc_phy_connect(struct intel_tc_port *tc, int required_lanes)
>  
>  static void xelpdp_tc_phy_disconnect(struct intel_tc_port *tc)
>  {
> +	struct intel_display *display = to_intel_display(tc->dig_port);
> +
> +	if (intel_ddi_mgr_is_ddi_disabled(display, tc->dig_port->base.port)) {
> +		tc_cold_unblock(tc, fetch_and_zero(&tc->lock_wakeref));
> +
> +		return;
> +	}
> +
>  	switch (tc->mode) {
>  	case TC_PORT_LEGACY:
>  	case TC_PORT_DP_ALT:
> @@ -1733,6 +1759,9 @@ bool intel_tc_port_connected(struct intel_encoder *encoder)
>  
>  	drm_WARN_ON(display->drm, !intel_tc_port_ref_held(dig_port));
>  
> +	if (intel_ddi_mgr_is_ddi_disabled(display, encoder->port))
> +		return false;
> +
>  	if (tc->mode != TC_PORT_DISCONNECTED)
>  		mask = BIT(tc->mode);
>  
> @@ -1880,7 +1909,9 @@ static void __intel_tc_port_lock(struct intel_tc_port *tc,
>  					  false);
>  
>  	drm_WARN_ON(display->drm, tc->mode == TC_PORT_DISCONNECTED);
> -	drm_WARN_ON(display->drm, tc->mode != TC_PORT_TBT_ALT && !tc_phy_is_owned(tc));
> +	drm_WARN_ON(display->drm,
> +		    !intel_ddi_mgr_is_ddi_disabled(display, tc->dig_port->base.port) &&
> +		    tc->mode != TC_PORT_TBT_ALT && !tc_phy_is_owned(tc));
>  }
>  
>  void intel_tc_port_lock(struct intel_digital_port *dig_port)
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index f757cfad4bd6e..b36a7cc83420d 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -13,6 +13,7 @@
>  #include <drm/intel/display_member.h>
>  #include <drm/intel/display_parent_interface.h>
>  
> +#include "intel_ddi_mgr.h"
>  #include "intel_display.h"
>  #include "intel_display_core.h"
>  #include "intel_display_device.h"
> @@ -340,6 +341,8 @@ static void xe_display_disable_d3cold(struct xe_device *xe)
>  
>  	intel_dmc_resume(display);
>  
> +	intel_ddi_mgr_verify_state(display);

The direction *must* be to add all of this stuff to display, not diverge
i915 and xe more.


> +
>  	if (intel_display_device_present(display))
>  		drm_mode_config_reset(&xe->drm);

-- 
Jani Nikula, Intel

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

* Re: [PATCH 12/13] drm/i915/ddi_mgr: Handle DDI pool system suspend and resume
  2026-11-26 10:07 ` [PATCH 12/13] drm/i915/ddi_mgr: Handle DDI pool system suspend and resume Imre Deak
  2026-11-26 10:41   ` sashiko-bot
@ 2026-11-26 13:25   ` Jani Nikula
  1 sibling, 0 replies; 23+ messages in thread
From: Jani Nikula @ 2026-11-26 13:25 UTC (permalink / raw)
  To: Imre Deak, intel-gfx, intel-xe

On Thu, 26 Nov 2026, Imre Deak <imre.deak@intel.com> wrote:
> Firmware may change DDI assignments during system suspend. Rebuild the
> legacy routes on normal resume after IRQ postinstall masks HPD, and
> refresh encoder VBT data, Type-C mode and lane reversal before hardware
> readout and modeset restore. Update the logical HPD pin to HW IRQ source
> mappings while keeping each encoder's logical pin fixed, so HPD block
> counts need not be moved between pins.
>
> Keep legacy assignments found in hardware. When a legacy PHY needs a
> new assignment, prefer its pre-suspend DDI before identity or other free
> DDIs, keeping the same DRM connector where possible.
>
> Rebuild source and common link limits when a route changes, resetting
> link-training/recovery state while retaining cached sink capabilities
> for normal resume and detection.
>
> Disable pool DDC adapters during suspend and restore their routes before
> the resume modeset. On failed xe suspend recovery, preserve cached
> allocations and HPD mappings because HW HPD IRQs stayed enabled
> throughout the sequence.
>
> When restoring the pre-suspend display configuration, reject modesets
> for HDMI connectors whose encoders no longer serve HDMI-capable legacy
> PHYs, or DP connectors whose encoders now serve legacy PHYs without DP
> support. If DDI configuration fails, switch the pool encoders to ALT-only
> operation, allowing DP restores while keeping HDMI unavailable.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi_mgr.c  | 77 +++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_ddi_mgr.h  |  2 +
>  .../drm/i915/display/intel_display_driver.c   |  1 +
>  drivers/gpu/drm/i915/display/intel_dp.c       |  9 +++
>  drivers/gpu/drm/i915/display/intel_dp.h       |  1 +
>  drivers/gpu/drm/i915/display/intel_tc.c       | 13 ++++
>  drivers/gpu/drm/i915/display/intel_tc.h       |  1 +
>  drivers/gpu/drm/i915/i915_driver.c            |  7 ++
>  drivers/gpu/drm/xe/display/xe_display.c       |  6 ++
>  9 files changed, 117 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> index 8f32e7c8dff27..a0157ff6afc04 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.c
> @@ -840,6 +840,83 @@ static void update_hpd_sources(struct intel_display *display)
>  	}
>  }
>  
> +void intel_ddi_mgr_suspend(struct intel_display *display)
> +{
> +	if (!intel_ddi_mgr_is_enabled(display->ddi_mgr))
> +		return;
> +
> +	intel_gmbus_ddi_pool_update(display, false);
> +}
> +
> +static void resume_ddi_resource(struct intel_display *display,
> +				struct intel_encoder *encoder,
> +				const struct intel_ddi_route *old_route)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	struct intel_digital_port *dig_port;
> +	const struct intel_ddi_route *route;
> +
> +	if (!encoder)
> +		return;
> +
> +	route = &mgr->route[encoder->port - PORT_TC1];
> +	dig_port = enc_to_dig_port(encoder);
> +	encoder->devdata = intel_ddi_mgr_get_devdata_for_ddi(display, encoder->port);
> +	intel_tc_port_set_legacy(dig_port, mgr->enabled &&
> +				route->mode == INTEL_DDI_ROUTE_LEGACY);
> +	dig_port->lane_reversal = intel_ddi_mgr_encoder_has_lane_reversal(encoder);
> +
> +	if (mgr->enabled && old_route->mode == route->mode &&
> +	    old_route->phy == route->phy)
> +		return;
> +
> +	intel_dp_update_source_caps(&dig_port->dp);
> +}
> +
> +static void resume_ddi_resources(struct intel_display *display)
> +{
> +	struct intel_ddi_mgr *mgr = display->ddi_mgr;
> +	struct intel_encoder *encoders[INTEL_DDI_MGR_NUM_PORTS] = {};
> +	struct intel_ddi_route old_route[INTEL_DDI_MGR_NUM_PORTS];
> +	struct intel_encoder *encoder;
> +	int ddi, err;
> +
> +	/* Only normal resume gets here, with HPD masked by IRQ postinstall. */
> +	memcpy(old_route, mgr->route, sizeof(old_route));
> +
> +	err = configure_ddi_resources(display, old_route);
> +	WRITE_ONCE(mgr->disabled_ddi_mask, 0);
> +	if (err)
> +		fallback_to_alt(mgr);
> +	else
> +		mgr->enabled = true;
> +
> +	update_hpd_sources(display);
> +
> +	if (err)
> +		drm_err(display->drm, "DDIMGR: Cannot restore DDI pool: %d; using ALT mode\n", err);
> +
> +	for_each_intel_encoder(display->drm, encoder)
> +		if (encoder->type == INTEL_OUTPUT_DDI &&
> +		    intel_ddi_mgr_is_pool_ddi(display, encoder->port))
> +			encoders[encoder->port - PORT_TC1] = encoder;
> +
> +	for (ddi = 0; ddi < INTEL_DDI_MGR_NUM_PORTS; ddi++)
> +		resume_ddi_resource(display, encoders[ddi], &old_route[ddi]);
> +}
> +
> +void intel_ddi_mgr_resume(struct intel_display *display, bool suspend_failed)
> +{
> +	if (!display->ddi_mgr)
> +		return;
> +
> +	/* Failed suspend leaves HPD IRQs enabled: preserve cached assignments. */
> +	if (!suspend_failed)
> +		resume_ddi_resources(display);
> +
> +	intel_gmbus_ddi_pool_update(display, true);
> +}
> +
>  static u8 legacy_ddi_mismatch_mask(const struct intel_ddi_mgr *mgr, u32 resources)
>  {
>  	u8 ddi_mask = 0;
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
> index fddd69564b84d..6ddb30e826d4c 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
> +++ b/drivers/gpu/drm/i915/display/intel_ddi_mgr.h
> @@ -14,6 +14,8 @@ struct intel_display;
>  struct intel_encoder;
>  
>  void intel_ddi_mgr_init(struct intel_display *display);
> +void intel_ddi_mgr_suspend(struct intel_display *display);
> +void intel_ddi_mgr_resume(struct intel_display *display, bool suspend_failed);
>  void intel_ddi_mgr_verify_state(struct intel_display *display);
>  
>  bool intel_ddi_mgr_is_pool_ddi(struct intel_display *display, enum port ddi);
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index b018608eae032..a9b03b4a1e76b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -780,6 +780,7 @@ static int __intel_display_driver_pm_suspend(struct intel_display *display, bool
>  	intel_display_driver_suspend_access(display);
>  
>  	intel_encoder_suspend_all(display);
> +	intel_ddi_mgr_suspend(display);
>  
>  	intel_dmc_suspend(display);
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 6f03a169931eb..60f041bd62979 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -702,6 +702,15 @@ static bool intel_dp_set_common_link_params(struct intel_dp *intel_dp)
>  	return params_changed;
>  }
>  
> +/* Rebuild source limits after selecting a different physical port's VBT data. */
> +void intel_dp_update_source_caps(struct intel_dp *intel_dp)
> +{
> +	intel_dp_set_source_rates(intel_dp);
> +	intel_dp->reset_link_params = true;
> +	intel_dp_set_common_link_params(intel_dp);
> +	intel_dp_reset_link_params(intel_dp);
> +}
> +
>  u32 intel_dp_mode_to_fec_clock(u32 mode_clock)
>  {
>  	return div_u64(mul_u32_u32(mode_clock, DP_DSC_FEC_OVERHEAD_FACTOR),
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index 36cd340d809f2..072facf627eba 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -59,6 +59,7 @@ void intel_dp_connector_sync_state(struct intel_connector *connector,
>  void intel_dp_set_link_params(struct intel_dp *intel_dp,
>  			      int link_rate, int lane_count);
>  void intel_dp_set_source_rates(struct intel_dp *intel_dp);
> +void intel_dp_update_source_caps(struct intel_dp *intel_dp);
>  int intel_dp_get_active_pipes(struct intel_dp *intel_dp,
>  			      struct drm_modeset_acquire_ctx *ctx,
>  			      u8 *pipe_mask);
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> index e01f367007424..df591966e08ef 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -1595,6 +1595,19 @@ static bool tc_port_is_enabled(struct intel_tc_port *tc)
>  	       DDI_BUF_CTL_ENABLE;
>  }
>  
> +void intel_tc_port_set_legacy(struct intel_digital_port *dig_port, bool legacy)
> +{
> +	struct intel_display *display = to_intel_display(dig_port);
> +	struct intel_tc_port *tc = to_tc_port(dig_port);
> +
> +	mutex_lock(&tc->lock);
> +
> +	drm_WARN_ON(display->drm, tc->mode != TC_PORT_DISCONNECTED || tc->link_refcount);
> +	tc->legacy_port = legacy;
> +
> +	mutex_unlock(&tc->lock);
> +}
> +
>  /**
>   * intel_tc_port_init_mode: Read out HW state and init the given port's TypeC mode
>   * @dig_port: digital port
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.h b/drivers/gpu/drm/i915/display/intel_tc.h
> index 6719aea5bd582..6d32eeb91d8da 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.h
> +++ b/drivers/gpu/drm/i915/display/intel_tc.h
> @@ -96,6 +96,7 @@ void intel_tc_port_set_fia_lane_count(struct intel_digital_port *dig_port,
>  				      int required_lanes);
>  
>  void intel_tc_port_init_mode(struct intel_digital_port *dig_port);
> +void intel_tc_port_set_legacy(struct intel_digital_port *dig_port, bool legacy);
>  void intel_tc_port_sanitize_mode(struct intel_digital_port *dig_port,
>  				 const struct intel_crtc_state *crtc_state);
>  void intel_tc_port_lock(struct intel_digital_port *dig_port);
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 923b239714b7e..8f87ad87d45ac 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -54,6 +54,7 @@
>  #include "display/i9xx_display_sr.h"
>  #include "display/intel_cdclk.h"
>  #include "display/intel_crtc.h"
> +#include "display/intel_ddi_mgr.h"
>  #include "display/intel_display_device.h"
>  #include "display/intel_display_driver.h"
>  #include "display/intel_display_power.h"
> @@ -1237,6 +1238,12 @@ static int i915_drm_resume(struct drm_device *dev)
>  	 */
>  	intel_irq_resume(dev_priv);
>  
> +	/*
> +	 * TODO: Move this to display code, keeping it before
> +	 * drm_mode_config_reset().
> +	 */

Why not do it now?

> +	intel_ddi_mgr_resume(display, false);
> +
>  	if (intel_display_device_present(display))
>  		drm_mode_config_reset(dev);
>  
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index b36a7cc83420d..a267dc9ed93d4 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -301,6 +301,12 @@ void xe_display_pm_resume(struct xe_device *xe, bool suspend_failed)
>  
>  	intel_dmc_resume(display);
>  
> +	/*
> +	 * TODO: Move this to display code, keeping it before
> +	 * drm_mode_config_reset().
> +	 */
> +	intel_ddi_mgr_resume(display, suspend_failed);
> +
>  	if (intel_display_device_present(display))
>  		drm_mode_config_reset(&xe->drm);

-- 
Jani Nikula, Intel

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

* ✗ CI.checkpatch: warning for drm/i915/ddi_mgr: Add support for dynamic DDI allocation
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (12 preceding siblings ...)
  2026-11-26 10:07 ` [PATCH 13/13] drm/i915/ddi_mgr: Enable dynamic DDI allocation at load Imre Deak
@ 2026-11-26 14:08 ` Patchwork
  2026-11-26 14:10 ` ✓ CI.KUnit: success " Patchwork
  2026-11-26 14:49 ` ✓ Xe.CI.BAT: " Patchwork
  15 siblings, 0 replies; 23+ messages in thread
From: Patchwork @ 2026-11-26 14:08 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-xe

== Series Details ==

Series: drm/i915/ddi_mgr: Add support for dynamic DDI allocation
URL   : https://patchwork.freedesktop.org/series/179738/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
3009867cd31863246e4afc138520a7a8bd37bb11
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit fe4ed4a5d9206747219118303838c1f3600bfa3d
Author: Imre Deak <imre.deak@intel.com>
Date:   Thu Nov 26 12:07:53 2026 +0200

    drm/i915/ddi_mgr: Enable dynamic DDI allocation at load
    
    Initialize and enable the DDI manager before GMBUS and output setup so
    legacy DDI allocations and HPD source mappings are ready when adapters
    and encoders are created. Reconfigure the DDI assignments and encoder
    mappings during system resume.
    
    For now, this enables only static legacy DDI allocation. Legacy DDIs are
    inherited from BIOS or allocated only during driver loading and system
    resume, and these assignments remain unchanged during runtime. Runtime
    reallocation support will be added in a follow-up series.
    
    Signed-off-by: Imre Deak <imre.deak@intel.com>
+ /mt/dim checkpatch 6dfee524c812864b095a18926620cfff58bd6e6f drm-intel
e71ca84c00f1 drm/i915/dp: Allow rebuilding the source rate list
1eee975839b6 drm/i915/hotplug: Set detector enable bits without a clear mask
281d4ca38637 drm/i915/nvl+: Add support for remapping logical HPD pins to HW pins
-:58: CHECK:BRACES: braces {} should be used on all arms of this statement
#58: FILE: drivers/gpu/drm/i915/display/intel_hotplug_irq.c:157:
+	if (DISPLAY_VER(display) >= 35) {
[...]
+	} else if (DISPLAY_VER(display) >= 14)
[...]
 	else if (DISPLAY_VER(display) >= 11)
[...]

-:74: CHECK:BRACES: braces {} should be used on all arms of this statement
#74: FILE: drivers/gpu/drm/i915/display/intel_hotplug_irq.c:183:
+	if (DISPLAY_VER(display) >= 35) {
[...]
+	} else if (INTEL_PCH_TYPE(display) >= PCH_MTL)
[...]
 	else if (INTEL_PCH_TYPE(display) >= PCH_DG1)
[...]

-:113: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#113: FILE: drivers/gpu/drm/i915/display/intel_hotplug_irq.c:230:
+	if (drm_WARN_ON(display->drm, pch_hw_pin != HPD_NONE &&
+				      (pch_hw_pin < HPD_PORT_TC1 || pch_hw_pin > HPD_PORT_TC4)))

-:129: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#129: FILE: drivers/gpu/drm/i915/display/intel_hotplug_irq.c:610:
+static void xe3plpd_tc_hpd_pins(struct intel_display *display,
+			      u32 *pin_mask, u32 *long_mask,

-:163: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#163: FILE: drivers/gpu/drm/i915/display/intel_hotplug_irq.c:658:
+			xe3plpd_tc_hpd_pins(display, &pin_mask, &long_mask,
+					   tc_hotplug_trigger, dig_hotplug_reg);

total: 0 errors, 0 warnings, 5 checks, 201 lines checked
ffebfbb5fa4e drm/xe/display: Distinguish failed system suspend recovery
e898bd015a8b drm/i915/gmbus: Extract a helper for Type-C DDC pin mapping
3ca1cfc34a3b drm/i915/ddi_mgr: Add support for dynamic DDI allocation
-:78: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#78: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 895 lines checked
b4232a4a251f drm/i915/gmbus: Extract adapter creation and destruction
53fab5d23e66 drm/i915/gmbus: Add stable DDC adapters for the DDI pool
9e73c2d7cbc2 drm/i915/ddi_mgr: Register encoders with dynamic DDI support
6559d1a5b27f drm/i915/ddi_mgr: Keep AUX access consistent with DDI pool routes
5ad9baee5fe7 drm/i915/ddi_mgr: Verify and restore DDI allocations after runtime resume
0776c075f2fb drm/i915/ddi_mgr: Handle DDI pool system suspend and resume
-:65: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#65: FILE: drivers/gpu/drm/i915/display/intel_ddi_mgr.c:866:
+	intel_tc_port_set_legacy(dig_port, mgr->enabled &&
+				route->mode == INTEL_DDI_ROUTE_LEGACY);

total: 0 errors, 0 warnings, 1 checks, 177 lines checked
fe4ed4a5d920 drm/i915/ddi_mgr: Enable dynamic DDI allocation at load



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

* ✓ CI.KUnit: success for drm/i915/ddi_mgr: Add support for dynamic DDI allocation
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (13 preceding siblings ...)
  2026-11-26 14:08 ` ✗ CI.checkpatch: warning for drm/i915/ddi_mgr: Add support for dynamic DDI allocation Patchwork
@ 2026-11-26 14:10 ` Patchwork
  2026-11-26 14:49 ` ✓ Xe.CI.BAT: " Patchwork
  15 siblings, 0 replies; 23+ messages in thread
From: Patchwork @ 2026-11-26 14:10 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-xe

== Series Details ==

Series: drm/i915/ddi_mgr: Add support for dynamic DDI allocation
URL   : https://patchwork.freedesktop.org/series/179738/
State : success

== Summary ==

+ trap cleanup EXIT
+ kunitconfigs=('/kernel/drivers/gpu/tests/.kunitconfig' '/kernel/drivers/gpu/drm/xe/.kunitconfig' '/kernel/drivers/gpu/drm/tests/.kunitconfig' '/kernel/drivers/gpu/drm/ttm/tests/.kunitconfig' '/kernel/drivers/dma-buf/.kunitconfig')
+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/tests/.kunitconfig
[14:08:08] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:08:13] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[14:08:33] Starting KUnit Kernel (1/1)...
[14:08:33] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[14:08:34] ================= gpu_buddy (15 subtests) ==================
[14:08:34] [PASSED] gpu_test_buddy_alloc_limit
[14:08:34] [PASSED] gpu_test_buddy_alloc_optimistic
[14:08:34] [PASSED] gpu_test_buddy_alloc_pessimistic
[14:08:34] [PASSED] gpu_test_buddy_alloc_pathological
[14:08:34] [PASSED] gpu_test_buddy_alloc_contiguous
[14:08:34] [PASSED] gpu_test_buddy_alloc_clear
[14:08:34] [PASSED] gpu_test_buddy_alloc_range
[14:08:34] [PASSED] gpu_test_buddy_alloc_range_bias
[14:08:34] [PASSED] gpu_test_buddy_alloc_range_clear_guard
[14:08:35] [PASSED] gpu_test_buddy_fragmentation_performance
[14:08:35] [PASSED] gpu_test_buddy_dirty_tracker_performance
[14:08:35] [PASSED] gpu_test_buddy_alloc_exceeds_max_order
[14:08:35] [PASSED] gpu_test_buddy_offset_aligned_allocation
[14:08:35] [PASSED] gpu_test_buddy_subtree_offset_alignment_stress
[14:08:35] [PASSED] gpu_test_buddy_addr_to_block
[14:08:35] ==================== [PASSED] gpu_buddy ====================
[14:08:35] ============================================================
[14:08:35] Testing complete. Ran 15 tests: passed: 15
[14:08:35] Elapsed time: 27.394s total, 5.069s configuring, 20.257s building, 2.036s running

+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/xe/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[14:08:36] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:08:38] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[14:09:17] Starting KUnit Kernel (1/1)...
[14:09:17] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[14:09:17] ================= xe_ggtt_iov (9 subtests) =================
[14:09:17] [PASSED] init_shared_pf
[14:09:17] [PASSED] init_partial_overlap
[14:09:17] [PASSED] alloc_usable_pool_low
[14:09:17] [PASSED] alloc_shareable_pool_high
[14:09:17] [PASSED] alloc_partial_overlap
[14:09:17] [PASSED] alloc_partial_overlap_usable_full
[14:09:17] [PASSED] alloc_partial_overlap_shareable_full
[14:09:17] [PASSED] alloc_shareable_pool_unavailable
[14:09:17] [PASSED] alloc_shareable_pool_oversized
[14:09:17] =================== [PASSED] xe_ggtt_iov ===================
[14:09:17] =================== xe_ggtt (3 subtests) ===================
[14:09:17] [PASSED] init_native
[14:09:17] [PASSED] alloc_usable_pool_native
[14:09:17] [PASSED] alloc_usable_pool_oversized
[14:09:17] ===================== [PASSED] xe_ggtt =====================
[14:09:17] ================== guc_buf (11 subtests) ===================
[14:09:17] [PASSED] test_smallest
[14:09:17] [PASSED] test_largest
[14:09:17] [PASSED] test_granular
[14:09:17] [PASSED] test_unique
[14:09:17] [PASSED] test_overlap
[14:09:17] [PASSED] test_reusable
[14:09:17] [PASSED] test_too_big
[14:09:17] [PASSED] test_flush
[14:09:17] [PASSED] test_lookup
[14:09:17] [PASSED] test_data
[14:09:17] [PASSED] test_class
[14:09:17] ===================== [PASSED] guc_buf =====================
[14:09:17] =================== guc_dbm (7 subtests) ===================
[14:09:17] [PASSED] test_empty
[14:09:17] [PASSED] test_default
[14:09:17] ======================== test_size  ========================
[14:09:17] [PASSED] 4
[14:09:17] [PASSED] 8
[14:09:17] [PASSED] 32
[14:09:17] [PASSED] 256
[14:09:17] ==================== [PASSED] test_size ====================
[14:09:17] ======================= test_reuse  ========================
[14:09:17] [PASSED] 4
[14:09:17] [PASSED] 8
[14:09:17] [PASSED] 32
[14:09:17] [PASSED] 256
[14:09:17] =================== [PASSED] test_reuse ====================
[14:09:17] =================== test_range_overlap  ====================
[14:09:17] [PASSED] 4
[14:09:17] [PASSED] 8
[14:09:17] [PASSED] 32
[14:09:17] [PASSED] 256
[14:09:17] =============== [PASSED] test_range_overlap ================
[14:09:17] =================== test_range_compact  ====================
[14:09:17] [PASSED] 4
[14:09:17] [PASSED] 8
[14:09:17] [PASSED] 32
[14:09:17] [PASSED] 256
[14:09:17] =============== [PASSED] test_range_compact ================
[14:09:17] ==================== test_range_spare  =====================
[14:09:17] [PASSED] 4
[14:09:17] [PASSED] 8
[14:09:17] [PASSED] 32
[14:09:17] [PASSED] 256
[14:09:17] ================ [PASSED] test_range_spare =================
[14:09:17] ===================== [PASSED] guc_dbm =====================
[14:09:17] ================== guc_idm (22 subtests) ===================
[14:09:17] [PASSED] bad_init
[14:09:17] [PASSED] no_init
[14:09:17] [PASSED] init_fini
[14:09:17] [PASSED] check_init_small
[14:09:17] [PASSED] check_init_shared
[14:09:17] [PASSED] check_used
[14:09:17] [PASSED] check_quota
[14:09:17] [PASSED] check_all
[14:09:17] [PASSED] check_limits
[14:09:17] [PASSED] check_overlap
[14:09:17] [PASSED] check_overlap_alloc
[14:09:17] [PASSED] check_overlap_release
[14:09:17] [PASSED] check_overlap_partial_init
[14:09:17] [PASSED] check_overlap_partial_shared_range_blocking
[14:09:17] [PASSED] check_used_usable
[14:09:17] [PASSED] check_used_shareable
[14:09:17] [PASSED] check_used_mixed
[14:09:17] [PASSED] check_release_usable_range
[14:09:17] [PASSED] check_release_shareable_range
[14:09:17] [PASSED] check_split_boundaries
[14:09:17] [PASSED] check_shareable_spare
[14:09:17] [PASSED] check_shareable_spare_fragmented_tail
[14:09:17] ===================== [PASSED] guc_idm =====================
[14:09:17] ============== guc_klv_helpers (13 subtests) ===============
[14:09:17] [PASSED] test_count
[14:09:17] [PASSED] test_encode_u32
[14:09:17] [PASSED] test_encode_u64
[14:09:17] [PASSED] test_encode_string
[14:09:17] [PASSED] test_encode_object_raw
[14:09:17] [PASSED] test_encode_object_klv
[14:09:17] [PASSED] test_encode_object_nested
[14:09:17] [PASSED] test_encode_object_basic
[14:09:17] ===================== test_decode_u16  =====================
[14:09:17] [PASSED] empty
[14:09:17] [PASSED] valid
[14:09:17] [PASSED] max
[14:09:17] [PASSED] big
[14:09:17] [PASSED] long
[14:09:17] ================= [PASSED] test_decode_u16 =================
[14:09:17] ===================== test_decode_u32  =====================
[14:09:17] [PASSED] empty
[14:09:17] [PASSED] valid
[14:09:17] [PASSED] max
[14:09:17] [PASSED] long
[14:09:17] ================= [PASSED] test_decode_u32 =================
[14:09:17] ===================== test_decode_u64  =====================
[14:09:17] [PASSED] empty
[14:09:17] [PASSED] short
[14:09:17] [PASSED] valid
[14:09:17] [PASSED] max
[14:09:17] [PASSED] long
[14:09:17] ================= [PASSED] test_decode_u64 =================
[14:09:17] ===================== test_decode_str  =====================
[14:09:17] [PASSED] empty
[14:09:17] [PASSED] one
[14:09:17] [PASSED] one_trash
[14:09:17] [PASSED] two
[14:09:17] [PASSED] two_trash
[14:09:17] [PASSED] three
[14:09:17] [PASSED] dword
[14:09:17] [PASSED] four
[14:09:17] [PASSED] five
[14:09:17] [PASSED] six
[14:09:17] [PASSED] seven
[14:09:17] [PASSED] qword
[14:09:17] ================= [PASSED] test_decode_str =================
[14:09:17] [PASSED] test_print
[14:09:17] ================= [PASSED] guc_klv_helpers =================
[14:09:17] =================== xe_log (4 subtests) ====================
[14:09:17] [PASSED] demo_cper
[14:09:17] [PASSED] demo_dmesg
[14:09:17] ======================= test_dmesg  ========================
[14:09:17] [PASSED] test_fatal
[14:09:17] [PASSED] test_fatal_tile
[14:09:17] [PASSED] test_fatal_gt
[14:09:17] [PASSED] test_fatal_comp
[14:09:17] [PASSED] test_fatal_comp_tile
[14:09:17] [PASSED] test_fatal_comp_gt
[14:09:17] [PASSED] test_fatal_all
[14:09:17] [PASSED] test_recoverable
[14:09:17] [PASSED] test_recoverable_tile
[14:09:17] [PASSED] test_recoverable_gt
[14:09:17] [PASSED] test_recoverable_comp
[14:09:17] [PASSED] test_recoverable_comp_tile
[14:09:17] [PASSED] test_recoverable_comp_gt
[14:09:17] [PASSED] test_recoverable_all
[14:09:17] [PASSED] test_info
[14:09:17] [PASSED] test_info_tile
[14:09:17] [PASSED] test_info_gt
[14:09:17] [PASSED] test_info_err
[14:09:17] [PASSED] test_info_comp
[14:09:17] [PASSED] test_info_comp_tile
[14:09:17] [PASSED] test_info_comp_gt
[14:09:17] [PASSED] test_info_all
[14:09:17] [PASSED] test_hw_fatal
[14:09:17] [PASSED] test_hw_recoverable
[14:09:17] [PASSED] test_hw_corrected
[14:09:17] [PASSED] test_hw_informational
[14:09:17] =================== [PASSED] test_dmesg ====================
[14:09:17] ====================== test_invalid  =======================
[14:09:17] [SKIPPED] no-component no-location no-warn (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] reserved location (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] unknown location (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] nonzero-device-id location (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] invalid-tile-id location (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] invalid-gt-id location (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] unknown component class (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] unknown system component (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] unknown hardware component (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] [SKIPPED] unknown component and location (requires CONFIG_DRM_XE_DEBUG)
[14:09:17] ================== [SKIPPED] test_invalid ==================
[14:09:17] ===================== [PASSED] xe_log ======================
[14:09:17] ================== no_relay (3 subtests) ===================
[14:09:17] [PASSED] xe_drops_guc2pf_if_not_ready
[14:09:17] [PASSED] xe_drops_guc2vf_if_not_ready
[14:09:17] [PASSED] xe_rejects_send_if_not_ready
[14:09:17] ==================== [PASSED] no_relay =====================
[14:09:17] ================== pf_relay (14 subtests) ==================
[14:09:17] [PASSED] pf_rejects_guc2pf_too_short
[14:09:17] [PASSED] pf_rejects_guc2pf_too_long
[14:09:17] [PASSED] pf_rejects_guc2pf_no_payload
[14:09:17] [PASSED] pf_fails_no_payload
[14:09:17] [PASSED] pf_fails_bad_origin
[14:09:17] [PASSED] pf_fails_bad_type
[14:09:17] [PASSED] pf_txn_reports_error
[14:09:17] [PASSED] pf_txn_sends_pf2guc
[14:09:17] [PASSED] pf_sends_pf2guc
[14:09:17] [SKIPPED] pf_loopback_nop (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[14:09:17] [SKIPPED] pf_loopback_echo (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[14:09:17] [SKIPPED] pf_loopback_fail (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[14:09:17] [SKIPPED] pf_loopback_busy (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[14:09:17] [SKIPPED] pf_loopback_retry (requires CONFIG_DRM_XE_DEBUG_SRIOV)
[14:09:17] ==================== [PASSED] pf_relay =====================
[14:09:17] ================== vf_relay (3 subtests) ===================
[14:09:17] [PASSED] vf_rejects_guc2vf_too_short
[14:09:17] [PASSED] vf_rejects_guc2vf_too_long
[14:09:17] [PASSED] vf_rejects_guc2vf_no_payload
[14:09:17] ==================== [PASSED] vf_relay =====================
[14:09:17] ================ pf_gt_config (9 subtests) =================
[14:09:17] [PASSED] fair_contexts_1vf
[14:09:17] [PASSED] fair_doorbells_1vf
[14:09:17] [PASSED] fair_ggtt_1vf
[14:09:17] ====================== fair_vram_1vf  ======================
[14:09:17] [PASSED] 3.50 GiB
[14:09:17] [PASSED] 11.5 GiB
[14:09:17] [PASSED] 15.5 GiB
[14:09:17] [PASSED] 31.5 GiB
[14:09:17] [PASSED] 63.5 GiB
[14:09:17] [PASSED] 1.91 GiB
[14:09:17] ================== [PASSED] fair_vram_1vf ==================
[14:09:17] ================ fair_vram_1vf_admin_only  =================
[14:09:17] [PASSED] 3.50 GiB
[14:09:17] [PASSED] 11.5 GiB
[14:09:17] [PASSED] 15.5 GiB
[14:09:17] [PASSED] 31.5 GiB
[14:09:17] [PASSED] 63.5 GiB
[14:09:17] [PASSED] 1.91 GiB
[14:09:17] ============ [PASSED] fair_vram_1vf_admin_only =============
[14:09:17] ====================== fair_contexts  ======================
[14:09:17] [PASSED] 1 VF
[14:09:17] [PASSED] 2 VFs
[14:09:17] [PASSED] 3 VFs
[14:09:17] [PASSED] 4 VFs
[14:09:17] [PASSED] 5 VFs
[14:09:17] [PASSED] 6 VFs
[14:09:17] [PASSED] 7 VFs
[14:09:17] [PASSED] 8 VFs
[14:09:17] [PASSED] 9 VFs
[14:09:17] [PASSED] 10 VFs
[14:09:17] [PASSED] 11 VFs
[14:09:17] [PASSED] 12 VFs
[14:09:17] [PASSED] 13 VFs
[14:09:17] [PASSED] 14 VFs
[14:09:17] [PASSED] 15 VFs
[14:09:17] [PASSED] 16 VFs
[14:09:17] [PASSED] 17 VFs
[14:09:17] [PASSED] 18 VFs
[14:09:17] [PASSED] 19 VFs
[14:09:17] [PASSED] 20 VFs
[14:09:17] [PASSED] 21 VFs
[14:09:17] [PASSED] 22 VFs
[14:09:17] [PASSED] 23 VFs
[14:09:17] [PASSED] 24 VFs
[14:09:17] [PASSED] 25 VFs
[14:09:17] [PASSED] 26 VFs
[14:09:17] [PASSED] 27 VFs
[14:09:17] [PASSED] 28 VFs
[14:09:17] [PASSED] 29 VFs
[14:09:17] [PASSED] 30 VFs
[14:09:17] [PASSED] 31 VFs
[14:09:17] [PASSED] 32 VFs
[14:09:17] [PASSED] 33 VFs
[14:09:17] [PASSED] 34 VFs
[14:09:17] [PASSED] 35 VFs
[14:09:17] [PASSED] 36 VFs
[14:09:17] [PASSED] 37 VFs
[14:09:17] [PASSED] 38 VFs
[14:09:17] [PASSED] 39 VFs
[14:09:17] [PASSED] 40 VFs
[14:09:17] [PASSED] 41 VFs
[14:09:17] [PASSED] 42 VFs
[14:09:17] [PASSED] 43 VFs
[14:09:17] [PASSED] 44 VFs
[14:09:17] [PASSED] 45 VFs
[14:09:17] [PASSED] 46 VFs
[14:09:17] [PASSED] 47 VFs
[14:09:17] [PASSED] 48 VFs
[14:09:17] [PASSED] 49 VFs
[14:09:17] [PASSED] 50 VFs
[14:09:17] [PASSED] 51 VFs
[14:09:17] [PASSED] 52 VFs
[14:09:17] [PASSED] 53 VFs
[14:09:17] [PASSED] 54 VFs
[14:09:17] [PASSED] 55 VFs
[14:09:17] [PASSED] 56 VFs
[14:09:17] [PASSED] 57 VFs
[14:09:17] [PASSED] 58 VFs
[14:09:17] [PASSED] 59 VFs
[14:09:17] [PASSED] 60 VFs
[14:09:17] [PASSED] 61 VFs
[14:09:17] [PASSED] 62 VFs
[14:09:17] [PASSED] 63 VFs
[14:09:17] ================== [PASSED] fair_contexts ==================
[14:09:17] ===================== fair_doorbells  ======================
[14:09:17] [PASSED] 1 VF
[14:09:17] [PASSED] 2 VFs
[14:09:17] [PASSED] 3 VFs
[14:09:17] [PASSED] 4 VFs
[14:09:17] [PASSED] 5 VFs
[14:09:17] [PASSED] 6 VFs
[14:09:17] [PASSED] 7 VFs
[14:09:17] [PASSED] 8 VFs
[14:09:17] [PASSED] 9 VFs
[14:09:17] [PASSED] 10 VFs
[14:09:17] [PASSED] 11 VFs
[14:09:17] [PASSED] 12 VFs
[14:09:17] [PASSED] 13 VFs
[14:09:17] [PASSED] 14 VFs
[14:09:17] [PASSED] 15 VFs
[14:09:17] [PASSED] 16 VFs
[14:09:17] [PASSED] 17 VFs
[14:09:17] [PASSED] 18 VFs
[14:09:17] [PASSED] 19 VFs
[14:09:17] [PASSED] 20 VFs
[14:09:17] [PASSED] 21 VFs
[14:09:17] [PASSED] 22 VFs
[14:09:17] [PASSED] 23 VFs
[14:09:17] [PASSED] 24 VFs
[14:09:17] [PASSED] 25 VFs
[14:09:17] [PASSED] 26 VFs
[14:09:17] [PASSED] 27 VFs
[14:09:17] [PASSED] 28 VFs
[14:09:17] [PASSED] 29 VFs
[14:09:17] [PASSED] 30 VFs
[14:09:17] [PASSED] 31 VFs
[14:09:17] [PASSED] 32 VFs
[14:09:17] [PASSED] 33 VFs
[14:09:17] [PASSED] 34 VFs
[14:09:17] [PASSED] 35 VFs
[14:09:17] [PASSED] 36 VFs
[14:09:17] [PASSED] 37 VFs
[14:09:17] [PASSED] 38 VFs
[14:09:17] [PASSED] 39 VFs
[14:09:17] [PASSED] 40 VFs
[14:09:17] [PASSED] 41 VFs
[14:09:17] [PASSED] 42 VFs
[14:09:17] [PASSED] 43 VFs
[14:09:17] [PASSED] 44 VFs
[14:09:17] [PASSED] 45 VFs
[14:09:17] [PASSED] 46 VFs
[14:09:17] [PASSED] 47 VFs
[14:09:17] [PASSED] 48 VFs
[14:09:17] [PASSED] 49 VFs
[14:09:17] [PASSED] 50 VFs
[14:09:17] [PASSED] 51 VFs
[14:09:17] [PASSED] 52 VFs
[14:09:17] [PASSED] 53 VFs
[14:09:17] [PASSED] 54 VFs
[14:09:17] [PASSED] 55 VFs
[14:09:17] [PASSED] 56 VFs
[14:09:17] [PASSED] 57 VFs
[14:09:17] [PASSED] 58 VFs
[14:09:17] [PASSED] 59 VFs
[14:09:17] [PASSED] 60 VFs
[14:09:17] [PASSED] 61 VFs
[14:09:17] [PASSED] 62 VFs
[14:09:17] [PASSED] 63 VFs
[14:09:17] ================= [PASSED] fair_doorbells ==================
[14:09:17] ======================== fair_ggtt  ========================
[14:09:17] [PASSED] 1 VF
[14:09:17] [PASSED] 2 VFs
[14:09:17] [PASSED] 3 VFs
[14:09:17] [PASSED] 4 VFs
[14:09:17] [PASSED] 5 VFs
[14:09:17] [PASSED] 6 VFs
[14:09:17] [PASSED] 7 VFs
[14:09:17] [PASSED] 8 VFs
[14:09:17] [PASSED] 9 VFs
[14:09:17] [PASSED] 10 VFs
[14:09:17] [PASSED] 11 VFs
[14:09:17] [PASSED] 12 VFs
[14:09:17] [PASSED] 13 VFs
[14:09:17] [PASSED] 14 VFs
[14:09:17] [PASSED] 15 VFs
[14:09:17] [PASSED] 16 VFs
[14:09:17] [PASSED] 17 VFs
[14:09:17] [PASSED] 18 VFs
[14:09:17] [PASSED] 19 VFs
[14:09:17] [PASSED] 20 VFs
[14:09:17] [PASSED] 21 VFs
[14:09:17] [PASSED] 22 VFs
[14:09:17] [PASSED] 23 VFs
[14:09:17] [PASSED] 24 VFs
[14:09:17] [PASSED] 25 VFs
[14:09:17] [PASSED] 26 VFs
[14:09:17] [PASSED] 27 VFs
[14:09:17] [PASSED] 28 VFs
[14:09:17] [PASSED] 29 VFs
[14:09:17] [PASSED] 30 VFs
[14:09:17] [PASSED] 31 VFs
[14:09:17] [PASSED] 32 VFs
[14:09:17] [PASSED] 33 VFs
[14:09:17] [PASSED] 34 VFs
[14:09:17] [PASSED] 35 VFs
[14:09:17] [PASSED] 36 VFs
[14:09:17] [PASSED] 37 VFs
[14:09:17] [PASSED] 38 VFs
[14:09:17] [PASSED] 39 VFs
[14:09:17] [PASSED] 40 VFs
[14:09:17] [PASSED] 41 VFs
[14:09:17] [PASSED] 42 VFs
[14:09:17] [PASSED] 43 VFs
[14:09:17] [PASSED] 44 VFs
[14:09:17] [PASSED] 45 VFs
[14:09:17] [PASSED] 46 VFs
[14:09:17] [PASSED] 47 VFs
[14:09:17] [PASSED] 48 VFs
[14:09:17] [PASSED] 49 VFs
[14:09:17] [PASSED] 50 VFs
[14:09:17] [PASSED] 51 VFs
[14:09:17] [PASSED] 52 VFs
[14:09:17] [PASSED] 53 VFs
[14:09:17] [PASSED] 54 VFs
[14:09:17] [PASSED] 55 VFs
[14:09:17] [PASSED] 56 VFs
[14:09:17] [PASSED] 57 VFs
[14:09:17] [PASSED] 58 VFs
[14:09:17] [PASSED] 59 VFs
[14:09:17] [PASSED] 60 VFs
[14:09:17] [PASSED] 61 VFs
[14:09:17] [PASSED] 62 VFs
[14:09:17] [PASSED] 63 VFs
[14:09:17] ==================== [PASSED] fair_ggtt ====================
[14:09:17] ======================== fair_vram  ========================
[14:09:17] [PASSED] 1 VF
[14:09:17] [PASSED] 2 VFs
[14:09:17] [PASSED] 3 VFs
[14:09:17] [PASSED] 4 VFs
[14:09:17] [PASSED] 5 VFs
[14:09:17] [PASSED] 6 VFs
[14:09:17] [PASSED] 7 VFs
[14:09:17] [PASSED] 8 VFs
[14:09:17] [PASSED] 9 VFs
[14:09:17] [PASSED] 10 VFs
[14:09:17] [PASSED] 11 VFs
[14:09:17] [PASSED] 12 VFs
[14:09:17] [PASSED] 13 VFs
[14:09:17] [PASSED] 14 VFs
[14:09:17] [PASSED] 15 VFs
[14:09:17] [PASSED] 16 VFs
[14:09:17] [PASSED] 17 VFs
[14:09:17] [PASSED] 18 VFs
[14:09:17] [PASSED] 19 VFs
[14:09:17] [PASSED] 20 VFs
[14:09:17] [PASSED] 21 VFs
[14:09:17] [PASSED] 22 VFs
[14:09:17] [PASSED] 23 VFs
[14:09:17] [PASSED] 24 VFs
[14:09:17] [PASSED] 25 VFs
[14:09:17] [PASSED] 26 VFs
[14:09:17] [PASSED] 27 VFs
[14:09:17] [PASSED] 28 VFs
[14:09:17] [PASSED] 29 VFs
[14:09:17] [PASSED] 30 VFs
[14:09:17] [PASSED] 31 VFs
[14:09:17] [PASSED] 32 VFs
[14:09:17] [PASSED] 33 VFs
[14:09:17] [PASSED] 34 VFs
[14:09:17] [PASSED] 35 VFs
[14:09:17] [PASSED] 36 VFs
[14:09:17] [PASSED] 37 VFs
[14:09:17] [PASSED] 38 VFs
[14:09:17] [PASSED] 39 VFs
[14:09:17] [PASSED] 40 VFs
[14:09:17] [PASSED] 41 VFs
[14:09:17] [PASSED] 42 VFs
[14:09:17] [PASSED] 43 VFs
[14:09:17] [PASSED] 44 VFs
[14:09:17] [PASSED] 45 VFs
[14:09:17] [PASSED] 46 VFs
[14:09:17] [PASSED] 47 VFs
[14:09:17] [PASSED] 48 VFs
[14:09:17] [PASSED] 49 VFs
[14:09:17] [PASSED] 50 VFs
[14:09:17] [PASSED] 51 VFs
[14:09:17] [PASSED] 52 VFs
[14:09:17] [PASSED] 53 VFs
[14:09:17] [PASSED] 54 VFs
[14:09:17] [PASSED] 55 VFs
[14:09:17] [PASSED] 56 VFs
[14:09:17] [PASSED] 57 VFs
[14:09:17] [PASSED] 58 VFs
[14:09:17] [PASSED] 59 VFs
[14:09:17] [PASSED] 60 VFs
[14:09:17] [PASSED] 61 VFs
[14:09:17] [PASSED] 62 VFs
[14:09:17] [PASSED] 63 VFs
[14:09:17] ==================== [PASSED] fair_vram ====================
[14:09:17] ================== [PASSED] pf_gt_config ===================
[14:09:17] ===================== lmtt (1 subtest) =====================
[14:09:17] ======================== test_ops  =========================
[14:09:17] [PASSED] 2-level
[14:09:17] [PASSED] multi-level
[14:09:17] ==================== [PASSED] test_ops =====================
[14:09:17] ====================== [PASSED] lmtt =======================
[14:09:17] ================= sriov_packet (1 subtest) =================
[14:09:17] [PASSED] test_descriptor_init
[14:09:17] ================== [PASSED] sriov_packet ===================
[14:09:17] ================= pf_service (11 subtests) =================
[14:09:17] [PASSED] pf_negotiate_any
[14:09:17] [PASSED] pf_negotiate_base_match
[14:09:17] [PASSED] pf_negotiate_base_newer
[14:09:17] [PASSED] pf_negotiate_base_next
[14:09:17] [SKIPPED] pf_negotiate_base_older (no older minor)
[14:09:17] [PASSED] pf_negotiate_base_prev
[14:09:17] [PASSED] pf_negotiate_latest_match
[14:09:17] [PASSED] pf_negotiate_latest_newer
[14:09:17] [PASSED] pf_negotiate_latest_next
[14:09:17] [SKIPPED] pf_negotiate_latest_older (no older minor)
[14:09:17] [SKIPPED] pf_negotiate_latest_prev (no prev major)
[14:09:17] =================== [PASSED] pf_service ====================
[14:09:17] ================= xe_guc_g2g (2 subtests) ==================
[14:09:17] ============== xe_live_guc_g2g_kunit_default  ==============
[14:09:17] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[14:09:17] ============== xe_live_guc_g2g_kunit_allmem  ===============
[14:09:17] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[14:09:17] =================== [SKIPPED] xe_guc_g2g ===================
[14:09:17] =================== xe_mocs (2 subtests) ===================
[14:09:17] ================ xe_live_mocs_kernel_kunit  ================
[14:09:17] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[14:09:17] ================ xe_live_mocs_reset_kunit  =================
[14:09:17] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[14:09:17] ==================== [SKIPPED] xe_mocs =====================
[14:09:17] ================= xe_migrate (3 subtests) ==================
[14:09:17] ================= xe_migrate_sanity_kunit  =================
[14:09:17] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[14:09:17] ================== xe_validate_ccs_kunit  ==================
[14:09:17] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[14:09:17] ============= xe_migrate_access_memory_kunit  ==============
[14:09:17] ========= [SKIPPED] xe_migrate_access_memory_kunit =========
[14:09:17] =================== [SKIPPED] xe_migrate ===================
[14:09:17] ================== xe_dma_buf (1 subtest) ==================
[14:09:17] ==================== xe_dma_buf_kunit  =====================
[14:09:17] ================ [SKIPPED] xe_dma_buf_kunit ================
[14:09:17] =================== [SKIPPED] xe_dma_buf ===================
[14:09:17] ================= xe_bo_shrink (1 subtest) =================
[14:09:17] =================== xe_bo_shrink_kunit  ====================
[14:09:17] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[14:09:17] ================== [SKIPPED] xe_bo_shrink ==================
[14:09:17] ==================== xe_bo (2 subtests) ====================
[14:09:17] ================== xe_ccs_migrate_kunit  ===================
[14:09:17] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[14:09:17] ==================== xe_bo_evict_kunit  ====================
[14:09:17] =============== [SKIPPED] xe_bo_evict_kunit ================
[14:09:17] ===================== [SKIPPED] xe_bo ======================
[14:09:17] =================== xe_any (9 subtests) ====================
[14:09:17] [PASSED] test_to_xe
[14:09:17] [PASSED] test_to_dev
[14:09:17] [PASSED] test_to_pdev
[14:09:17] [PASSED] test_to_drm
[14:09:17] [PASSED] test_if_pdev
[14:09:17] [PASSED] test_if_xe
[14:09:17] [PASSED] test_if_tile
[14:09:17] [PASSED] test_if_gt
[14:09:17] [PASSED] test_to_id
[14:09:17] ===================== [PASSED] xe_any ======================
[14:09:17] ==================== args (13 subtests) ====================
[14:09:17] [PASSED] count_args_test
[14:09:17] [PASSED] call_args_example
[14:09:17] [PASSED] call_args_test
[14:09:17] [PASSED] drop_first_arg_example
[14:09:17] [PASSED] drop_first_arg_test
[14:09:17] [PASSED] first_arg_example
[14:09:17] [PASSED] first_arg_test
[14:09:17] [PASSED] last_arg_example
[14:09:17] [PASSED] last_arg_test
[14:09:17] [PASSED] pick_arg_example
[14:09:17] [PASSED] if_args_example
[14:09:17] [PASSED] if_args_test
[14:09:17] [PASSED] sep_comma_example
[14:09:17] ====================== [PASSED] args =======================
[14:09:17] =================== xe_pci (3 subtests) ====================
[14:09:17] ==================== check_graphics_ip  ====================
[14:09:17] [PASSED] 12.00 Xe_LP
[14:09:17] [PASSED] 12.10 Xe_LP+
[14:09:17] [PASSED] 12.55 Xe_HPG
[14:09:17] [PASSED] 12.60 Xe_HPC
[14:09:17] [PASSED] 12.70 Xe_LPG
[14:09:17] [PASSED] 12.71 Xe_LPG
[14:09:17] [PASSED] 12.74 Xe_LPG+
[14:09:17] [PASSED] 20.01 Xe2_HPG
[14:09:17] [PASSED] 20.02 Xe2_HPG
[14:09:17] [PASSED] 20.04 Xe2_LPG
[14:09:17] [PASSED] 30.00 Xe3_LPG
[14:09:17] [PASSED] 30.01 Xe3_LPG
[14:09:17] [PASSED] 30.03 Xe3_LPG
[14:09:17] [PASSED] 30.04 Xe3_LPG
[14:09:17] [PASSED] 30.05 Xe3_LPG
[14:09:17] [PASSED] 35.10 Xe3p_LPG
[14:09:17] [PASSED] 35.11 Xe3p_XPC
[14:09:17] ================ [PASSED] check_graphics_ip ================
[14:09:17] ===================== check_media_ip  ======================
[14:09:17] [PASSED] 12.00 Xe_M
[14:09:17] [PASSED] 12.55 Xe_HPM
[14:09:17] [PASSED] 13.00 Xe_LPM+
[14:09:17] [PASSED] 13.01 Xe2_HPM
[14:09:17] [PASSED] 20.00 Xe2_LPM
[14:09:17] [PASSED] 30.00 Xe3_LPM
[14:09:17] [PASSED] 30.02 Xe3_LPM
[14:09:17] [PASSED] 35.00 Xe3p_LPM
[14:09:17] [PASSED] 35.03 Xe3p_HPM
[14:09:17] ================= [PASSED] check_media_ip ==================
[14:09:17] =================== check_platform_desc  ===================
[14:09:17] [PASSED] 0x9A60 (TIGERLAKE)
[14:09:17] [PASSED] 0x9A68 (TIGERLAKE)
[14:09:17] [PASSED] 0x9A70 (TIGERLAKE)
[14:09:17] [PASSED] 0x9A40 (TIGERLAKE)
[14:09:17] [PASSED] 0x9A49 (TIGERLAKE)
[14:09:17] [PASSED] 0x9A59 (TIGERLAKE)
[14:09:17] [PASSED] 0x9A78 (TIGERLAKE)
[14:09:17] [PASSED] 0x9AC0 (TIGERLAKE)
[14:09:17] [PASSED] 0x9AC9 (TIGERLAKE)
[14:09:17] [PASSED] 0x9AD9 (TIGERLAKE)
[14:09:17] [PASSED] 0x9AF8 (TIGERLAKE)
[14:09:17] [PASSED] 0x4C80 (ROCKETLAKE)
[14:09:17] [PASSED] 0x4C8A (ROCKETLAKE)
[14:09:17] [PASSED] 0x4C8B (ROCKETLAKE)
[14:09:17] [PASSED] 0x4C8C (ROCKETLAKE)
[14:09:17] [PASSED] 0x4C90 (ROCKETLAKE)
[14:09:17] [PASSED] 0x4C9A (ROCKETLAKE)
[14:09:17] [PASSED] 0x4680 (ALDERLAKE_S)
[14:09:17] [PASSED] 0x4682 (ALDERLAKE_S)
[14:09:17] [PASSED] 0x4688 (ALDERLAKE_S)
[14:09:17] [PASSED] 0x468A (ALDERLAKE_S)
[14:09:17] [PASSED] 0x468B (ALDERLAKE_S)
[14:09:17] [PASSED] 0x4690 (ALDERLAKE_S)
[14:09:17] [PASSED] 0x4692 (ALDERLAKE_S)
[14:09:17] [PASSED] 0x4693 (ALDERLAKE_S)
[14:09:17] [PASSED] 0x46A0 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46A1 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46A2 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46A3 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46A6 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46A8 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46AA (ALDERLAKE_P)
[14:09:17] [PASSED] 0x462A (ALDERLAKE_P)
[14:09:17] [PASSED] 0x4626 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x4628 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46B0 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46B1 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46B2 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46B3 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46C0 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46C1 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46C2 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46C3 (ALDERLAKE_P)
[14:09:17] [PASSED] 0x46D0 (ALDERLAKE_N)
[14:09:17] [PASSED] 0x46D1 (ALDERLAKE_N)
[14:09:17] [PASSED] 0x46D2 (ALDERLAKE_N)
[14:09:17] [PASSED] 0x46D3 (ALDERLAKE_N)
[14:09:17] [PASSED] 0x46D4 (ALDERLAKE_N)
[14:09:17] [PASSED] 0xA721 (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA7A1 (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA7A9 (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA7AC (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA7AD (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA720 (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA7A0 (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA7A8 (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA7AA (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA7AB (ALDERLAKE_P)
[14:09:17] [PASSED] 0xA780 (ALDERLAKE_S)
[14:09:17] [PASSED] 0xA781 (ALDERLAKE_S)
[14:09:17] [PASSED] 0xA782 (ALDERLAKE_S)
[14:09:17] [PASSED] 0xA783 (ALDERLAKE_S)
[14:09:17] [PASSED] 0xA788 (ALDERLAKE_S)
[14:09:17] [PASSED] 0xA789 (ALDERLAKE_S)
[14:09:17] [PASSED] 0xA78A (ALDERLAKE_S)
[14:09:17] [PASSED] 0xA78B (ALDERLAKE_S)
[14:09:17] [PASSED] 0x4905 (DG1)
[14:09:17] [PASSED] 0x4906 (DG1)
[14:09:17] [PASSED] 0x4907 (DG1)
[14:09:17] [PASSED] 0x4908 (DG1)
[14:09:17] [PASSED] 0x4909 (DG1)
[14:09:17] [PASSED] 0x56C0 (DG2)
[14:09:17] [PASSED] 0x56C2 (DG2)
[14:09:17] [PASSED] 0x56C1 (DG2)
[14:09:17] [PASSED] 0x7D51 (METEORLAKE)
[14:09:17] [PASSED] 0x7DD1 (METEORLAKE)
[14:09:17] [PASSED] 0x7D41 (METEORLAKE)
[14:09:17] [PASSED] 0x7D67 (METEORLAKE)
[14:09:17] [PASSED] 0xB640 (METEORLAKE)
[14:09:17] [PASSED] 0x56A0 (DG2)
[14:09:17] [PASSED] 0x56A1 (DG2)
[14:09:17] [PASSED] 0x56A2 (DG2)
[14:09:17] [PASSED] 0x56BE (DG2)
[14:09:17] [PASSED] 0x56BF (DG2)
[14:09:17] [PASSED] 0x5690 (DG2)
[14:09:17] [PASSED] 0x5691 (DG2)
[14:09:17] [PASSED] 0x5692 (DG2)
[14:09:17] [PASSED] 0x56A5 (DG2)
[14:09:17] [PASSED] 0x56A6 (DG2)
[14:09:17] [PASSED] 0x56B0 (DG2)
[14:09:17] [PASSED] 0x56B1 (DG2)
[14:09:17] [PASSED] 0x56BA (DG2)
[14:09:17] [PASSED] 0x56BB (DG2)
[14:09:17] [PASSED] 0x56BC (DG2)
[14:09:17] [PASSED] 0x56BD (DG2)
[14:09:17] [PASSED] 0x5693 (DG2)
[14:09:17] [PASSED] 0x5694 (DG2)
[14:09:17] [PASSED] 0x5695 (DG2)
[14:09:17] [PASSED] 0x56A3 (DG2)
[14:09:17] [PASSED] 0x56A4 (DG2)
[14:09:17] [PASSED] 0x56B2 (DG2)
[14:09:17] [PASSED] 0x56B3 (DG2)
[14:09:17] [PASSED] 0x5696 (DG2)
[14:09:17] [PASSED] 0x5697 (DG2)
[14:09:17] [PASSED] 0xB69 (PVC)
[14:09:17] [PASSED] 0xB6E (PVC)
[14:09:17] [PASSED] 0xBD4 (PVC)
[14:09:17] [PASSED] 0xBD5 (PVC)
[14:09:17] [PASSED] 0xBD6 (PVC)
[14:09:17] [PASSED] 0xBD7 (PVC)
[14:09:17] [PASSED] 0xBD8 (PVC)
[14:09:17] [PASSED] 0xBD9 (PVC)
[14:09:17] [PASSED] 0xBDA (PVC)
[14:09:17] [PASSED] 0xBDB (PVC)
[14:09:17] [PASSED] 0xBE0 (PVC)
[14:09:17] [PASSED] 0xBE1 (PVC)
[14:09:17] [PASSED] 0xBE5 (PVC)
[14:09:17] [PASSED] 0x7D40 (METEORLAKE)
[14:09:17] [PASSED] 0x7D45 (METEORLAKE)
[14:09:17] [PASSED] 0x7D55 (METEORLAKE)
[14:09:17] [PASSED] 0x7D60 (METEORLAKE)
[14:09:17] [PASSED] 0x7DD5 (METEORLAKE)
[14:09:17] [PASSED] 0x6420 (LUNARLAKE)
[14:09:17] [PASSED] 0x64A0 (LUNARLAKE)
[14:09:17] [PASSED] 0x64B0 (LUNARLAKE)
[14:09:17] [PASSED] 0xE202 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE209 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE20B (BATTLEMAGE)
[14:09:17] [PASSED] 0xE20C (BATTLEMAGE)
[14:09:17] [PASSED] 0xE20D (BATTLEMAGE)
[14:09:17] [PASSED] 0xE210 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE211 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE212 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE216 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE220 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE221 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE222 (BATTLEMAGE)
[14:09:17] [PASSED] 0xE223 (BATTLEMAGE)
[14:09:17] [PASSED] 0xB080 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB081 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB082 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB083 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB084 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB085 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB086 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB087 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB08F (PANTHERLAKE)
[14:09:17] [PASSED] 0xB090 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB0A0 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB0A1 (PANTHERLAKE)
[14:09:17] [PASSED] 0xB0B0 (PANTHERLAKE)
[14:09:17] [PASSED] 0xFD80 (PANTHERLAKE)
[14:09:17] [PASSED] 0xFD81 (PANTHERLAKE)
[14:09:17] [PASSED] 0xD740 (NOVALAKE_S)
[14:09:17] [PASSED] 0xD741 (NOVALAKE_S)
[14:09:17] [PASSED] 0xD742 (NOVALAKE_S)
[14:09:17] [PASSED] 0xD743 (NOVALAKE_S)
[14:09:17] [PASSED] 0xD745 (NOVALAKE_S)
[14:09:17] [PASSED] 0xD74A (NOVALAKE_S)
[14:09:17] [PASSED] 0xD74B (NOVALAKE_S)
[14:09:17] [PASSED] 0x674C (CRESCENTISLAND)
[14:09:17] [PASSED] 0x674D (CRESCENTISLAND)
[14:09:17] [PASSED] 0x674E (CRESCENTISLAND)
[14:09:17] [PASSED] 0x674F (CRESCENTISLAND)
[14:09:17] [PASSED] 0x6750 (CRESCENTISLAND)
[14:09:17] [PASSED] 0x6751 (CRESCENTISLAND)
[14:09:17] [PASSED] 0x6752 (CRESCENTISLAND)
[14:09:17] [PASSED] 0x6753 (CRESCENTISLAND)
[14:09:17] [PASSED] 0x6754 (CRESCENTISLAND)
[14:09:17] [PASSED] 0x6755 (CRESCENTISLAND)
[14:09:17] [PASSED] 0x6756 (CRESCENTISLAND)
[14:09:17] [PASSED] 0xD750 (NOVALAKE_P)
[14:09:17] [PASSED] 0xD751 (NOVALAKE_P)
[14:09:17] [PASSED] 0xD752 (NOVALAKE_P)
[14:09:17] [PASSED] 0xD753 (NOVALAKE_P)
[14:09:17] [PASSED] 0xD754 (NOVALAKE_P)
[14:09:17] [PASSED] 0xD755 (NOVALAKE_P)
[14:09:17] [PASSED] 0xD756 (NOVALAKE_P)
[14:09:17] [PASSED] 0xD757 (NOVALAKE_P)
[14:09:17] [PASSED] 0xD75F (NOVALAKE_P)
[14:09:17] =============== [PASSED] check_platform_desc ===============
[14:09:17] ===================== [PASSED] xe_pci ======================
[14:09:17] ============= xe_rtp_tables_test (5 subtests) ==============
[14:09:17] ================== xe_rtp_table_gt_test  ===================
[14:09:17] [PASSED] gt_was/14011060649
[14:09:17] [PASSED] gt_was/14011059788
[14:09:17] [PASSED] gt_was/14015795083
[14:09:17] [PASSED] gt_was/16021867713
[14:09:17] [PASSED] gt_was/14019449301
[14:09:17] [PASSED] gt_was/16028005424
[14:09:17] [PASSED] gt_was/14026578760
[14:09:17] [PASSED] gt_was/1409420604
[14:09:17] [PASSED] gt_was/1408615072
[14:09:17] [PASSED] gt_was/22010523718
[14:09:17] [PASSED] gt_was/14011006942
[14:09:17] [PASSED] gt_was/14014830051
[14:09:17] [PASSED] gt_was/18018781329
[14:09:17] [PASSED] gt_was/1509235366
[14:09:17] [PASSED] gt_was/18018781329
[14:09:17] [PASSED] gt_was/16016694945
[14:09:17] [PASSED] gt_was/14018575942
[14:09:17] [PASSED] gt_was/22016670082
[14:09:17] [PASSED] gt_was/22016670082
[14:09:17] [PASSED] gt_was/14017421178
[14:09:17] [PASSED] gt_was/16025250150
[14:09:17] [PASSED] gt_was/14021871409
[14:09:17] [PASSED] gt_was/16021865536
[14:09:17] [PASSED] gt_was/14021486841
[14:09:17] [PASSED] gt_was/14025160223
[14:09:17] [PASSED] gt_was/14026144927, 16029437861, 14026127056
[14:09:17] [PASSED] gt_was/14025635424
[14:09:17] [PASSED] gt_was/16028005424
[14:09:17] ============== [PASSED] xe_rtp_table_gt_test ===============
[14:09:17] ================== xe_rtp_table_gt_test  ===================
[14:09:17] [PASSED] gt_tunings/Tuning: Blend Fill Caching Optimization Disable
[14:09:17] [PASSED] gt_tunings/Tuning: 32B Access Enable
[14:09:17] [PASSED] gt_tunings/Tuning: L3 cache
[14:09:17] [PASSED] gt_tunings/Tuning: L3 cache - media
[14:09:17] [PASSED] gt_tunings/Tuning: Compression Overfetch
[14:09:17] [PASSED] gt_tunings/Tuning: Compression Overfetch - media
[14:09:17] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3
[14:09:17] [PASSED] gt_tunings/Tuning: Enable compressible partial write overfetch in L3 - media
[14:09:17] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only
[14:09:17] [PASSED] gt_tunings/Tuning: L2 Overfetch Compressible Only - media
[14:09:17] [PASSED] gt_tunings/Tuning: Stateless compression control
[14:09:17] [PASSED] gt_tunings/Tuning: Stateless compression control - media
[14:09:17] [PASSED] gt_tunings/Tuning: L3 RW flush all Cache
[14:09:17] [PASSED] gt_tunings/Tuning: L3 RW flush all cache - media
[14:09:17] [PASSED] gt_tunings/Tuning: Set STLB Bank Hash Mode to 4KB
[14:09:17] [PASSED] gt_tunings/Tuning: Force All Non-Compressible Memory Reads to be 256B Overfetches
[14:09:17] ============== [PASSED] xe_rtp_table_gt_test ===============
[14:09:17] ================== xe_rtp_table_oob_test  ==================
[14:09:17] [PASSED] oob_was/1607983814
[14:09:17] [PASSED] oob_was/16010904313
[14:09:17] [PASSED] oob_was/18022495364
[14:09:17] [PASSED] oob_was/22012773006
[14:09:17] [PASSED] oob_was/14014475959
[14:09:17] [PASSED] oob_was/22011391025
[14:09:17] [PASSED] oob_was/22012727170
[14:09:17] [PASSED] oob_was/22012727685
[14:09:17] [PASSED] oob_was/22016596838
[14:09:17] [PASSED] oob_was/18020744125
[14:09:17] [PASSED] oob_was/1409600907
[14:09:17] [PASSED] oob_was/22014953428
[14:09:17] [PASSED] oob_was/16017236439
[14:09:17] [PASSED] oob_was/14019821291
[14:09:17] [PASSED] oob_was/14015076503
[14:09:17] [PASSED] oob_was/22016122933
[14:09:17] [PASSED] oob_was/14018913170
[14:09:17] [PASSED] oob_was/14018094691
[14:09:17] [PASSED] oob_was/18024947630
[14:09:17] [PASSED] oob_was/16022287689
[14:09:17] [PASSED] oob_was/13011645652
[14:09:17] [PASSED] oob_was/14022293748
[14:09:17] [PASSED] oob_was/22019794406
[14:09:17] [PASSED] oob_was/22019338487
[14:09:17] [PASSED] oob_was/16023588340
[14:09:17] [PASSED] oob_was/14019789679
[14:09:17] [PASSED] oob_was/14022866841
[14:09:17] [PASSED] oob_was/16021333562
[14:09:17] [PASSED] oob_was/14016712196
[14:09:17] [PASSED] oob_was/14015568240
[14:09:17] [PASSED] oob_was/18013179988
[14:09:17] [PASSED] oob_was/1508761755
[14:09:17] [PASSED] oob_was/16023105232
[14:09:17] [PASSED] oob_was/16026508708
[14:09:17] [PASSED] oob_was/14020001231
[14:09:17] [PASSED] oob_was/16023683509
[14:09:17] [PASSED] oob_was/14025515070
[14:09:17] [PASSED] oob_was/15015404425_disable
[14:09:17] [PASSED] oob_was/16026007364
[14:09:17] [PASSED] oob_was/14020316580
[14:09:17] [PASSED] oob_was/14025883347
[14:09:17] [PASSED] oob_was/16029380221
[14:09:17] [PASSED] oob_was/22022079272
[14:09:17] [PASSED] oob_was/16029897822
[14:09:17] [PASSED] oob_was/14026539277
[14:09:17] [PASSED] oob_was/14027054324
[14:09:17] [PASSED] oob_was/14025941587
[14:09:17] [PASSED] oob_was/16030224309
[14:09:17] [PASSED] oob_was/14028709524
[14:09:17] [PASSED] oob_was/14028250015
[14:09:17] [PASSED] oob_was/16031259911
[14:09:17] ============== [PASSED] xe_rtp_table_oob_test ==============
[14:09:17] ================ xe_rtp_table_dev_oob_test  ================
[14:09:17] [PASSED] device_oob_was/22010954014
[14:09:17] [PASSED] device_oob_was/15015404425
[14:09:17] [PASSED] device_oob_was/22019338487_display
[14:09:17] [PASSED] device_oob_was/14022085890
[14:09:17] [PASSED] device_oob_was/14026633728
[14:09:17] [PASSED] device_oob_was/14026746987
[14:09:17] [PASSED] device_oob_was/14026779378
[14:09:17] [PASSED] device_oob_was/14028586678
[14:09:17] [PASSED] device_oob_was/14028434957
[14:09:17] ============ [PASSED] xe_rtp_table_dev_oob_test ============
[14:09:17] ========== xe_rtp_table_missing_upper_bound_test  ==========
[14:09:17] [PASSED] register_whitelist/WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865
[14:09:17] [PASSED] register_whitelist/1508744258, 14012131227, 1808121037
[14:09:17] [PASSED] register_whitelist/1806527549
[14:09:17] [PASSED] register_whitelist/allow_read_ctx_timestamp
[14:09:17] [PASSED] register_whitelist/allow_read_queue_timestamp
[14:09:17] [PASSED] register_whitelist/16014440446
[14:09:17] [PASSED] register_whitelist/16017236439
[14:09:17] [PASSED] register_whitelist/16020183090
[14:09:17] [PASSED] register_whitelist/14024997852
[14:09:17] [PASSED] register_whitelist/14024997852
[14:09:17] ====== [PASSED] xe_rtp_table_missing_upper_bound_test ======
[14:09:17] =============== [PASSED] xe_rtp_tables_test ================
[14:09:17] =================== xe_rtp (3 subtests) ====================
[14:09:17] =================== xe_rtp_rules_tests  ====================
[14:09:17] [PASSED] no
[14:09:17] [PASSED] yes
[14:09:17] [PASSED] no-and-no
[14:09:17] [PASSED] no-and-yes
[14:09:17] [PASSED] yes-and-no
[14:09:17] [PASSED] yes-and-yes
[14:09:17] [PASSED] no-or-no
[14:09:17] [PASSED] no-or-yes
[14:09:17] [PASSED] yes-or-no
[14:09:18] [PASSED] yes-or-yes
[14:09:18] [PASSED] no-yes-or-yes-no
[14:09:18] [PASSED] no-yes-or-yes-yes
[14:09:18] [PASSED] yes-yes-or-no-yes
[14:09:18] [PASSED] yes-yes-or-yes-yes
[14:09:18] [PASSED] no-no-or-yes-or-no
[14:09:18] [PASSED] or
[14:09:18] [PASSED] or-yes
[14:09:18] [PASSED] or-no
[14:09:18] [PASSED] yes-or
[14:09:18] [PASSED] no-or
[14:09:18] [PASSED] no-or-or-yes
[14:09:18] [PASSED] yes-or-or-no
[14:09:18] [PASSED] no-or-or-no
[14:09:18] [PASSED] missing-context-engine-class
[14:09:18] [PASSED] missing-context-engine-class-or-yes
[14:09:18] [PASSED] missing-context-engine-class-or-or-yes
[14:09:18] =============== [PASSED] xe_rtp_rules_tests ================
[14:09:18] =============== xe_rtp_process_to_sr_tests  ================
[14:09:18] [PASSED] coalesce-same-reg
[14:09:18] [PASSED] coalesce-same-reg-literal-and-func
[14:09:18] [PASSED] no-match-no-add
[14:09:18] [PASSED] two-regs-two-entries
[14:09:18] [PASSED] clr-one-set-other
[14:09:18] [PASSED] set-field
[14:09:18] [PASSED] conflict-duplicate
[14:09:18] [PASSED] conflict-not-disjoint
[14:09:18] [PASSED] conflict-not-disjoint-literal-and-func
[14:09:18] [PASSED] conflict-reg-type
[14:09:18] [PASSED] bad-mcr-reg-forced-to-regular
[14:09:18] [PASSED] bad-regular-reg-forced-to-mcr
[14:09:18] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[14:09:18] ================== xe_rtp_process_tests  ===================
[14:09:18] [PASSED] active1
[14:09:18] [PASSED] active2
[14:09:18] [PASSED] active-inactive
[14:09:18] [PASSED] inactive-active
[14:09:18] [PASSED] inactive-active-inactive
[14:09:18] [PASSED] inactive-inactive-inactive
[14:09:18] ============== [PASSED] xe_rtp_process_tests ===============
[14:09:18] ===================== [PASSED] xe_rtp ======================
[14:09:18] ==================== xe_wa (1 subtest) =====================
[14:09:18] ======================== xe_wa_gt  =========================
[14:09:18] [PASSED] TIGERLAKE B0
[14:09:18] [PASSED] DG1 A0
[14:09:18] [PASSED] DG1 B0
[14:09:18] [PASSED] ALDERLAKE_S A0
[14:09:18] [PASSED] ALDERLAKE_S B0
[14:09:18] [PASSED] ALDERLAKE_S C0
[14:09:18] [PASSED] ALDERLAKE_S D0
[14:09:18] [PASSED] ALDERLAKE_P A0
[14:09:18] [PASSED] ALDERLAKE_P B0
[14:09:18] [PASSED] ALDERLAKE_P C0
[14:09:18] [PASSED] ALDERLAKE_S RPLS D0
[14:09:18] [PASSED] ALDERLAKE_P RPLU E0
[14:09:18] [PASSED] DG2 G10 C0
[14:09:18] [PASSED] DG2 G11 B1
[14:09:18] [PASSED] DG2 G12 A1
[14:09:18] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[14:09:18] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[14:09:18] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[14:09:18] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[14:09:18] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[14:09:18] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[14:09:18] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[14:09:18] ==================== [PASSED] xe_wa_gt =====================
[14:09:18] ====================== [PASSED] xe_wa ======================
[14:09:18] ============================================================
[14:09:18] Testing complete. Ran 860 tests: passed: 831, skipped: 29
[14:09:18] Elapsed time: 41.954s total, 2.487s configuring, 38.701s building, 0.740s running

+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[14:09:18] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:09:20] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[14:09:45] Starting KUnit Kernel (1/1)...
[14:09:45] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[14:09:45] ============ drm_test_pick_cmdline (2 subtests) ============
[14:09:45] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[14:09:45] =============== drm_test_pick_cmdline_named  ===============
[14:09:45] [PASSED] NTSC
[14:09:45] [PASSED] NTSC-J
[14:09:45] [PASSED] PAL
[14:09:45] [PASSED] PAL-M
[14:09:45] =========== [PASSED] drm_test_pick_cmdline_named ===========
[14:09:45] ============== [PASSED] drm_test_pick_cmdline ==============
[14:09:45] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[14:09:45] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[14:09:45] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[14:09:45] =========== drm_validate_clone_mode (2 subtests) ===========
[14:09:45] ============== drm_test_check_in_clone_mode  ===============
[14:09:45] [PASSED] in_clone_mode
[14:09:45] [PASSED] not_in_clone_mode
[14:09:45] ========== [PASSED] drm_test_check_in_clone_mode ===========
[14:09:45] =============== drm_test_check_valid_clones  ===============
[14:09:45] [PASSED] not_in_clone_mode
[14:09:45] [PASSED] valid_clone
[14:09:45] [PASSED] invalid_clone
[14:09:45] =========== [PASSED] drm_test_check_valid_clones ===========
[14:09:45] ============= [PASSED] drm_validate_clone_mode =============
[14:09:45] ============= drm_validate_modeset (1 subtest) =============
[14:09:45] [PASSED] drm_test_check_connector_changed_modeset
[14:09:45] ============== [PASSED] drm_validate_modeset ===============
[14:09:45] ====== drm_test_bridge_get_current_state (1 subtest) =======
[14:09:45] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[14:09:45] ======== [PASSED] drm_test_bridge_get_current_state ========
[14:09:45] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[14:09:45] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[14:09:45] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[14:09:45] [PASSED] drm_test_drm_bridge_helper_hdmi_output_bus_fmts
[14:09:45] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[14:09:45] ============== drm_bridge_alloc (2 subtests) ===============
[14:09:45] [PASSED] drm_test_drm_bridge_alloc_basic
[14:09:45] [PASSED] drm_test_drm_bridge_alloc_get_put
[14:09:45] ================ [PASSED] drm_bridge_alloc =================
[14:09:45] ============= drm_bridge_bus_fmt (5 subtests) ==============
[14:09:45] [PASSED] drm_test_bridge_rgb_yuv_rgb
[14:09:45] [PASSED] drm_test_bridge_must_convert_to_yuv444
[14:09:45] [PASSED] drm_test_bridge_hdmi_auto_rgb
[14:09:45] [PASSED] drm_test_bridge_auto_first
[14:09:45] [PASSED] drm_test_bridge_rgb_yuv_no_path
[14:09:45] =============== [PASSED] drm_bridge_bus_fmt ================
[14:09:45] ============= drm_cmdline_parser (40 subtests) =============
[14:09:45] [PASSED] drm_test_cmdline_force_d_only
[14:09:45] [PASSED] drm_test_cmdline_force_D_only_dvi
[14:09:45] [PASSED] drm_test_cmdline_force_D_only_hdmi
[14:09:45] [PASSED] drm_test_cmdline_force_D_only_not_digital
[14:09:45] [PASSED] drm_test_cmdline_force_e_only
[14:09:45] [PASSED] drm_test_cmdline_res
[14:09:45] [PASSED] drm_test_cmdline_res_vesa
[14:09:45] [PASSED] drm_test_cmdline_res_vesa_rblank
[14:09:45] [PASSED] drm_test_cmdline_res_rblank
[14:09:45] [PASSED] drm_test_cmdline_res_bpp
[14:09:45] [PASSED] drm_test_cmdline_res_refresh
[14:09:45] [PASSED] drm_test_cmdline_res_bpp_refresh
[14:09:45] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[14:09:45] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[14:09:45] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[14:09:45] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[14:09:45] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[14:09:45] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[14:09:45] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[14:09:45] [PASSED] drm_test_cmdline_res_margins_force_on
[14:09:45] [PASSED] drm_test_cmdline_res_vesa_margins
[14:09:45] [PASSED] drm_test_cmdline_name
[14:09:45] [PASSED] drm_test_cmdline_name_bpp
[14:09:45] [PASSED] drm_test_cmdline_name_option
[14:09:45] [PASSED] drm_test_cmdline_name_bpp_option
[14:09:45] [PASSED] drm_test_cmdline_rotate_0
[14:09:45] [PASSED] drm_test_cmdline_rotate_90
[14:09:45] [PASSED] drm_test_cmdline_rotate_180
[14:09:45] [PASSED] drm_test_cmdline_rotate_270
[14:09:45] [PASSED] drm_test_cmdline_hmirror
[14:09:45] [PASSED] drm_test_cmdline_vmirror
[14:09:45] [PASSED] drm_test_cmdline_margin_options
[14:09:45] [PASSED] drm_test_cmdline_multiple_options
[14:09:45] [PASSED] drm_test_cmdline_bpp_extra_and_option
[14:09:45] [PASSED] drm_test_cmdline_extra_and_option
[14:09:45] [PASSED] drm_test_cmdline_freestanding_options
[14:09:45] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[14:09:45] [PASSED] drm_test_cmdline_panel_orientation
[14:09:45] ================ drm_test_cmdline_invalid  =================
[14:09:45] [PASSED] margin_only
[14:09:45] [PASSED] interlace_only
[14:09:45] [PASSED] res_missing_x
[14:09:45] [PASSED] res_missing_y
[14:09:45] [PASSED] res_bad_y
[14:09:45] [PASSED] res_missing_y_bpp
[14:09:45] [PASSED] res_bad_bpp
[14:09:45] [PASSED] res_bad_refresh
[14:09:45] [PASSED] res_bpp_refresh_force_on_off
[14:09:45] [PASSED] res_invalid_mode
[14:09:45] [PASSED] res_bpp_wrong_place_mode
[14:09:45] [PASSED] name_bpp_refresh
[14:09:45] [PASSED] name_refresh
[14:09:45] [PASSED] name_refresh_wrong_mode
[14:09:45] [PASSED] name_refresh_invalid_mode
[14:09:45] [PASSED] rotate_multiple
[14:09:45] [PASSED] rotate_invalid_val
[14:09:45] [PASSED] rotate_truncated
[14:09:45] [PASSED] invalid_option
[14:09:45] [PASSED] invalid_tv_option
[14:09:45] [PASSED] truncated_tv_option
[14:09:45] ============ [PASSED] drm_test_cmdline_invalid =============
[14:09:45] =============== drm_test_cmdline_tv_options  ===============
[14:09:45] [PASSED] NTSC
[14:09:45] [PASSED] NTSC_443
[14:09:45] [PASSED] NTSC_J
[14:09:45] [PASSED] PAL
[14:09:45] [PASSED] PAL_M
[14:09:45] [PASSED] PAL_N
[14:09:45] [PASSED] SECAM
[14:09:45] [PASSED] MONO_525
[14:09:45] [PASSED] MONO_625
[14:09:45] =========== [PASSED] drm_test_cmdline_tv_options ===========
[14:09:45] =============== [PASSED] drm_cmdline_parser ================
[14:09:45] ========== drmm_connector_hdmi_init (20 subtests) ==========
[14:09:45] [PASSED] drm_test_connector_hdmi_init_valid
[14:09:45] [PASSED] drm_test_connector_hdmi_init_bpc_8
[14:09:45] [PASSED] drm_test_connector_hdmi_init_bpc_10
[14:09:45] [PASSED] drm_test_connector_hdmi_init_bpc_12
[14:09:45] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[14:09:45] [PASSED] drm_test_connector_hdmi_init_bpc_null
[14:09:45] [PASSED] drm_test_connector_hdmi_init_formats_empty
[14:09:45] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[14:09:45] === drm_test_connector_hdmi_init_formats_yuv420_allowed  ===
[14:09:45] [PASSED] supported_formats=0x9 yuv420_allowed=1
[14:09:45] [PASSED] supported_formats=0x9 yuv420_allowed=0
[14:09:45] [PASSED] supported_formats=0x5 yuv420_allowed=1
[14:09:45] [PASSED] supported_formats=0x5 yuv420_allowed=0
[14:09:45] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[14:09:45] [PASSED] drm_test_connector_hdmi_init_null_ddc
[14:09:45] [PASSED] drm_test_connector_hdmi_init_null_product
[14:09:45] [PASSED] drm_test_connector_hdmi_init_null_vendor
[14:09:45] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[14:09:45] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[14:09:45] [PASSED] drm_test_connector_hdmi_init_product_valid
[14:09:45] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[14:09:45] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[14:09:45] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[14:09:45] ========= drm_test_connector_hdmi_init_type_valid  =========
[14:09:45] [PASSED] HDMI-A
[14:09:45] [PASSED] HDMI-B
[14:09:45] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[14:09:45] ======== drm_test_connector_hdmi_init_type_invalid  ========
[14:09:45] [PASSED] Unknown
[14:09:45] [PASSED] VGA
[14:09:45] [PASSED] DVI-I
[14:09:45] [PASSED] DVI-D
[14:09:45] [PASSED] DVI-A
[14:09:45] [PASSED] Composite
[14:09:45] [PASSED] SVIDEO
[14:09:45] [PASSED] LVDS
[14:09:45] [PASSED] Component
[14:09:45] [PASSED] DIN
[14:09:45] [PASSED] DP
[14:09:45] [PASSED] TV
[14:09:45] [PASSED] eDP
[14:09:45] [PASSED] Virtual
[14:09:45] [PASSED] DSI
[14:09:45] [PASSED] DPI
[14:09:45] [PASSED] Writeback
[14:09:45] [PASSED] SPI
[14:09:45] [PASSED] USB
[14:09:45] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[14:09:45] ============ [PASSED] drmm_connector_hdmi_init =============
[14:09:45] ============= drmm_connector_init (3 subtests) =============
[14:09:45] [PASSED] drm_test_drmm_connector_init
[14:09:45] [PASSED] drm_test_drmm_connector_init_null_ddc
[14:09:45] ========= drm_test_drmm_connector_init_type_valid  =========
[14:09:45] [PASSED] Unknown
[14:09:45] [PASSED] VGA
[14:09:45] [PASSED] DVI-I
[14:09:45] [PASSED] DVI-D
[14:09:45] [PASSED] DVI-A
[14:09:45] [PASSED] Composite
[14:09:45] [PASSED] SVIDEO
[14:09:45] [PASSED] LVDS
[14:09:45] [PASSED] Component
[14:09:45] [PASSED] DIN
[14:09:45] [PASSED] DP
[14:09:45] [PASSED] HDMI-A
[14:09:45] [PASSED] HDMI-B
[14:09:45] [PASSED] TV
[14:09:45] [PASSED] eDP
[14:09:45] [PASSED] Virtual
[14:09:45] [PASSED] DSI
[14:09:45] [PASSED] DPI
[14:09:45] [PASSED] Writeback
[14:09:45] [PASSED] SPI
[14:09:45] [PASSED] USB
[14:09:45] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[14:09:45] =============== [PASSED] drmm_connector_init ===============
[14:09:45] ========= drm_connector_dynamic_init (6 subtests) ==========
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_init
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_init_properties
[14:09:45] ===== drm_test_drm_connector_dynamic_init_type_valid  ======
[14:09:45] [PASSED] Unknown
[14:09:45] [PASSED] VGA
[14:09:45] [PASSED] DVI-I
[14:09:45] [PASSED] DVI-D
[14:09:45] [PASSED] DVI-A
[14:09:45] [PASSED] Composite
[14:09:45] [PASSED] SVIDEO
[14:09:45] [PASSED] LVDS
[14:09:45] [PASSED] Component
[14:09:45] [PASSED] DIN
[14:09:45] [PASSED] DP
[14:09:45] [PASSED] HDMI-A
[14:09:45] [PASSED] HDMI-B
[14:09:45] [PASSED] TV
[14:09:45] [PASSED] eDP
[14:09:45] [PASSED] Virtual
[14:09:45] [PASSED] DSI
[14:09:45] [PASSED] DPI
[14:09:45] [PASSED] Writeback
[14:09:45] [PASSED] SPI
[14:09:45] [PASSED] USB
[14:09:45] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[14:09:45] ======== drm_test_drm_connector_dynamic_init_name  =========
[14:09:45] [PASSED] Unknown
[14:09:45] [PASSED] VGA
[14:09:45] [PASSED] DVI-I
[14:09:45] [PASSED] DVI-D
[14:09:45] [PASSED] DVI-A
[14:09:45] [PASSED] Composite
[14:09:45] [PASSED] SVIDEO
[14:09:45] [PASSED] LVDS
[14:09:45] [PASSED] Component
[14:09:45] [PASSED] DIN
[14:09:45] [PASSED] DP
[14:09:45] [PASSED] HDMI-A
[14:09:45] [PASSED] HDMI-B
[14:09:45] [PASSED] TV
[14:09:45] [PASSED] eDP
[14:09:45] [PASSED] Virtual
[14:09:45] [PASSED] DSI
[14:09:45] [PASSED] DPI
[14:09:45] [PASSED] Writeback
[14:09:45] [PASSED] SPI
[14:09:45] [PASSED] USB
[14:09:45] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[14:09:45] =========== [PASSED] drm_connector_dynamic_init ============
[14:09:45] ==== drm_connector_dynamic_register_early (4 subtests) =====
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[14:09:45] ====== [PASSED] drm_connector_dynamic_register_early =======
[14:09:45] ======= drm_connector_dynamic_register (7 subtests) ========
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[14:09:45] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[14:09:45] ========= [PASSED] drm_connector_dynamic_register ==========
[14:09:45] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[14:09:45] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[14:09:45] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[14:09:45] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[14:09:45] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[14:09:45] ========== drm_test_get_tv_mode_from_name_valid  ===========
[14:09:45] [PASSED] NTSC
[14:09:45] [PASSED] NTSC-443
[14:09:45] [PASSED] NTSC-J
[14:09:45] [PASSED] PAL
[14:09:45] [PASSED] PAL-M
[14:09:45] [PASSED] PAL-N
[14:09:45] [PASSED] SECAM
[14:09:45] [PASSED] Mono
[14:09:45] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[14:09:45] [PASSED] drm_test_get_tv_mode_from_name_truncated
[14:09:45] ============ [PASSED] drm_get_tv_mode_from_name ============
[14:09:45] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[14:09:45] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[14:09:45] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[14:09:45] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[14:09:45] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[14:09:45] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[14:09:45] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[14:09:45] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[14:09:45] [PASSED] VIC 96
[14:09:45] [PASSED] VIC 97
[14:09:45] [PASSED] VIC 101
[14:09:45] [PASSED] VIC 102
[14:09:45] [PASSED] VIC 106
[14:09:45] [PASSED] VIC 107
[14:09:45] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[14:09:45] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[14:09:45] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[14:09:45] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[14:09:45] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[14:09:45] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[14:09:45] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[14:09:45] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[14:09:45] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[14:09:45] [PASSED] Automatic
[14:09:45] [PASSED] Full
[14:09:45] [PASSED] Limited 16:235
[14:09:45] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[14:09:45] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[14:09:45] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[14:09:45] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[14:09:45] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[14:09:45] [PASSED] RGB
[14:09:45] [PASSED] YUV 4:2:0
[14:09:45] [PASSED] YUV 4:2:2
[14:09:45] [PASSED] YUV 4:4:4
[14:09:45] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[14:09:45] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[14:09:45] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[14:09:45] ============= drm_damage_helper (21 subtests) ==============
[14:09:45] [PASSED] drm_test_damage_iter_no_damage
[14:09:45] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[14:09:45] [PASSED] drm_test_damage_iter_no_damage_src_moved
[14:09:45] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[14:09:45] [PASSED] drm_test_damage_iter_no_damage_not_visible
[14:09:45] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[14:09:45] [PASSED] drm_test_damage_iter_no_damage_no_fb
[14:09:45] [PASSED] drm_test_damage_iter_simple_damage
[14:09:45] [PASSED] drm_test_damage_iter_single_damage
[14:09:45] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[14:09:45] [PASSED] drm_test_damage_iter_single_damage_outside_src
[14:09:45] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[14:09:45] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[14:09:45] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[14:09:45] [PASSED] drm_test_damage_iter_single_damage_src_moved
[14:09:45] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[14:09:45] [PASSED] drm_test_damage_iter_damage
[14:09:45] [PASSED] drm_test_damage_iter_damage_one_intersect
[14:09:45] [PASSED] drm_test_damage_iter_damage_one_outside
[14:09:45] [PASSED] drm_test_damage_iter_damage_src_moved
[14:09:45] [PASSED] drm_test_damage_iter_damage_not_visible
[14:09:45] ================ [PASSED] drm_damage_helper ================
[14:09:45] ============== drm_dp_mst_helper (3 subtests) ==============
[14:09:45] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[14:09:45] [PASSED] Clock 154000 BPP 30 DSC disabled
[14:09:45] [PASSED] Clock 234000 BPP 30 DSC disabled
[14:09:45] [PASSED] Clock 297000 BPP 24 DSC disabled
[14:09:45] [PASSED] Clock 332880 BPP 24 DSC enabled
[14:09:45] [PASSED] Clock 324540 BPP 24 DSC enabled
[14:09:45] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[14:09:45] ============== drm_test_dp_mst_calc_pbn_div  ===============
[14:09:45] [PASSED] Link rate 2000000 lane count 4
[14:09:45] [PASSED] Link rate 2000000 lane count 2
[14:09:45] [PASSED] Link rate 2000000 lane count 1
[14:09:45] [PASSED] Link rate 1350000 lane count 4
[14:09:45] [PASSED] Link rate 1350000 lane count 2
[14:09:45] [PASSED] Link rate 1350000 lane count 1
[14:09:45] [PASSED] Link rate 1000000 lane count 4
[14:09:45] [PASSED] Link rate 1000000 lane count 2
[14:09:45] [PASSED] Link rate 1000000 lane count 1
[14:09:45] [PASSED] Link rate 810000 lane count 4
[14:09:45] [PASSED] Link rate 810000 lane count 2
[14:09:45] [PASSED] Link rate 810000 lane count 1
[14:09:45] [PASSED] Link rate 540000 lane count 4
[14:09:45] [PASSED] Link rate 540000 lane count 2
[14:09:45] [PASSED] Link rate 540000 lane count 1
[14:09:45] [PASSED] Link rate 270000 lane count 4
[14:09:45] [PASSED] Link rate 270000 lane count 2
[14:09:45] [PASSED] Link rate 270000 lane count 1
[14:09:45] [PASSED] Link rate 162000 lane count 4
[14:09:45] [PASSED] Link rate 162000 lane count 2
[14:09:45] [PASSED] Link rate 162000 lane count 1
[14:09:45] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[14:09:45] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[14:09:45] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[14:09:45] [PASSED] DP_POWER_UP_PHY with port number
[14:09:45] [PASSED] DP_POWER_DOWN_PHY with port number
[14:09:45] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[14:09:45] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[14:09:45] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[14:09:45] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[14:09:45] [PASSED] DP_QUERY_PAYLOAD with port number
[14:09:45] [PASSED] DP_QUERY_PAYLOAD with VCPI
[14:09:45] [PASSED] DP_REMOTE_DPCD_READ with port number
[14:09:45] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[14:09:45] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[14:09:45] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[14:09:45] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[14:09:45] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[14:09:45] [PASSED] DP_REMOTE_I2C_READ with port number
[14:09:45] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[14:09:45] [PASSED] DP_REMOTE_I2C_READ with transactions array
[14:09:45] [PASSED] DP_REMOTE_I2C_WRITE with port number
[14:09:45] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[14:09:45] [PASSED] DP_REMOTE_I2C_WRITE with data array
[14:09:45] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[14:09:45] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[14:09:45] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[14:09:45] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[14:09:45] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[14:09:45] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[14:09:45] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[14:09:45] ================ [PASSED] drm_dp_mst_helper ================
[14:09:45] ================== drm_exec (7 subtests) ===================
[14:09:45] [PASSED] sanitycheck
[14:09:45] [PASSED] test_lock
[14:09:45] [PASSED] test_lock_unlock
[14:09:45] [PASSED] test_duplicates
[14:09:45] [PASSED] test_prepare
[14:09:45] [PASSED] test_prepare_array
[14:09:45] [PASSED] test_multiple_loops
[14:09:45] ==================== [PASSED] drm_exec =====================
[14:09:45] =========== drm_format_helper_test (17 subtests) ===========
[14:09:45] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[14:09:45] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[14:09:45] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[14:09:45] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[14:09:45] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[14:09:45] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[14:09:45] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[14:09:45] ============= drm_test_fb_xrgb8888_to_bgr888  ==============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[14:09:45] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[14:09:45] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[14:09:45] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[14:09:45] ============== drm_test_fb_xrgb8888_to_mono  ===============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[14:09:45] ==================== drm_test_fb_swab  =====================
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ================ [PASSED] drm_test_fb_swab =================
[14:09:45] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[14:09:45] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[14:09:45] [PASSED] single_pixel_source_buffer
[14:09:45] [PASSED] single_pixel_clip_rectangle
[14:09:45] [PASSED] well_known_colors
[14:09:45] [PASSED] destination_pitch
[14:09:45] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[14:09:45] ================= drm_test_fb_clip_offset  =================
[14:09:45] [PASSED] pass through
[14:09:45] [PASSED] horizontal offset
[14:09:45] [PASSED] vertical offset
[14:09:45] [PASSED] horizontal and vertical offset
[14:09:45] [PASSED] horizontal offset (custom pitch)
[14:09:45] [PASSED] vertical offset (custom pitch)
[14:09:45] [PASSED] horizontal and vertical offset (custom pitch)
[14:09:45] ============= [PASSED] drm_test_fb_clip_offset =============
[14:09:45] =================== drm_test_fb_memcpy  ====================
[14:09:45] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[14:09:45] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[14:09:45] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[14:09:45] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[14:09:45] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[14:09:45] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[14:09:45] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[14:09:45] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[14:09:45] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[14:09:45] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[14:09:45] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[14:09:45] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[14:09:45] =============== [PASSED] drm_test_fb_memcpy ================
[14:09:45] ============= [PASSED] drm_format_helper_test ==============
[14:09:45] ================= drm_format (18 subtests) =================
[14:09:45] [PASSED] drm_test_format_block_width_invalid
[14:09:45] [PASSED] drm_test_format_block_width_one_plane
[14:09:45] [PASSED] drm_test_format_block_width_two_plane
[14:09:45] [PASSED] drm_test_format_block_width_three_plane
[14:09:45] [PASSED] drm_test_format_block_width_tiled
[14:09:45] [PASSED] drm_test_format_block_height_invalid
[14:09:45] [PASSED] drm_test_format_block_height_one_plane
[14:09:45] [PASSED] drm_test_format_block_height_two_plane
[14:09:45] [PASSED] drm_test_format_block_height_three_plane
[14:09:45] [PASSED] drm_test_format_block_height_tiled
[14:09:45] [PASSED] drm_test_format_min_pitch_invalid
[14:09:45] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[14:09:45] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[14:09:45] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[14:09:45] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[14:09:45] [PASSED] drm_test_format_min_pitch_two_plane
[14:09:45] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[14:09:45] [PASSED] drm_test_format_min_pitch_tiled
[14:09:45] =================== [PASSED] drm_format ====================
[14:09:45] ============== drm_framebuffer (10 subtests) ===============
[14:09:45] ========== drm_test_framebuffer_check_src_coords  ==========
[14:09:45] [PASSED] Success: source fits into fb
[14:09:45] [PASSED] Fail: overflowing fb with x-axis coordinate
[14:09:45] [PASSED] Fail: overflowing fb with y-axis coordinate
[14:09:45] [PASSED] Fail: overflowing fb with source width
[14:09:45] [PASSED] Fail: overflowing fb with source height
[14:09:45] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[14:09:45] [PASSED] drm_test_framebuffer_cleanup
[14:09:45] =============== drm_test_framebuffer_create  ===============
[14:09:45] [PASSED] ABGR8888 normal sizes
[14:09:45] [PASSED] ABGR8888 max sizes
[14:09:45] [PASSED] ABGR8888 pitch greater than min required
[14:09:45] [PASSED] ABGR8888 pitch less than min required
[14:09:45] [PASSED] ABGR8888 Invalid width
[14:09:45] [PASSED] ABGR8888 Invalid buffer handle
[14:09:45] [PASSED] No pixel format
[14:09:45] [PASSED] ABGR8888 Width 0
[14:09:45] [PASSED] ABGR8888 Height 0
[14:09:45] [PASSED] ABGR8888 Out of bound height * pitch combination
[14:09:45] [PASSED] ABGR8888 Large buffer offset
[14:09:45] [PASSED] ABGR8888 Buffer offset for inexistent plane
[14:09:45] [PASSED] ABGR8888 Invalid flag
[14:09:45] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[14:09:45] [PASSED] ABGR8888 Valid buffer modifier
[14:09:45] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[14:09:45] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[14:09:45] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[14:09:45] [PASSED] NV12 Normal sizes
[14:09:45] [PASSED] NV12 Max sizes
[14:09:45] [PASSED] NV12 Invalid pitch
[14:09:45] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[14:09:45] [PASSED] NV12 different  modifier per-plane
[14:09:45] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[14:09:45] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[14:09:45] [PASSED] NV12 Modifier for inexistent plane
[14:09:45] [PASSED] NV12 Handle for inexistent plane
[14:09:45] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[14:09:45] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[14:09:45] [PASSED] YVU420 Normal sizes
[14:09:45] [PASSED] YVU420 Max sizes
[14:09:45] [PASSED] YVU420 Invalid pitch
[14:09:45] [PASSED] YVU420 Different pitches
[14:09:45] [PASSED] YVU420 Different buffer offsets/pitches
[14:09:45] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[14:09:45] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[14:09:45] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[14:09:45] [PASSED] YVU420 Valid modifier
[14:09:45] [PASSED] YVU420 Different modifiers per plane
[14:09:45] [PASSED] YVU420 Modifier for inexistent plane
[14:09:45] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[14:09:45] [PASSED] X0L2 Normal sizes
[14:09:45] [PASSED] X0L2 Max sizes
[14:09:45] [PASSED] X0L2 Invalid pitch
[14:09:45] [PASSED] X0L2 Pitch greater than minimum required
[14:09:45] [PASSED] X0L2 Handle for inexistent plane
[14:09:45] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[14:09:45] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[14:09:45] [PASSED] X0L2 Valid modifier
[14:09:45] [PASSED] X0L2 Modifier for inexistent plane
[14:09:45] =========== [PASSED] drm_test_framebuffer_create ===========
[14:09:45] [PASSED] drm_test_framebuffer_free
[14:09:45] [PASSED] drm_test_framebuffer_init
[14:09:45] [PASSED] drm_test_framebuffer_init_bad_format
[14:09:45] [PASSED] drm_test_framebuffer_init_dev_mismatch
[14:09:45] [PASSED] drm_test_framebuffer_lookup
[14:09:45] [PASSED] drm_test_framebuffer_lookup_inexistent
[14:09:45] [PASSED] drm_test_framebuffer_modifiers_not_supported
[14:09:45] ================= [PASSED] drm_framebuffer =================
[14:09:45] ================ drm_gem_shmem (8 subtests) ================
[14:09:45] [PASSED] drm_gem_shmem_test_obj_create
[14:09:45] [PASSED] drm_gem_shmem_test_obj_create_private
[14:09:45] [PASSED] drm_gem_shmem_test_pin_pages
[14:09:45] [PASSED] drm_gem_shmem_test_vmap
[14:09:45] [PASSED] drm_gem_shmem_test_get_sg_table
[14:09:45] [PASSED] drm_gem_shmem_test_get_pages_sgt
[14:09:45] [PASSED] drm_gem_shmem_test_madvise
[14:09:45] [PASSED] drm_gem_shmem_test_purge
[14:09:45] ================== [PASSED] drm_gem_shmem ==================
[14:09:45] === drm_atomic_helper_connector_hdmi_check (29 subtests) ===
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[14:09:45] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420  =======
[14:09:45] [PASSED] Automatic
[14:09:45] [PASSED] Full
[14:09:45] [PASSED] Limited 16:235
[14:09:45] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[14:09:45] [PASSED] drm_test_check_disable_connector
[14:09:45] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[14:09:45] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[14:09:45] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[14:09:45] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[14:09:45] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[14:09:45] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[14:09:45] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[14:09:45] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[14:09:45] [PASSED] drm_test_check_output_bpc_dvi
[14:09:45] [PASSED] drm_test_check_output_bpc_format_vic_1
[14:09:45] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[14:09:45] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[14:09:45] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[14:09:45] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[14:09:45] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[14:09:45] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[14:09:45] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[14:09:45] ============ drm_test_check_hdmi_color_format  =============
[14:09:45] [PASSED] AUTO -> RGB
[14:09:45] [PASSED] YCBCR422 -> YUV422
[14:09:45] [PASSED] YCBCR420 -> YUV420
[14:09:45] [PASSED] YCBCR444 -> YUV444
[14:09:45] [PASSED] RGB -> RGB
[14:09:45] ======== [PASSED] drm_test_check_hdmi_color_format =========
[14:09:45] ======== drm_test_check_hdmi_color_format_420_only  ========
[14:09:45] [PASSED] RGB should fail
[14:09:45] [PASSED] YUV444 should fail
[14:09:45] [PASSED] YUV422 should fail
[14:09:45] [PASSED] YUV420 should work
[14:09:45] ==== [PASSED] drm_test_check_hdmi_color_format_420_only ====
[14:09:45] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[14:09:45] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[14:09:45] [PASSED] drm_test_check_broadcast_rgb_value
[14:09:45] [PASSED] drm_test_check_bpc_8_value
[14:09:45] [PASSED] drm_test_check_bpc_10_value
[14:09:45] [PASSED] drm_test_check_bpc_12_value
[14:09:45] [PASSED] drm_test_check_format_value
[14:09:45] [PASSED] drm_test_check_tmds_char_value
[14:09:45] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[14:09:45] = drm_atomic_helper_connector_hdmi_mode_valid (7 subtests) =
[14:09:45] [PASSED] drm_test_check_mode_valid
[14:09:45] [PASSED] drm_test_check_mode_valid_reject
[14:09:45] [PASSED] drm_test_check_mode_valid_reject_rate
[14:09:45] [PASSED] drm_test_check_mode_valid_reject_max_clock
[14:09:45] [PASSED] drm_test_check_mode_valid_yuv420_only_max_clock
[14:09:45] [PASSED] drm_test_check_mode_valid_reject_yuv420_only_connector
[14:09:45] [PASSED] drm_test_check_mode_valid_accept_yuv420_also_connector_rgb
[14:09:45] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[14:09:45] = drm_atomic_helper_connector_hdmi_infoframes (5 subtests) =
[14:09:45] [PASSED] drm_test_check_infoframes
[14:09:45] [PASSED] drm_test_check_reject_avi_infoframe
[14:09:45] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_8
[14:09:45] [PASSED] drm_test_check_reject_hdr_infoframe_bpc_10
[14:09:45] [PASSED] drm_test_check_reject_audio_infoframe
[14:09:45] === [PASSED] drm_atomic_helper_connector_hdmi_infoframes ===
[14:09:45] ================= drm_managed (2 subtests) =================
[14:09:45] [PASSED] drm_test_managed_release_action
[14:09:45] [PASSED] drm_test_managed_run_action
[14:09:45] =================== [PASSED] drm_managed ===================
[14:09:45] =================== drm_mm (6 subtests) ====================
[14:09:45] [PASSED] drm_test_mm_init
[14:09:45] [PASSED] drm_test_mm_debug
[14:09:45] [PASSED] drm_test_mm_align32
[14:09:45] [PASSED] drm_test_mm_align64
[14:09:45] [PASSED] drm_test_mm_lowest
[14:09:45] [PASSED] drm_test_mm_highest
[14:09:45] ===================== [PASSED] drm_mm ======================
[14:09:45] ============= drm_modes_analog_tv (5 subtests) =============
[14:09:45] [PASSED] drm_test_modes_analog_tv_mono_576i
[14:09:45] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[14:09:45] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[14:09:45] [PASSED] drm_test_modes_analog_tv_pal_576i
[14:09:45] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[14:09:45] =============== [PASSED] drm_modes_analog_tv ===============
[14:09:45] ============== drm_panic_helper (3 subtests) ===============
[14:09:45] ============= drm_test_panic_screen_user_map  ==============
[14:09:45] [PASSED] Panic screen user, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen user, mode: 494 x 494 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen user, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen user, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[14:09:45] [PASSED] Panic screen user, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[14:09:45] [PASSED] Panic screen kmsg, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen kmsg, mode: 494 x 494 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen kmsg, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[14:09:45] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[14:09:45] ========= [PASSED] drm_test_panic_screen_user_map ==========
[14:09:45] ============= drm_test_panic_screen_user_page  =============
[14:09:45] [PASSED] Panic screen user, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen user, mode: 494 x 494 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen user, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[14:09:45] [PASSED] Panic screen user, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[14:09:45] [PASSED] Panic screen user, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[14:09:45] [PASSED] Panic screen kmsg, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen kmsg, mode: 494 x 494 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen kmsg, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[14:09:46] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[14:09:46] ========= [PASSED] drm_test_panic_screen_user_page =========
[14:09:46] ========== drm_test_panic_screen_user_set_pixel  ===========
[14:09:46] [PASSED] Panic screen user, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen user, mode: 494 x 494 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen user, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen user, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[14:09:46] [PASSED] Panic screen user, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[14:09:46] [PASSED] Panic screen kmsg, mode: 1024 x 768 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen kmsg, mode: 494 x 494 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen kmsg, mode: 1920 x 1080 	XR24 little-endian (0x34325258)
[14:09:46] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG16 little-endian (0x36314752)
[14:09:46] [PASSED] Panic screen kmsg, mode: 1024 x 768 	RG24 little-endian (0x34324752)
[14:09:46] ====== [PASSED] drm_test_panic_screen_user_set_pixel =======
[14:09:46] ================ [PASSED] drm_panic_helper =================
[14:09:46] ============== drm_plane_helper (2 subtests) ===============
[14:09:46] =============== drm_test_check_plane_state  ================
[14:09:46] [PASSED] clipping_simple
[14:09:46] [PASSED] clipping_rotate_reflect
[14:09:46] [PASSED] positioning_simple
[14:09:46] [PASSED] upscaling
[14:09:46] [PASSED] downscaling
[14:09:46] [PASSED] rounding1
[14:09:46] [PASSED] rounding2
[14:09:46] [PASSED] rounding3
[14:09:46] [PASSED] rounding4
[14:09:46] =========== [PASSED] drm_test_check_plane_state ============
[14:09:46] =========== drm_test_check_invalid_plane_state  ============
[14:09:46] [PASSED] positioning_invalid
[14:09:46] [PASSED] upscaling_invalid
[14:09:46] [PASSED] downscaling_invalid
[14:09:46] ======= [PASSED] drm_test_check_invalid_plane_state ========
[14:09:46] ================ [PASSED] drm_plane_helper =================
[14:09:46] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[14:09:46] ====== drm_test_connector_helper_tv_get_modes_check  =======
[14:09:46] [PASSED] None
[14:09:46] [PASSED] PAL
[14:09:46] [PASSED] NTSC
[14:09:46] [PASSED] Both, NTSC Default
[14:09:46] [PASSED] Both, PAL Default
[14:09:46] [PASSED] Both, NTSC Default, with PAL on command-line
[14:09:46] [PASSED] Both, PAL Default, with NTSC on command-line
[14:09:46] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[14:09:46] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[14:09:46] ================== drm_rect (9 subtests) ===================
[14:09:46] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[14:09:46] [PASSED] drm_test_rect_clip_scaled_not_clipped
[14:09:46] [PASSED] drm_test_rect_clip_scaled_clipped
[14:09:46] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[14:09:46] ================= drm_test_rect_intersect  =================
[14:09:46] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[14:09:46] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[14:09:46] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[14:09:46] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[14:09:46] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[14:09:46] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[14:09:46] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[14:09:46] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[14:09:46] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[14:09:46] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[14:09:46] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[14:09:46] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[14:09:46] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[14:09:46] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[14:09:46] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[14:09:46] ============= [PASSED] drm_test_rect_intersect =============
[14:09:46] ================ drm_test_rect_calc_hscale  ================
[14:09:46] [PASSED] normal use
[14:09:46] [PASSED] out of max range
[14:09:46] [PASSED] out of min range
[14:09:46] [PASSED] zero dst
[14:09:46] [PASSED] negative src
[14:09:46] [PASSED] negative dst
[14:09:46] ============ [PASSED] drm_test_rect_calc_hscale ============
[14:09:46] ================ drm_test_rect_calc_vscale  ================
[14:09:46] [PASSED] normal use
[14:09:46] [PASSED] out of max range
[14:09:46] [PASSED] out of min range
[14:09:46] [PASSED] zero dst
[14:09:46] [PASSED] negative src
[14:09:46] [PASSED] negative dst
[14:09:46] ============ [PASSED] drm_test_rect_calc_vscale ============
[14:09:46] ================== drm_test_rect_rotate  ===================
[14:09:46] [PASSED] reflect-x
[14:09:46] [PASSED] reflect-y
[14:09:46] [PASSED] rotate-0
[14:09:46] [PASSED] rotate-90
[14:09:46] [PASSED] rotate-180
[14:09:46] [PASSED] rotate-270
[14:09:46] ============== [PASSED] drm_test_rect_rotate ===============
[14:09:46] ================ drm_test_rect_rotate_inv  =================
[14:09:46] [PASSED] reflect-x
[14:09:46] [PASSED] reflect-y
[14:09:46] [PASSED] rotate-0
[14:09:46] [PASSED] rotate-90
[14:09:46] [PASSED] rotate-180
[14:09:46] [PASSED] rotate-270
[14:09:46] ============ [PASSED] drm_test_rect_rotate_inv =============
[14:09:46] ==================== [PASSED] drm_rect =====================
[14:09:46] ============ drm_sysfb_modeset_test (1 subtest) ============
[14:09:46] ============ drm_test_sysfb_build_fourcc_list  =============
[14:09:46] [PASSED] no native formats
[14:09:46] [PASSED] XRGB8888 as native format
[14:09:46] [PASSED] remove duplicates
[14:09:46] [PASSED] convert alpha formats
[14:09:46] [PASSED] random formats
[14:09:46] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[14:09:46] ============= [PASSED] drm_sysfb_modeset_test ==============
[14:09:46] ================== drm_fixp (2 subtests) ===================
[14:09:46] [PASSED] drm_test_int2fixp
[14:09:46] [PASSED] drm_test_sm2fixp
[14:09:46] ==================== [PASSED] drm_fixp =====================
[14:09:46] ============================================================
[14:09:46] Testing complete. Ran 667 tests: passed: 667
[14:09:46] Elapsed time: 27.855s total, 2.515s configuring, 25.022s building, 0.298s running

+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
[14:09:46] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:09:48] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[14:09:58] Starting KUnit Kernel (1/1)...
[14:09:58] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[14:09:58] ================= ttm_device (5 subtests) ==================
[14:09:58] [PASSED] ttm_device_init_basic
[14:09:58] [PASSED] ttm_device_init_multiple
[14:09:58] [PASSED] ttm_device_fini_basic
[14:09:58] [PASSED] ttm_device_init_no_vma_man
[14:09:58] ================== ttm_device_init_pools  ==================
[14:09:58] [PASSED] No DMA allocations, no DMA32 required
[14:09:58] [PASSED] DMA allocations, DMA32 required
[14:09:58] [PASSED] No DMA allocations, DMA32 required
[14:09:58] [PASSED] DMA allocations, no DMA32 required
[14:09:58] ============== [PASSED] ttm_device_init_pools ==============
[14:09:58] =================== [PASSED] ttm_device ====================
[14:09:58] ================== ttm_pool (8 subtests) ===================
[14:09:58] ================== ttm_pool_alloc_basic  ===================
[14:09:58] [PASSED] One page
[14:09:58] [PASSED] More than one page
[14:09:58] [PASSED] Above the allocation limit
[14:09:58] [PASSED] One page, with coherent DMA mappings enabled
[14:09:58] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[14:09:58] ============== [PASSED] ttm_pool_alloc_basic ===============
[14:09:58] ============== ttm_pool_alloc_basic_dma_addr  ==============
[14:09:58] [PASSED] One page
[14:09:58] [PASSED] More than one page
[14:09:58] [PASSED] Above the allocation limit
[14:09:58] [PASSED] One page, with coherent DMA mappings enabled
[14:09:58] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[14:09:58] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[14:09:58] [PASSED] ttm_pool_alloc_order_caching_match
[14:09:58] [PASSED] ttm_pool_alloc_caching_mismatch
[14:09:58] [PASSED] ttm_pool_alloc_order_mismatch
[14:09:58] [PASSED] ttm_pool_free_dma_alloc
[14:09:58] [PASSED] ttm_pool_free_no_dma_alloc
[14:09:58] [PASSED] ttm_pool_fini_basic
[14:09:58] ==================== [PASSED] ttm_pool =====================
[14:09:58] ================ ttm_resource (8 subtests) =================
[14:09:58] ================= ttm_resource_init_basic  =================
[14:09:58] [PASSED] Init resource in TTM_PL_SYSTEM
[14:09:58] [PASSED] Init resource in TTM_PL_VRAM
[14:09:58] [PASSED] Init resource in a private placement
[14:09:58] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[14:09:58] ============= [PASSED] ttm_resource_init_basic =============
[14:09:58] [PASSED] ttm_resource_init_pinned
[14:09:58] [PASSED] ttm_resource_fini_basic
[14:09:58] [PASSED] ttm_resource_manager_init_basic
[14:09:58] [PASSED] ttm_resource_manager_usage_basic
[14:09:58] [PASSED] ttm_resource_manager_set_used_basic
[14:09:58] [PASSED] ttm_sys_man_alloc_basic
[14:09:58] [PASSED] ttm_sys_man_free_basic
[14:09:58] ================== [PASSED] ttm_resource ===================
[14:09:58] =================== ttm_tt (15 subtests) ===================
[14:09:58] ==================== ttm_tt_init_basic  ====================
[14:09:58] [PASSED] Page-aligned size
[14:09:58] [PASSED] Extra pages requested
[14:09:58] ================ [PASSED] ttm_tt_init_basic ================
[14:09:58] [PASSED] ttm_tt_init_misaligned
[14:09:58] [PASSED] ttm_tt_fini_basic
[14:09:58] [PASSED] ttm_tt_fini_sg
[14:09:58] [PASSED] ttm_tt_fini_shmem
[14:09:58] [PASSED] ttm_tt_create_basic
[14:09:58] [PASSED] ttm_tt_create_invalid_bo_type
[14:09:58] [PASSED] ttm_tt_create_ttm_exists
[14:09:58] [PASSED] ttm_tt_create_failed
[14:09:58] [PASSED] ttm_tt_destroy_basic
[14:09:58] [PASSED] ttm_tt_populate_null_ttm
[14:09:58] [PASSED] ttm_tt_populate_populated_ttm
[14:09:58] [PASSED] ttm_tt_unpopulate_basic
[14:09:58] [PASSED] ttm_tt_unpopulate_empty_ttm
[14:09:58] [PASSED] ttm_tt_swapin_basic
[14:09:58] ===================== [PASSED] ttm_tt ======================
[14:09:58] =================== ttm_bo (14 subtests) ===================
[14:09:58] =========== ttm_bo_reserve_optimistic_no_ticket  ===========
[14:09:58] [PASSED] Cannot be interrupted and sleeps
[14:09:58] [PASSED] Cannot be interrupted, locks straight away
[14:09:58] [PASSED] Can be interrupted, sleeps
[14:09:58] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[14:09:58] [PASSED] ttm_bo_reserve_locked_no_sleep
[14:09:58] [PASSED] ttm_bo_reserve_no_wait_ticket
[14:09:59] [PASSED] ttm_bo_reserve_double_resv
[14:09:59] [PASSED] ttm_bo_reserve_interrupted
[14:09:59] [PASSED] ttm_bo_reserve_deadlock
[14:09:59] [PASSED] ttm_bo_unreserve_basic
[14:09:59] [PASSED] ttm_bo_unreserve_pinned
[14:09:59] [PASSED] ttm_bo_unreserve_bulk
[14:09:59] [PASSED] ttm_bo_fini_basic
[14:09:59] [PASSED] ttm_bo_fini_shared_resv
[14:09:59] [PASSED] ttm_bo_pin_basic
[14:09:59] [PASSED] ttm_bo_pin_unpin_resource
[14:09:59] [PASSED] ttm_bo_multiple_pin_one_unpin
[14:09:59] ===================== [PASSED] ttm_bo ======================
[14:09:59] ============== ttm_bo_validate (22 subtests) ===============
[14:09:59] ============== ttm_bo_init_reserved_sys_man  ===============
[14:09:59] [PASSED] Buffer object for userspace
[14:09:59] [PASSED] Kernel buffer object
[14:09:59] [PASSED] Shared buffer object
[14:09:59] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[14:09:59] ============== ttm_bo_init_reserved_mock_man  ==============
[14:09:59] [PASSED] Buffer object for userspace
[14:09:59] [PASSED] Kernel buffer object
[14:09:59] [PASSED] Shared buffer object
[14:09:59] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[14:09:59] [PASSED] ttm_bo_init_reserved_resv
[14:09:59] ================== ttm_bo_validate_basic  ==================
[14:09:59] [PASSED] Buffer object for userspace
[14:09:59] [PASSED] Kernel buffer object
[14:09:59] [PASSED] Shared buffer object
[14:09:59] ============== [PASSED] ttm_bo_validate_basic ==============
[14:09:59] [PASSED] ttm_bo_validate_invalid_placement
[14:09:59] ============= ttm_bo_validate_same_placement  ==============
[14:09:59] [PASSED] System manager
[14:09:59] [PASSED] VRAM manager
[14:09:59] ========= [PASSED] ttm_bo_validate_same_placement ==========
[14:09:59] [PASSED] ttm_bo_validate_failed_alloc
[14:09:59] [PASSED] ttm_bo_validate_pinned
[14:09:59] [PASSED] ttm_bo_validate_busy_placement
[14:09:59] ================ ttm_bo_validate_multihop  =================
[14:09:59] [PASSED] Buffer object for userspace
[14:09:59] [PASSED] Kernel buffer object
[14:09:59] [PASSED] Shared buffer object
[14:09:59] ============ [PASSED] ttm_bo_validate_multihop =============
[14:09:59] ========== ttm_bo_validate_no_placement_signaled  ==========
[14:09:59] [PASSED] Buffer object in system domain, no page vector
[14:09:59] [PASSED] Buffer object in system domain with an existing page vector
[14:09:59] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[14:09:59] ======== ttm_bo_validate_no_placement_not_signaled  ========
[14:09:59] [PASSED] Buffer object for userspace
[14:09:59] [PASSED] Kernel buffer object
[14:09:59] [PASSED] Shared buffer object
[14:09:59] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[14:09:59] [PASSED] ttm_bo_validate_move_fence_signaled
[14:09:59] ========= ttm_bo_validate_move_fence_not_signaled  =========
[14:09:59] [PASSED] Waits for GPU
[14:09:59] [PASSED] Tries to lock straight away
[14:09:59] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[14:09:59] [PASSED] ttm_bo_validate_swapout
[14:09:59] [PASSED] ttm_bo_validate_happy_evict
[14:09:59] [PASSED] ttm_bo_validate_all_pinned_evict
[14:09:59] [PASSED] ttm_bo_validate_allowed_only_evict
[14:09:59] [PASSED] ttm_bo_validate_deleted_evict
[14:09:59] [PASSED] ttm_bo_validate_busy_domain_evict
[14:09:59] [PASSED] ttm_bo_validate_evict_gutting
[14:09:59] [PASSED] ttm_bo_validate_recrusive_evict
[14:09:59] ================= [PASSED] ttm_bo_validate =================
[14:09:59] ============================================================
[14:09:59] Testing complete. Ran 102 tests: passed: 102
[14:09:59] Elapsed time: 12.907s total, 2.509s configuring, 10.184s building, 0.184s running

+ for kcfg in "${kunitconfigs[@]}"
+ [[ ! -f /kernel/drivers/dma-buf/.kunitconfig ]]
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/dma-buf/.kunitconfig
[14:09:59] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:10:01] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[14:10:10] Starting KUnit Kernel (1/1)...
[14:10:10] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[14:10:10] =============== dma-buf-fence (12 subtests) ================
[14:10:10] [PASSED] test_sanitycheck
[14:10:10] [PASSED] test_signaling
[14:10:10] [PASSED] test_add_callback
[14:10:10] [PASSED] test_late_add_callback
[14:10:10] [PASSED] test_rm_callback
[14:10:10] [PASSED] test_late_rm_callback
[14:10:10] [PASSED] test_status
[14:10:10] [PASSED] test_error
[14:10:10] [PASSED] test_wait
[14:10:10] [PASSED] test_wait_timeout
[14:10:10] [PASSED] test_stub
[14:10:10] [SKIPPED] test_race_signal_callback (requires at least 2 CPUs)
[14:10:10] ================== [PASSED] dma-buf-fence ==================
[14:10:10] ============ dma-buf-fence-chain (11 subtests) =============
[14:10:10] [PASSED] test_sanitycheck
[14:10:10] [PASSED] test_find_seqno
[14:10:10] [PASSED] test_find_signaled
[14:10:10] [PASSED] test_find_out_of_order
[14:10:15] [PASSED] test_find_gap
[14:10:15] [PASSED] test_find_race
[14:10:15] [PASSED] test_signal_forward
[14:10:15] [PASSED] test_signal_backward
[14:10:15] [PASSED] test_wait_forward
[14:10:15] [PASSED] test_wait_backward
[14:10:15] [PASSED] test_wait_random
[14:10:15] =============== [PASSED] dma-buf-fence-chain ===============
[14:10:15] ============ dma-buf-fence-unwrap (11 subtests) ============
[14:10:15] [PASSED] test_sanitycheck
[14:10:15] [PASSED] test_unwrap_array
[14:10:15] [PASSED] test_unwrap_chain
[14:10:15] [PASSED] test_unwrap_chain_array
[14:10:15] [PASSED] test_unwrap_merge
[14:10:15] [PASSED] test_unwrap_merge_duplicate
[14:10:15] [PASSED] test_unwrap_merge_seqno
[14:10:15] [PASSED] test_unwrap_merge_order
[14:10:15] [PASSED] test_unwrap_merge_complex
[14:10:15] [PASSED] test_unwrap_merge_complex_seqno
[14:10:15] [PASSED] test_dedup_empty
[14:10:15] ============== [PASSED] dma-buf-fence-unwrap ===============
[14:10:15] ================ dma-buf-resv (5 subtests) =================
[14:10:15] [PASSED] test_sanitycheck
[14:10:15] ===================== test_signaling  ======================
[14:10:15] [PASSED] kernel
[14:10:15] [PASSED] write
[14:10:15] [PASSED] read
[14:10:15] [PASSED] bookkeep
[14:10:15] ================= [PASSED] test_signaling ==================
[14:10:15] ====================== test_for_each  ======================
[14:10:15] [PASSED] kernel
[14:10:15] [PASSED] write
[14:10:15] [PASSED] read
[14:10:15] [PASSED] bookkeep
[14:10:15] ================== [PASSED] test_for_each ==================
[14:10:15] ================= test_for_each_unlocked  ==================
[14:10:15] [PASSED] kernel
[14:10:15] [PASSED] write
[14:10:15] [PASSED] read
[14:10:15] [PASSED] bookkeep
[14:10:15] ============= [PASSED] test_for_each_unlocked ==============
[14:10:15] ===================== test_get_fences  =====================
[14:10:15] [PASSED] kernel
[14:10:15] [PASSED] write
[14:10:15] [PASSED] read
[14:10:15] [PASSED] bookkeep
[14:10:15] ================= [PASSED] test_get_fences =================
[14:10:15] ================== [PASSED] dma-buf-resv ===================
[14:10:15] ============================================================
[14:10:15] Testing complete. Ran 51 tests: passed: 50, skipped: 1
[14:10:15] Elapsed time: 16.480s total, 2.527s configuring, 8.682s building, 5.259s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel



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

* ✓ Xe.CI.BAT: success for drm/i915/ddi_mgr: Add support for dynamic DDI allocation
  2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
                   ` (14 preceding siblings ...)
  2026-11-26 14:10 ` ✓ CI.KUnit: success " Patchwork
@ 2026-11-26 14:49 ` Patchwork
  15 siblings, 0 replies; 23+ messages in thread
From: Patchwork @ 2026-11-26 14:49 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-xe

[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]

== Series Details ==

Series: drm/i915/ddi_mgr: Add support for dynamic DDI allocation
URL   : https://patchwork.freedesktop.org/series/179738/
State : success

== Summary ==

CI Bug Log - changes from xe-6241-c7a2a8c7a31d55cffae58b6551a554b65009c67a_BAT -> xe-pw-179738v1_BAT
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (15 -> 15)
------------------------------

  No changes in participating hosts

Known issues
------------

  Here are the changes found in xe-pw-179738v1_BAT that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * igt@core_hotunplug@unbind-rebind:
    - bat-bmg-1:          [ABORT][1] ([Intel XE#9841]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-6241-c7a2a8c7a31d55cffae58b6551a554b65009c67a/bat-bmg-1/igt@core_hotunplug@unbind-rebind.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-179738v1/bat-bmg-1/igt@core_hotunplug@unbind-rebind.html

  
  [Intel XE#9841]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/9841


Build changes
-------------

  * Linux: xe-6241-c7a2a8c7a31d55cffae58b6551a554b65009c67a -> xe-pw-179738v1

  IGT_9204: 52e9317c945f97f29fbec75be29280fc7b00cf32 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-6241-c7a2a8c7a31d55cffae58b6551a554b65009c67a: c7a2a8c7a31d55cffae58b6551a554b65009c67a
  xe-pw-179738v1: 179738v1

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-179738v1/index.html

[-- Attachment #2: Type: text/html, Size: 2099 bytes --]

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

end of thread, other threads:[~2026-11-26 14:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 10:07 [PATCH 00/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
2026-11-26 10:07 ` [PATCH 01/13] drm/i915/dp: Allow rebuilding the source rate list Imre Deak
2026-11-26 10:07 ` [PATCH 02/13] drm/i915/hotplug: Set detector enable bits without a clear mask Imre Deak
2026-11-26 10:07 ` [PATCH 03/13] drm/i915/nvl+: Add support for remapping logical HPD pins to HW pins Imre Deak
2026-11-26 10:07 ` [PATCH 04/13] drm/xe/display: Distinguish failed system suspend recovery Imre Deak
2026-11-26 13:22   ` Jani Nikula
2026-11-26 10:07 ` [PATCH 05/13] drm/i915/gmbus: Extract a helper for Type-C DDC pin mapping Imre Deak
2026-11-26 10:07 ` [PATCH 06/13] drm/i915/ddi_mgr: Add support for dynamic DDI allocation Imre Deak
2026-11-26 13:23   ` Jani Nikula
2026-11-26 10:07 ` [PATCH 07/13] drm/i915/gmbus: Extract adapter creation and destruction Imre Deak
2026-11-26 10:07 ` [PATCH 08/13] drm/i915/gmbus: Add stable DDC adapters for the DDI pool Imre Deak
2026-11-26 10:07 ` [PATCH 09/13] drm/i915/ddi_mgr: Register encoders with dynamic DDI support Imre Deak
2026-11-26 10:26   ` sashiko-bot
2026-11-26 10:07 ` [PATCH 10/13] drm/i915/ddi_mgr: Keep AUX access consistent with DDI pool routes Imre Deak
2026-11-26 10:07 ` [PATCH 11/13] drm/i915/ddi_mgr: Verify and restore DDI allocations after runtime resume Imre Deak
2026-11-26 13:25   ` Jani Nikula
2026-11-26 10:07 ` [PATCH 12/13] drm/i915/ddi_mgr: Handle DDI pool system suspend and resume Imre Deak
2026-11-26 10:41   ` sashiko-bot
2026-11-26 13:25   ` Jani Nikula
2026-11-26 10:07 ` [PATCH 13/13] drm/i915/ddi_mgr: Enable dynamic DDI allocation at load Imre Deak
2026-11-26 14:08 ` ✗ CI.checkpatch: warning for drm/i915/ddi_mgr: Add support for dynamic DDI allocation Patchwork
2026-11-26 14:10 ` ✓ CI.KUnit: success " Patchwork
2026-11-26 14:49 ` ✓ Xe.CI.BAT: " Patchwork

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