lkml.org 
[lkml]   [2021]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 7/7] drm/msm/dp: retrain link when loss of symbol lock detected
Quoting Kuogee Hsieh (2021-07-13 08:54:07)
> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> index 6a013b0..20951c8 100644
> --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
> +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> @@ -1638,6 +1638,25 @@ static bool dp_ctrl_clock_recovery_any_ok(
> return drm_dp_clock_recovery_ok(link_status, lane_count);
> }
>
> +static bool dp_ctrl_loss_symbol_lock(struct dp_ctrl_private *ctrl)
> +{
> + u8 link_status[DP_LINK_STATUS_SIZE];
> + u8 status;
> + int i;
> + int num_lanes = ctrl->link->link_params.num_lanes;
> +
> + dp_ctrl_read_link_status(ctrl, link_status);
> +
> + for (i = 0; i < num_lanes; i++) {
> + status = link_status[i / 2];
> + status >>= ((i % 2) * 4);
> + if (!(status & DP_LANE_SYMBOL_LOCKED))
> + return true;
> + }
> +
> + return false;
> +}

Can this function move to drivers/gpu/drm/drm_dp_helper.c and be called
drm_dp_symbol_locked()?

> +
> int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl)
> {
> int rc = 0;

\
 
 \ /
  Last update: 2021-07-22 21:14    [W:0.737 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site