From: Jun Yan <jerrysteve1101@gmail.com>
To: damon.ding@rock-chips.com
Cc: Laurent.pinchart@ideasonboard.com, airlied@gmail.com,
andrzej.hajda@intel.com, dri-devel@lists.freedesktop.org,
heiko@sntech.de, jernej.skrabec@gmail.com,
jerrysteve1101@gmail.com, jonas@kwiboo.se,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
luca.ceresoli@bootlin.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, neil.armstrong@linaro.org, rfoss@kernel.org,
simona@ffwll.ch, tzimmermann@suse.de
Subject: Re: [PATCH RSEND] drm/bridge: analogix_dp: use devm_phy_optional_get() for the DP PHY
Date: Thu, 24 Sep 2026 19:12:49 +0800 [thread overview]
Message-ID: <20260924111251.936444-1-jerrysteve1101@gmail.com> (raw)
In-Reply-To: <a0754d11-d88b-4dda-972f-7c696a037bc2@rock-chips.com>
> On 9/24/2026 11:24 AM, Damon Ding wrote:
> > Hi Jun,
> >
> > On 9/24/2026 10:04 AM, Jun Yan wrote:
> >> The DP PHY is optional: the Rockchip RK3399 eDP controller (used as the
> >> internal eDP port) has no separate PHY device and relies on its built-in
> >> PHY, which is programmed directly through the GRF registers, so its DT
> >> node carries no "phys"/"phy-names" property.
> >>
> >> Requesting the PHY with devm_phy_get() therefore returns -ENODEV (or
> >> -ENOSYS when CONFIG_GENERIC_PHY is disabled) and the driver logs a
> >> misleading "no DP phy configured" error at probe time before falling back
> >> to a NULL phy.
> >>
> >> Use devm_phy_optional_get() instead, which returns NULL when the PHY is
> >> absent and otherwise behaves identically, and drop the manual -ENODEV/
> >> -ENOSYS handling. This also removes the spurious error message.
> >>
> >> Assisted-by: Claude:deepseek-v4-flash
> >> Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
> >> ---
> >> .../gpu/drm/bridge/analogix/analogix_dp_core.c | 18 +++---------------
> >> 1 file changed, 3 insertions(+), 15 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/
> >> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> >> index 18e76d1e78e1..28eb668d3e3f 100644
> >> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> >> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> >> @@ -1427,21 +1427,9 @@ analogix_dp_probe(struct device *dev, struct
> >> analogix_dp_plat_data *plat_data)
> >> if (ret)
> >> return ERR_PTR(ret);
> >> - dp->phy = devm_phy_get(dp->dev, "dp");
> >> - if (IS_ERR(dp->phy)) {
> >> - dev_err(dp->dev, "no DP phy configured\n");
> >> - ret = PTR_ERR(dp->phy);
> >> - if (ret) {
> >> - /*
> >> - * phy itself is not enabled, so we can move forward
> >> - * assigning NULL to phy pointer.
> >> - */
> >> - if (ret == -ENOSYS || ret == -ENODEV)
> >> - dp->phy = NULL;
> >> - else
> >> - return ERR_PTR(ret);
> >> - }
> >> - }
> >
> > It should be better to add some comments here:
> >
> > /*
> > * Exynos5/RK3288/RK3399 use Analogix DP controller built-in PHY,
> > * no separate PHY configuration is needed.
> > */
>
> Well, I think it should be fixed to:
>
> /*
> * RK3288/RK3399 use Analogix DP controller built-in PHY,
> * no extra PHY configuration is required.
> */
>
> The Exynos5xxx case may be more complex.
>
Thanks for the review. I will add the comments in the patch and send v2 soon.
> >
> >> + dp->phy = devm_phy_optional_get(dp->dev, "dp");
> >> + if (IS_ERR(dp->phy))
> >> + return ERR_CAST(dp->phy);
> >> dp->clock = devm_clk_get(&pdev->dev, "dp");
> >> if (IS_ERR(dp->clock)) {
> >
> > With the comment added:
> > Reviewed-by: Damon Ding <damon.ding@rock-chips.com>
> >
> > Best regards,
> > Damon
> >
prev parent reply other threads:[~2026-09-24 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 2:04 Jun Yan
2026-09-24 3:24 ` Damon Ding
2026-09-24 3:40 ` Damon Ding
2026-09-24 11:12 ` Jun Yan [this message]
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=20260924111251.936444-1-jerrysteve1101@gmail.com \
--to=jerrysteve1101@gmail.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=damon.ding@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=luca.ceresoli@bootlin.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®