diff options
author | Imre Deak <[email protected]> | 2023-05-10 13:31:27 +0300 |
---|---|---|
committer | Imre Deak <[email protected]> | 2023-05-16 16:53:49 +0300 |
commit | f45156ff18bae00ee56ed6aa2a937a8e93e56d7f (patch) | |
tree | 428313393d2b2ad4b979f5fe3fefa51156218011 | |
parent | 9031c6d4f78a1e801695d0c4d97724455c6e2a61 (diff) |
drm/i915/dp: Prevent link training fallback on disconnected port
Prevent downgrading the link training maximum lane count/rate if the
sink is disconnected - and so the link training failure is expected. In
such cases modeset failures due to the reduced max link params would be
just confusing for user space (instead of which the correct thing it
should act on is the sink disconnect signaled by a hotplug event,
requiring a disabling modeset).
v2:
- Check the actual HPD state to handle the forced connector state case.
(Vinod)
Cc: Ville Syrjälä <[email protected]>
Cc: Vinod Govindapillai <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]> (v1)
Reviewed-by: Vinod Govindapillai <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_dp_link_training.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c index 51d1e4b4b2f1..0952a707358c 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c @@ -1065,6 +1065,11 @@ static void intel_dp_schedule_fallback_link_training(struct intel_dp *intel_dp, { struct intel_connector *intel_connector = intel_dp->attached_connector; + if (!intel_digital_port_connected(&dp_to_dig_port(intel_dp)->base)) { + lt_dbg(intel_dp, DP_PHY_DPRX, "Link Training failed on disconnected sink.\n"); + return; + } + if (intel_dp->hobl_active) { lt_dbg(intel_dp, DP_PHY_DPRX, "Link Training failed with HOBL active, not enabling it from now on\n"); |