This is v4 of [1], addressing the review comments from Ville, Vinod and Jani. Patch 13/14 also fixes an issue canceling the link reset work synchronously during system suspend and driver cleanup. Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Cc: Vinod Govindapillai <vinod.govindapillai@xxxxxxxxx> Cc: Jani Nikula <jani.nikula@xxxxxxxxx> [1] https://lore.kernel.org/all/20230503231048.432368-1-imre.deak@xxxxxxxxx/ Imre Deak (14): drm/i915: Fix PIPEDMC disabling for a bigjoiner configuration drm/i915: Add helpers to reference/unreference a DPLL for a CRTC drm/i915: Make the CRTC state consistent during sanitize-disabling drm/i915: Update connector atomic state before crtc sanitize-disabling drm/i915: Separate intel_crtc_disable_noatomic_begin/complete() drm/i915: Factor out set_encoder_for_connector() drm/i915: Add support for disabling any CRTCs during HW readout/sanitization drm/i915/dp: Add link training debug and error printing helpers drm/i915/dp: Convert link training error to debug message on disconnected sink drm/i915/dp: Prevent link training fallback on disconnected port drm/i915/dp: Factor out intel_dp_get_active_pipes() drm/i915: Factor out a helper for handling atomic modeset locks/state drm/i915/tc: Call TypeC port flush_work/cleanup without modeset locks held drm/i915/tc: Reset TypeC PHYs left enabled in DP-alt mode after the sink disconnects drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_ddi.c | 68 ++-- drivers/gpu/drm/i915/display/intel_display.c | 14 +- drivers/gpu/drm/i915/display/intel_display.h | 1 + .../drm/i915/display/intel_display_types.h | 12 + drivers/gpu/drm/i915/display/intel_dp.c | 20 +- drivers/gpu/drm/i915/display/intel_dp.h | 3 + .../drm/i915/display/intel_dp_link_training.c | 376 ++++++------------ drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 58 ++- drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 3 + .../gpu/drm/i915/display/intel_modeset_lock.c | 50 +++ .../gpu/drm/i915/display/intel_modeset_lock.h | 33 ++ .../drm/i915/display/intel_modeset_setup.c | 318 +++++++++++++-- drivers/gpu/drm/i915/display/intel_tc.c | 156 +++++++- drivers/gpu/drm/i915/display/intel_tc.h | 5 +- drivers/gpu/drm/i915/i915_driver.c | 8 + 16 files changed, 776 insertions(+), 350 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_modeset_lock.c create mode 100644 drivers/gpu/drm/i915/display/intel_modeset_lock.h -- 2.37.2