linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel@lists.freedesktop.org, David Airlie <airlied@gmail.com>,
	linux-kernel@vger.kernel.org, Michal Simek <michal.simek@amd.com>,
	linux-arm-kernel@lists.infradead.org,
	Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH 2/6] drm: zynqmp_dp: Adjust training values per-lane
Date: Mon, 18 Mar 2024 19:06:09 +0200	[thread overview]
Message-ID: <20240318170609.GI13682@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240315230916.1759060-3-sean.anderson@linux.dev>

Hi Sean,

Thank you for the patch.

On Fri, Mar 15, 2024 at 07:09:12PM -0400, Sean Anderson wrote:
> The feedback we get from the DPRX is per-lane. Make changes using this
> information, instead of picking the maximum values from all lanes. This
> results in more-consistent training on marginal links.
> 
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> ---
> 
>  drivers/gpu/drm/xlnx/zynqmp_dp.c | 23 ++++++++---------------
>  1 file changed, 8 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> index 98a32e6a0459..8635b5673386 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> @@ -605,28 +605,21 @@ static void zynqmp_dp_adjust_train(struct zynqmp_dp *dp,
>  				   u8 link_status[DP_LINK_STATUS_SIZE])
>  {
>  	u8 *train_set = dp->train_set;
> -	u8 voltage = 0, preemphasis = 0;
>  	u8 i;
>  
>  	for (i = 0; i < dp->mode.lane_cnt; i++) {
> -		u8 v = drm_dp_get_adjust_request_voltage(link_status, i);
> -		u8 p = drm_dp_get_adjust_request_pre_emphasis(link_status, i);
> +		u8 voltage = drm_dp_get_adjust_request_voltage(link_status, i);
> +		u8 preemphasis =
> +			drm_dp_get_adjust_request_pre_emphasis(link_status, i);
>  
> -		if (v > voltage)
> -			voltage = v;
> +		if (voltage >= DP_TRAIN_VOLTAGE_SWING_LEVEL_3)
> +			voltage |= DP_TRAIN_MAX_SWING_REACHED;
>  
> -		if (p > preemphasis)
> -			preemphasis = p;
> -	}
> +		if (preemphasis >= DP_TRAIN_PRE_EMPH_LEVEL_2)
> +			preemphasis |= DP_TRAIN_MAX_PRE_EMPHASIS_REACHED;
>  
> -	if (voltage >= DP_TRAIN_VOLTAGE_SWING_LEVEL_3)
> -		voltage |= DP_TRAIN_MAX_SWING_REACHED;
> -
> -	if (preemphasis >= DP_TRAIN_PRE_EMPH_LEVEL_2)
> -		preemphasis |= DP_TRAIN_MAX_PRE_EMPHASIS_REACHED;
> -
> -	for (i = 0; i < dp->mode.lane_cnt; i++)
>  		train_set[i] = voltage | preemphasis;
> +	}

I don't have enough DP knowledge to review this :-(

>  }
>  
>  /**

-- 
Regards,

Laurent Pinchart

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-03-18 17:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 23:09 [PATCH 0/6] drm: zynqmp_dp: Misc. patches and debugfs support Sean Anderson
2024-03-15 23:09 ` [PATCH 1/6] drm: zynqmp_dp: Downgrade log level for aux retries message Sean Anderson
2024-03-18 16:39   ` Laurent Pinchart
2024-03-15 23:09 ` [PATCH 2/6] drm: zynqmp_dp: Adjust training values per-lane Sean Anderson
2024-03-18 17:06   ` Laurent Pinchart [this message]
2024-03-15 23:09 ` [PATCH 3/6] drm: zynqmp_dp: Add locking Sean Anderson
2024-03-16  9:52   ` kernel test robot
2024-03-18 15:09     ` Sean Anderson
2024-03-18 17:16   ` Laurent Pinchart
2024-03-18 17:29     ` Sean Anderson
2024-03-18 17:59       ` Laurent Pinchart
2024-03-18 18:01         ` Sean Anderson
2024-03-15 23:09 ` [PATCH 4/6] drm: zynqmp_dp: Split off several helper functions Sean Anderson
2024-03-18 17:41   ` Laurent Pinchart
2024-03-15 23:09 ` [PATCH 5/6] drm: zynqmp_dp: Optionally ignore DPCD errors Sean Anderson
2024-03-18 17:47   ` Laurent Pinchart
2024-03-18 18:12     ` Sean Anderson
2024-03-15 23:09 ` [PATCH 6/6] drm: zynqmp_dp: Add debugfs interface for compliance testing Sean Anderson
2024-03-16 10:14   ` kernel test robot
2024-03-18 15:06     ` Sean Anderson
2024-03-18 17:50       ` Laurent Pinchart
2024-03-18 19:05         ` Sean Anderson
2024-03-20  6:03           ` Yujie Liu
2024-03-16 10:55   ` kernel test robot
2024-03-18 15:06     ` Sean Anderson
2024-03-16 17:56   ` Dmitry Baryshkov
2024-03-18 15:22     ` Sean Anderson
2024-03-18 17:52     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240318170609.GI13682@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michal.simek@amd.com \
    --cc=mripard@kernel.org \
    --cc=sean.anderson@linux.dev \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).