]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/display: Handle dedicated external ports in intel_encoder_is_tc()
authorGustavo Sousa <gustavo.sousa@intel.com>
Tue, 2 Dec 2025 01:23:01 +0000 (17:23 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Tue, 2 Dec 2025 18:08:08 +0000 (10:08 -0800)
commitdf5dd52a6de486e32576ac5851b4e9429182274b
tree42fc48f66a2fb76bf6f041e6d01e7f1a74e30d69
parentc296e3f2cec7325dc93a19cdcf3194a63b02c389
drm/i915/display: Handle dedicated external ports in intel_encoder_is_tc()

Starting with Xe3p_LPD, the VBT has a new field, called in the driver
"dedicated_external", which tells that a Type-C capable port is
physically connected to a PHY outside of the Type-C subsystem.  When
that's the case, the driver must not do the extra Type-C programming for
that port.  Update intel_encoder_is_tc() to check for that case.

While at it, add a note to intel_phy_is_tc() to remind us that it is
about whether the respective port is a Type-C capable port rather than
the PHY itself.

(Maybe it would be a nice idea to rename intel_phy_is_tc()?)

Note that this was handled with a new bool member added to struct
intel_digital_port instead of having querying the VBT directly because
VBT memory is freed (intel_bios_driver_remove) before encoder cleanup
(intel_ddi_encoder_destroy), which would cause an oops to happen when
the latter calls intel_encoder_is_tc().  This could be fixed by keeping
VBT data around longer, but that's left for a follow-up work, if deemed
necessary.

v2:
  - Drop printing info about dedicated external, now that we are doing
    it when parsing the VBT. (Jani)
  - Add a FIXME comment on the code explaining why we need to store
    dedicated_external in struct intel_digital_port. (Jani)
v3:
  - Simplify the code by using NULL check for dig_port to avoid using
    intel_encoder_is_dig_port(). (Imre)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Shekhar Chauhan <shekhar.chauhan@intel.com>
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20251202012306.9315-4-matthew.s.atwood@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h