From: Damon Ding <damon.ding@rock-chips.com>
To: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org
Cc: Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se,
jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
simona@ffwll.ch, dmitry.baryshkov@oss.qualcomm.com,
dianders@chromium.org, m.szyprowski@samsung.com,
andy.yan@rock-chips.com, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [RESEND v3] drm/bridge: analogix_dp: Reuse &link_train.training_lane[] to set DPCD DP_TRAINING_LANEx_SET
Date: Sun, 28 Dec 2025 16:47:25 +0800 [thread overview]
Message-ID: <469f900d-1352-4137-94ec-4daeb5b7a998@rock-chips.com> (raw)
In-Reply-To: <20251111022103.1350183-1-damon.ding@rock-chips.com>
On 11/11/2025 10:21 AM, Damon Ding wrote:
> In analogix_dp_link_start(), &link_train.training_lane[] is used to
> set phy PE/VS configurations, and buf[] is initialized with the same
> values to set DPCD DP_TRAINING_LANEx_SET.
>
> It makes sense to reuse &link_train.training_lane[] to set DPCD
> DP_TRAINING_LANEx_SET, which can remove the redundant assignments
> and make codes more concise.
>
> Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>
> ---
>
> Changes in v2:
> - Add Tested-by tag.
>
> Changes in v3:
> - Add Reviewed-by tag.
> - Fix the spelling error 'consice' to 'concise'.
Gentle ping.
I just added tags in v2 and v3, and I also tried resend. The patch is
merely a pre-optimization work for the following patch series:
https://lore.kernel.org/all/20251217093321.3108939-1-damon.ding@rock-chips.com/
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 6ec3d811b5f0..1e834d3656c1 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -281,12 +281,8 @@ static int analogix_dp_link_start(struct analogix_dp_device *dp)
> if (retval < 0)
> return retval;
>
> - for (lane = 0; lane < lane_count; lane++)
> - buf[lane] = DP_TRAIN_PRE_EMPH_LEVEL_0 |
> - DP_TRAIN_VOLTAGE_SWING_LEVEL_0;
> -
> - retval = drm_dp_dpcd_write(&dp->aux, DP_TRAINING_LANE0_SET, buf,
> - lane_count);
> + retval = drm_dp_dpcd_write(&dp->aux, DP_TRAINING_LANE0_SET,
> + dp->link_train.training_lane, lane_count);
> if (retval < 0)
> return retval;
>
next prev parent reply other threads:[~2025-12-28 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 2:21 Damon Ding
2025-12-28 8:47 ` Damon Ding [this message]
2026-03-25 6:35 ` Luca Ceresoli
2026-03-25 12:22 ` Luca Ceresoli
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=469f900d-1352-4137-94ec-4daeb5b7a998@rock-chips.com \
--to=damon.ding@rock-chips.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--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
all inboxes | Powered by JetHome®