Skip to content

Commit a32f3a9

Browse files
committed
drm/i915/dp: Read DPRX for all long HPD pulses
The TBT DP tunnel BW request logic in the Thunderbolt Connection Manager depends on the GFX driver reading out the sink's DPRX capabilities in response to a long HPD pulse. Since in i915 this read-out can be blocked by another connector's/encoder's hotplug event handling (which is serialized by drm_mode_config::connection_mutex), do a dummy DPRX read-out in the encoder's HPD pulse handler (which is not blocked by other encoders). Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240220211841.448846-21-imre.deak@intel.com
1 parent fb68790 commit a32f3a9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6165,6 +6165,7 @@ intel_dp_hpd_pulse(struct intel_digital_port *dig_port, bool long_hpd)
61656165
{
61666166
struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
61676167
struct intel_dp *intel_dp = &dig_port->dp;
6168+
u8 dpcd[DP_RECEIVER_CAP_SIZE];
61686169

61696170
if (dig_port->base.type == INTEL_OUTPUT_EDP &&
61706171
(long_hpd || !intel_pps_have_panel_power_or_vdd(intel_dp))) {
@@ -6187,6 +6188,17 @@ intel_dp_hpd_pulse(struct intel_digital_port *dig_port, bool long_hpd)
61876188
dig_port->base.base.name,
61886189
long_hpd ? "long" : "short");
61896190

6191+
/*
6192+
* TBT DP tunnels require the GFX driver to read out the DPRX caps in
6193+
* response to long HPD pulses. The DP hotplug handler does that,
6194+
* however the hotplug handler may be blocked by another
6195+
* connector's/encoder's hotplug handler. Since the TBT CM may not
6196+
* complete the DP tunnel BW request for the latter connector/encoder
6197+
* waiting for this encoder's DPRX read, perform a dummy read here.
6198+
*/
6199+
if (long_hpd)
6200+
intel_dp_read_dprx_caps(intel_dp, dpcd);
6201+
61906202
if (long_hpd) {
61916203
intel_dp->reset_link_params = true;
61926204
return IRQ_NONE;

0 commit comments

Comments
 (0)