Re: [PATCH 2/7] drm/msm/dp: reduce link rate if failed at link training 1
From: Stephen Boyd
Date: Thu Jul 15 2021 - 15:28:48 EST
Quoting khsieh@xxxxxxxxxxxxxx (2021-07-09 10:46:41)
> On 2021-07-08 00:33, Stephen Boyd wrote:
> >> +
> >> +static bool dp_ctrl_any_lane_cr_lose(struct dp_ctrl_private *ctrl,
> >> + u8 *cr_status)
> >> +{
> >> + int i;
> >> + u8 status;
> >> + int lane = ctrl->link->link_params.num_lanes;
> >> +
> >> + for (i = 0; i < lane; i++) {
> >> + status = cr_status[i / 2];
> >> + status >>= ((i % 2) * 4);
> >> + if (!(status & DP_LANE_CR_DONE))
> >> + return true;
> >> + }
> >> +
> >> + return false;
> >> +}
> >
> > Why not use !drm_dp_clock_recovery_ok() for dp_ctrl_any_lane_cr_lose()?
> ok,
>
> > And then move dp_ctrl_any_lane_cr_done() next to
> > drm_dp_clock_recovery_ok() and call it drm_dp_clock_recovery_any_ok()?
> no understand how it work, can you elaborate it more?
I'm suggesting to make a new function called
drm_dp_clock_recovery_any_ok(), written next to
drm_dp_clock_recovery_ok(). Then call it from here instead of implement
it locally in the qcom DP driver.