]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/i915/lnl+/tc: Fix max lane count HW readout
authorImre Deak <imre.deak@intel.com>
Mon, 11 Aug 2025 08:01:50 +0000 (11:01 +0300)
committerImre Deak <imre.deak@intel.com>
Tue, 12 Aug 2025 09:31:44 +0000 (12:31 +0300)
commit33cf70bc0fe760224f892bc1854a33665f27d482
tree02f8b1367c3620e0e1f1f6952633e495ca5f85f3
parent3e32438fc406761f81b1928d210b3d2a5e7501a0
drm/i915/lnl+/tc: Fix max lane count HW readout

On LNL+ for a disconnected sink the pin assignment value gets cleared by
the HW/FW as soon as the sink gets disconnected, even if the PHY
ownership got acquired already by the BIOS/driver (and hence the PHY
itself is still connected and used by the display). During HW readout
this can result in detecting the PHY's max lane count as 0 - matching
the above cleared aka NONE pin assignment HW state. For a connected PHY
the driver in general (outside of intel_tc.c) expects the max lane count
value to be valid for the video mode enabled on the corresponding output
(1, 2 or 4). Ensure this by setting the max lane count to 4 in this
case. Note, that it doesn't matter if this lane count happened to be
more than the max lane count with which the PHY got connected and
enabled, since the only thing the driver can do with such an output -
where the DP-alt sink is disconnected - is to disable the output.

v2: Rebased on change reading out the pin configuration only if the PHY
    is connected.

Cc: stable@vger.kernel.org # v6.8+
Reported-by: Charlton Lin <charlton.lin@intel.com>
Tested-by: Khaled Almahallawy <khaled.almahallawy@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://lore.kernel.org/r/20250811080152.906216-4-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_tc.c