Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Imre Deak" <imre.deak@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 09/13] drm/i915/ddi_mgr: Register encoders with dynamic DDI support
Date: Thu, 26 Nov 2026 10:26:42 +0000	[thread overview]
Message-ID: <sashiko-outbox-235287@kernel.org> (raw)
In-Reply-To: <20261126100755.1252635-10-imre.deak@intel.com>

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

  reply	other threads:[~2026-11-26 10:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-235287@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox