Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Luo Liu" <Luo.Liu@cixtech.com>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 2/5] drm/bridge: trilinear: add the DPTX hardware layer
Date: Fri, 27 Nov 2026 08:05:48 +0000	[thread overview]
Message-ID: <sashiko-outbox-236857@kernel.org> (raw)
In-Reply-To: <20261127074639.277959-3-Luo.Liu@cixtech.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/bridge: trilinear: dptx_hw_dpcd_power_up/down() duplicate DP
  helpers
--

commit 4572b1c38c3025ae29ace85b65751b014caf62e2
Author: Luo Liu <Luo.Liu@cixtech.com>

drm/bridge: trilinear: add the DPTX hardware layer

This commit adds the register and PHY programming layer for the Trilinear
DisplayPort transmitter, including AUX transfers, DPCD capability parsing,
link training, and stream configuration.

> diff --git a/drivers/gpu/drm/bridge/trilinear/dptx_hw.c b/drivers/gpu/drm/bridge/trilinear/dptx_hw.c
> new file mode 100644
> index 0000000000000..8d8f9312d198d
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/trilinear/dptx_hw.c

[ ... ]

> +static int dptx_hw_dpcd_power_up(struct dp_hw *hw,
> +				 unsigned int delay_ms)
> +{
> +	u8 value;
> +	int ret;
> +
> +	ret = drm_dp_dpcd_readb(&hw->aux, DP_SET_POWER, &value);
> +	if (ret < 0)
> +		return ret;
> +
> +	value = (value & ~DP_SET_POWER_MASK) | DP_SET_POWER_D0;
> +
> +	ret = drm_dp_dpcd_writeb(&hw->aux, DP_SET_POWER, value);
> +	if (ret < 0)
> +		return ret;
> +
> +	msleep(delay_ms);
> +
> +	return 0;
> +}
> +
> +static int dptx_hw_dpcd_power_down(struct dp_hw *hw, bool hpd)
> +{
> +	u8 value;
> +	int ret;
> +
> +	if (!hpd)
> +		return 0;
> +
> +	ret = drm_dp_dpcd_readb(&hw->aux, DP_SET_POWER, &value);
> +	if (ret < 0)
> +		return ret;
> +
> +	value = (value & ~DP_SET_POWER_MASK) | DP_SET_POWER_D3;
> +
> +	ret = drm_dp_dpcd_writeb(&hw->aux, DP_SET_POWER, value);
> +	if (ret < 0)
> +		return ret;
> +
> +	usleep_range(200, 205);
> +
> +	return 0;
> +}

[Severity: Low]
Could dptx_hw_dpcd_power_up() and dptx_hw_dpcd_power_down() use
drm_dp_link_power_up() and drm_dp_link_power_down(&hw->aux,
hw->dpcd[DP_DPCD_REV]) instead of open-coding the DP_SET_POWER
read-modify-write sequence?  Using the helpers also avoids accessing
DP_SET_POWER on DPCD v1.0 sinks where that register does not exist.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261127074639.277959-1-Luo.Liu@cixtech.com?part=2

  reply	other threads:[~2026-11-27  8:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  7:46 [PATCH v7 0/5] drm/bridge: trilinear: add the Sky1 DisplayPort transmitter Luo Liu
2026-11-27  7:46 ` [PATCH v7 1/5] dt-bindings: display: add CIX " Luo Liu
2026-11-27  7:46 ` [PATCH v7 2/5] drm/bridge: trilinear: add the DPTX hardware layer Luo Liu
2026-11-27  8:05   ` sashiko-bot [this message]
2026-11-27  7:46 ` [PATCH v7 3/5] drm/bridge: trilinear: add the DPTX DRM bridge Luo Liu
2026-11-27  8:06   ` sashiko-bot
2026-11-27  7:46 ` [PATCH v7 4/5] drm/bridge: trilinear: add the DPTX core and build glue Luo Liu
2026-11-27  8:02   ` sashiko-bot
2026-11-27  7:46 ` [PATCH v7 5/5] drm/cix: add the Sky1 DisplayPort platform glue Luo Liu

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=sashiko-outbox-236857@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Luo.Liu@cixtech.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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