Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Diederik de Haas" <didi.debian@cknow.org>
To: "Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	"Damon Ding" <damon.ding@rock-chips.com>
Cc: <robh@kernel.org>, <conor+dt@kernel.org>,
	<algea.cao@rock-chips.com>, <rfoss@kernel.org>, <heiko@sntech.de>,
	<devicetree@vger.kernel.org>, <linux-phy@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <sebastian.reichel@collabora.com>,
	<dri-devel@lists.freedesktop.org>, <hjc@rock-chips.com>,
	<kever.yang@rock-chips.com>, <linux-rockchip@lists.infradead.org>,
	<vkoul@kernel.org>, <andy.yan@rock-chips.com>,
	<krzk+dt@kernel.org>, <linux-arm-kernel@lists.infradead.org>,
	<l.stach@pengutronix.de>
Subject: Re: [PATCH v3 07/15] drm/bridge: analogix_dp: Add support for phy configuration.
Date: Fri, 20 Dec 2024 01:17:42 +0100	[thread overview]
Message-ID: <D6G3H3AXXVAJ.3F1WMBTWLX2KV@cknow.org> (raw)
In-Reply-To: <a6vvydjbx3hbckoy74iiyzguyyacwvdh6iirqydjfvhwgocw3a@knecggjcbcid>


[-- Attachment #1.1: Type: text/plain, Size: 1796 bytes --]

On Fri Dec 20, 2024 at 1:13 AM CET, Dmitry Baryshkov wrote:
> On Thu, Dec 19, 2024 at 04:05:56PM +0800, Damon Ding wrote:
> >  void analogix_dp_get_lane_count(struct analogix_dp_device *dp, u32 *count)
> > @@ -546,10 +575,37 @@ void analogix_dp_get_lane_count(struct analogix_dp_device *dp, u32 *count)
> >  void analogix_dp_set_lane_link_training(struct analogix_dp_device *dp)
> >  {
> >  	u8 lane;
> > +	int ret;
> >  
> >  	for (lane = 0; lane < dp->link_train.lane_count; lane++)
> >  		writel(dp->link_train.training_lane[lane],
> >  		       dp->reg_base + ANALOGIX_DP_LN0_LINK_TRAINING_CTL + 4 * lane);
> > +
> > +	if (dp->phy) {
> > +		union phy_configure_opts phy_cfg = {0};
> > +
> > +		for (lane = 0; lane < dp->link_train.lane_count; lane++) {
> > +			u8 training_lane = dp->link_train.training_lane[lane];
> > +			u8 vs, pe;
> > +
> > +			vs = (training_lane & DP_TRAIN_VOLTAGE_SWING_MASK) >>
> > +			     DP_TRAIN_VOLTAGE_SWING_SHIFT;
> > +			pe = (training_lane & DP_TRAIN_PRE_EMPHASIS_MASK) >>
> > +			     DP_TRAIN_PRE_EMPHASIS_SHIFT;
> > +			phy_cfg.dp.voltage[lane] = vs;
> > +			phy_cfg.dp.pre[lane] = pe;
> > +		}
> > +
> > +		phy_cfg.dp.lanes = dp->link_train.lane_count;
> > +		phy_cfg.dp.link_rate =
> > +			drm_dp_bw_code_to_link_rate(dp->link_train.link_rate) / 100;
>
> This two should not be necessary, please drop them.

This too or These two (statements)?

> > +		phy_cfg.dp.set_voltages = true;
> > +		ret = phy_configure(dp->phy, &phy_cfg);
> > +		if (ret && ret != -EOPNOTSUPP) {
> > +			dev_err(dp->dev, "%s: phy_configure() failed: %d\n", __func__, ret);
> > +			return;
> > +		}
> > +	}
> >  }
> >  
> >  u32 analogix_dp_get_lane_link_training(struct analogix_dp_device *dp, u8 lane)
> > -- 
> > 2.34.1
> > 


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2024-12-20  0:19 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19  8:05 [PATCH v3 00/15] Add eDP support for RK3588 Damon Ding
2024-12-19  8:05 ` [PATCH v3 01/15] drm/rockchip: analogix_dp: Use formalized struct definition for grf field Damon Ding
2024-12-19  8:05 ` [PATCH v3 02/15] dt-bindings: display: rockchip: analogix-dp: Add support for RK3588 Damon Ding
2024-12-19  8:28   ` Krzysztof Kozlowski
2024-12-26  2:10     ` Damon Ding
2024-12-19  8:05 ` [PATCH v3 03/15] drm/rockchip: analogix_dp: " Damon Ding
2024-12-19  8:05 ` [PATCH v3 04/15] phy: phy-rockchip-samsung-hdptx: Rename some register names related to DP Damon Ding
2024-12-20  0:22   ` Dmitry Baryshkov
2024-12-20  1:46     ` Damon Ding
2024-12-20  2:01       ` Dmitry Baryshkov
2024-12-19  8:05 ` [PATCH v3 05/15] phy: phy-rockchip-samsung-hdptx: Add support for eDP mode Damon Ding
2024-12-19  8:05 ` [PATCH v3 06/15] drm/bridge: analogix_dp: Add support for RK3588 Damon Ding
2024-12-19  8:05 ` [PATCH v3 07/15] drm/bridge: analogix_dp: Add support for phy configuration Damon Ding
2024-12-20  0:13   ` Dmitry Baryshkov
2024-12-20  0:17     ` Diederik de Haas [this message]
2024-12-20  3:37     ` Damon Ding
2024-12-20  5:37       ` Dmitry Baryshkov
2024-12-25  8:27         ` Damon Ding
2024-12-19  8:05 ` [PATCH v3 08/15] drm/rockchip: analogix_dp: Add support to get panel from the DP AUX bus Damon Ding
2024-12-20  0:16   ` Dmitry Baryshkov
2024-12-20  8:29     ` Damon Ding
2024-12-19  8:05 ` [PATCH v3 09/15] drm/bridge: " Damon Ding
2024-12-20  0:17   ` Dmitry Baryshkov
2024-12-19  8:05 ` [PATCH v3 10/15] dt-bindings: display: rockchip: analogix-dp: " Damon Ding
2024-12-20  0:18   ` Dmitry Baryshkov
2024-12-20  2:48     ` Damon Ding
2024-12-24  9:36   ` Krzysztof Kozlowski
2024-12-19  8:06 ` [PATCH v3 11/15] dt-bindings: display: rockchip: Fix label name of hdptxphy for RK3588 HDMI TX Controller Damon Ding
2024-12-19  8:06 ` [PATCH v3 12/15] arm64: dts: rockchip: Fix label name of hdptxphy for RK3588 Damon Ding
2024-12-19  8:06 ` [PATCH v3 13/15] arm64: dts: rockchip: Add eDP0 node " Damon Ding
2024-12-19  8:06 ` [PATCH v3 14/15] arm64: dts: rockchip: Enable eDP0 display on RK3588S EVB1 board Damon Ding
2024-12-20  0:20   ` Dmitry Baryshkov
2024-12-20  2:38     ` Damon Ding
2024-12-20  5:38       ` Dmitry Baryshkov
2024-12-25  9:34         ` Damon Ding
2024-12-26 20:26           ` Dmitry Baryshkov
2024-12-27  8:54             ` Damon Ding
2024-12-19  8:06 ` [PATCH v3 15/15] arm64: dts: rockchip: Add eDP1 node for RK3588 Damon Ding

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=D6G3H3AXXVAJ.3F1WMBTWLX2KV@cknow.org \
    --to=didi.debian@cknow.org \
    --cc=algea.cao@rock-chips.com \
    --cc=andy.yan@rock-chips.com \
    --cc=conor+dt@kernel.org \
    --cc=damon.ding@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=kever.yang@rock-chips.com \
    --cc=krzk+dt@kernel.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=vkoul@kernel.org \
    /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