From: sashiko-bot@kernel.org
To: "Alexander Stein" <alexander.stein@ew.tq-group.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/bridge: tc358767: do not open-code devm_drm_of_get_bridge in DSI path
Date: Wed, 24 Jun 2026 12:24:34 +0000 [thread overview]
Message-ID: <20260624122435.2FAA81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260624121515.2301219-4-alexander.stein@ew.tq-group.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Probe fails with -ENODEV when port 2 has no downstream panel or bridge defined, breaking DisplayPort output.
--
commit 70b94894718399f191075561feb4f2f4f31b4aa9
Author: Alexander Stein <alexander.stein@ew.tq-group.com>
drm/bridge: tc358767: do not open-code devm_drm_of_get_bridge in DSI path
This commit replaces the open-coded panel/bridge discovery logic
with devm_drm_of_get_bridge() to simplify the probing code path
in the tc358767 bridge driver.
> diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
> --- a/drivers/gpu/drm/bridge/tc358767.c
> +++ b/drivers/gpu/drm/bridge/tc358767.c
[ ... ]
> @@ -2341,28 +2341,22 @@ static int tc_probe_edp_bridge_endpoint(struct tc_data *tc)
> {
> struct device *dev = tc->dev;
> struct drm_bridge *bridge;
> - struct drm_panel *panel;
> int ret;
>
> /* port@2 is the output port */
> - ret = drm_of_find_panel_or_bridge(dev->of_node, 2, 0, &panel, &bridge);
> - if (ret && ret != -ENODEV)
> - return dev_err_probe(dev, ret,
> - "Could not find DSI panel or bridge\n");
> -
> - if (panel) {
> - struct drm_bridge *panel_bridge;
> -
> - panel_bridge = devm_drm_panel_bridge_add(dev, panel);
> - if (IS_ERR(panel_bridge))
> - return PTR_ERR(panel_bridge);
> -
> - tc->panel_bridge = panel_bridge;
> - tc->bridge.type = DRM_MODE_CONNECTOR_eDP;
> - } else {
> - tc->bridge.type = DRM_MODE_CONNECTOR_DisplayPort;
> + bridge = devm_drm_of_get_bridge(dev, dev->of_node, 2, 0);
> + if (IS_ERR(bridge)) {
> + ret = PTR_ERR(bridge);
> + if (ret != -ENODEV)
> + return dev_err_probe(dev, ret,
> + "Could not find DSI panel or bridge\n");
> + else
> + return ret;
[Severity: High]
Does this break the probe sequence for DisplayPort configurations?
The previous code in tc_probe_edp_bridge_endpoint() allowed -ENODEV
to bypass the early return, falling back to setting the bridge type to
DRM_MODE_CONNECTOR_DisplayPort when no panel or bridge was found.
By explicitly returning ret when it equals -ENODEV, probe is now aborted
if the downstream device isn't fixed in the device tree. Could this cause
the DisplayPort/eDP bridge driver to fail to load on valid hardware setups?
> }
>
> + tc->panel_bridge = bridge;
> + tc->bridge.type = bridge->type;
> +
> if (tc->hpd_pin >= 0)
> tc->bridge.ops |= DRM_BRIDGE_OP_DETECT;
> tc->bridge.ops |= DRM_BRIDGE_OP_EDID;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260624121515.2301219-1-alexander.stein@ew.tq-group.com?part=4
next prev parent reply other threads:[~2026-06-24 12:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 12:15 [PATCH 1/4] drm/bridge: tc358767: register DP aux bus even in DRM_BRIDGE_ATTACH_NO_CONNECTOR case Alexander Stein
2026-06-24 12:15 ` [PATCH 2/4] drm/bridge: tc358767: allow panels or bridges (connectors) on output Alexander Stein
2026-06-24 12:15 ` [PATCH 3/4] drm/bridge: tc358767: do not open-code devm_drm_of_get_bridge in DPI path Alexander Stein
2026-06-24 12:15 ` [PATCH 4/4] drm/bridge: tc358767: do not open-code devm_drm_of_get_bridge in DSI path Alexander Stein
2026-06-24 12:24 ` sashiko-bot [this message]
2026-06-24 12:31 ` [PATCH 1/4] drm/bridge: tc358767: register DP aux bus even in DRM_BRIDGE_ATTACH_NO_CONNECTOR case sashiko-bot
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=20260624122435.2FAA81F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexander.stein@ew.tq-group.com \
--cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.