drm/i915/dp: Prevent link training fallback on disconnected port
authorImre Deak <imre.deak@intel.com>
Wed, 10 May 2023 10:31:27 +0000 (13:31 +0300)
committerImre Deak <imre.deak@intel.com>
Tue, 16 May 2023 13:53:49 +0000 (16:53 +0300)
commitf45156ff18bae00ee56ed6aa2a937a8e93e56d7f
tree428313393d2b2ad4b979f5fe3fefa51156218011
parent9031c6d4f78a1e801695d0c4d97724455c6e2a61
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ä <ville.syrjala@linux.intel.com>
Cc: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230510103131.1618266-11-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp_link_training.c