Skip to content

Commit d2b9935

Browse files
ideakrodrigovivi
authored andcommitted
drm/i915: Fix modesetting in case of unexpected AUX timeouts
In case AUX failures happen unexpectedly during a modeset, the driver should still complete the modeset. In particular the driver should perform the link training sequence steps even in case of an AUX failure, as this sequence also includes port initialization steps. Not doing that can leave the port/pipe in a broken state and lead for instance to a flip done timeout. Fix this by continuing with link training (in a no-LTTPR mode) if the DPRX DPCD readout failed for some reason at the beginning of link training. After a successful connector detection we already have the DPCD read out and cached, so the failed repeated read for it should not cause a problem. Note that a partial AUX read could in theory partly overwrite the cached DPCD (and return error) but this overwrite should not happen if the returned values are corrupted (due to a timeout or some other IO error). Kudos to Ville to root cause the problem. Fixes: 7dffbde ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4") References: https://gitlab.freedesktop.org/drm/intel/-/issues/3308 Cc: stable@vger.kernel.org # 5.11 Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210412232413.2755054-1-imre.deak@intel.com (cherry picked from commit e42e7e5) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> [adjusted Fixes: tag]
1 parent bf05bf1 commit d2b9935

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,8 @@ void intel_dp_start_link_train(struct intel_dp *intel_dp,
848848
int lttpr_count = intel_dp_init_lttpr_and_dprx_caps(intel_dp);
849849

850850
if (lttpr_count < 0)
851-
return;
851+
/* Still continue with enabling the port and link training. */
852+
lttpr_count = 0;
852853

853854
if (!intel_dp_link_train_all_phys(intel_dp, crtc_state, lttpr_count))
854855
intel_dp_schedule_fallback_link_training(intel_dp, crtc_state);

0 commit comments

Comments
 (0)