> Subject: [PATCH v4 07/10] drm/i915/alpm: Program LTTPR count for DP 2.1 > ALPM > > Issue a AUX write transaction to DPCD DP_TOTAL_LTTPR_CNT (0xf000a) with > total number of LTTPR before link training. > > v2: Cosmetic changes. [Suraj] > > Cc: Jouni Högander <[email protected]> > Signed-off-by: Animesh Manna <[email protected]> > --- > .../drm/i915/display/intel_dp_link_training.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > 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 aad5fe14962f..d694c2474159 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c > +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c > @@ -1624,6 +1624,20 @@ intel_dp_128b132b_link_train(struct intel_dp > *intel_dp, > return passed; > } > > +static void intel_dp_update_lttpr_count(struct intel_dp *intel_dp, > + int lttpr_count) > +{ > + /* > + * Program only for DP2.1 and return if LTTPR revison is less than 0x20 > + * where 0:3 represents minor rev and 4:7 represent major rev > + */ > + if (!intel_dp_is_edp(intel_dp) || > + intel_dp->lttpr_common_caps[0] <= 0x20) > + return; > + > + drm_dp_dpcd_writeb(&intel_dp->aux, DP_TOTAL_LTTPR_CNT, > lttpr_count); }
You need to be writing to ALPM_CTL2[Number_of_LTTPR] at some point to which is not being done anywhere I think this needs a second look too. Regards, Suraj Kandpal > + > /** > * intel_dp_start_link_train - start link training > * @state: Atomic state > @@ -1660,6 +1674,8 @@ void intel_dp_start_link_train(struct > intel_atomic_state *state, > > intel_dp_prepare_link_train(intel_dp, crtc_state); > > + intel_dp_update_lttpr_count(intel_dp, lttpr_count); > + > if (intel_dp_is_uhbr(crtc_state)) > passed = intel_dp_128b132b_link_train(intel_dp, crtc_state, > lttpr_count); > else > -- > 2.29.0
