]> Gentwo Git Trees - linux/.git/commit
drm/i915/icl+/tc: Cache the max lane count value
authorImre Deak <imre.deak@intel.com>
Mon, 11 Aug 2025 08:01:49 +0000 (11:01 +0300)
committerImre Deak <imre.deak@intel.com>
Tue, 12 Aug 2025 09:31:43 +0000 (12:31 +0300)
commit3e32438fc406761f81b1928d210b3d2a5e7501a0
tree858f76f1b7c26957de94d6cf5bb158be966f726b
parent89f4b196ee4b056e0e8c179b247b29d4a71a4e7e
drm/i915/icl+/tc: Cache the max lane count value

The PHY's pin assignment value in the TCSS_DDI_STATUS register - as set
by the HW/FW based on the connected DP-alt sink's TypeC/PD pin
assignment negotiation - gets cleared by the HW/FW on LNL+ as soon as
the sink gets disconnected, even if the PHY ownership got acquired
already by the driver (and hence the PHY itself is still connected and
used by the display). This is similar to how the PHY Ready flag gets
cleared on LNL+ in the same register.

To be able to query the max lane count value on LNL+ - which is based on
the above pin assignment - at all times even after the sink gets
disconnected, the max lane count must be determined and cached during
the PHY's HW readout and connect sequences. Do that here, leaving the
actual use of the cached value to a follow-up change.

v2: Don't read out the pin configuration if the PHY is disconnected.

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-3-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_tc.c