From: sashiko-bot@kernel.org
To: "Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v3 08/15] drm/tidss: Add mechanism to detect DPI output
Date: Fri, 29 May 2026 09:28:17 +0000 [thread overview]
Message-ID: <20260529092818.42D7F1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260529-beagley-ai-display-v3-8-7fefdc5d1adf@ideasonboard.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] DPI output detection misidentifies AM65x OLDI ports as DPI, causing corruption of DPI clock configuration.
- [Low] Manual parsing of device tree 'compatible' property instead of using the standard `of_device_is_compatible()` API.
--
commit b4b73a906f813456b4eaed059b154ca4c691e76b
Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drm/tidss: Add mechanism to detect DPI output
This commit adds a mechanism to determine if an output is going to a DPI
output or not, by checking if it is not DSI or OLDI. It uses a helper to
check bridge compatible strings and parent nodes to make this determination.
> diff --git a/drivers/gpu/drm/tidss/tidss_kms.c b/drivers/gpu/drm/tidss/tidss_kms.c
> index 8bb93194e5ac6..bc8b10af9a48e 100644
> --- a/drivers/gpu/drm/tidss/tidss_kms.c
> +++ b/drivers/gpu/drm/tidss/tidss_kms.c
[ ... ]
> +static bool tidss_is_bridge_internal(struct tidss_device *tidss,
> + struct drm_bridge *bridge)
> +{
> + struct device_node *parent, *grand_parent;
> + struct property *prop;
> + bool is_internal;
> +
> + if (WARN_ON(!bridge->of_node))
> + return false;
> +
> + prop = of_find_property(bridge->of_node, "compatible", NULL);
> + for (const char *cp = of_prop_next_string(prop, NULL); cp;
> + cp = of_prop_next_string(prop, cp)) {
> + for (unsigned int i = 0;
> + i < ARRAY_SIZE(tidss_internal_bridge_compatibles); ++i) {
> + if (strcmp(cp, tidss_internal_bridge_compatibles[i]) == 0)
> + return true;
> + }
> + }
[Severity: Low]
Is it necessary to manually parse the compatible property string here?
Using the standard of_device_is_compatible() API would be safer and
avoid reinventing the wheel for property iteration.
> + parent = of_get_parent(bridge->of_node);
> + grand_parent = of_get_parent(parent);
> +
> + is_internal = parent && grand_parent &&
> + tidss->dev->of_node == grand_parent &&
> + of_node_name_eq(parent, "oldi-transmitters");
> +
> + of_node_put(grand_parent);
> + of_node_put(parent);
> +
> + return is_internal;
> +}
[ ... ]
> @@ -160,6 +206,11 @@ static int tidss_dispc_modeset_init(struct tidss_device *tidss)
> return dev_err_probe(dev, ret, "port %d probe failed\n", i);
> }
>
> + if (bridge)
> + dpi_output = !tidss_is_bridge_internal(tidss, bridge);
> + else
> + dpi_output = true;
> +
[Severity: High]
Could this logic misidentify AM65x OLDI ports as DPI?
On the AM65x SoC, the OLDI transmitter is integrated directly into the DSS
without a separate oldi-transmitters node in the device tree.
If a panel is directly connected to the AM65x OLDI port, bridge will be NULL.
If an external LVDS bridge is connected, it will not be recognized as an
internal bridge. In both cases, the OLDI port seems like it would be
unconditionally marked as dpi_output = true.
Since dpi_output is used to configure the shared DPI clock control register,
would preparing the OLDI port incorrectly write its own polarity
configuration and corrupt the actual DPI port's configuration?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260529-beagley-ai-display-v3-0-7fefdc5d1adf@ideasonboard.com?part=8
next prev parent reply other threads:[~2026-05-29 9:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 8:45 [PATCH v3 00/15] drm/tidss: Add BeagleY-AI display support (and some more) Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 01/15] dt-bindings: display: ti: Move ti,am62l-dss binding to a new binding file Tomi Valkeinen
2026-05-29 8:59 ` sashiko-bot
2026-05-29 8:45 ` [PATCH v3 02/15] dt-bindings: display: ti,am65x-dss: Simplify binding Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 03/15] dt-bindings: display: ti,am625-oldi: Add optional power-domain for OLDI Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 04/15] dt-bindings: display: ti,am65x-dss: Add ti,dpi-io-ctrl Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 05/15] dt-bindings: display: ti,am65x-dss: Add AM62P DSS Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 06/15] drm/tidss: Remove extra pm_runtime_mark_last_busy Tomi Valkeinen
2026-05-29 9:11 ` sashiko-bot
2026-05-29 8:45 ` [PATCH v3 07/15] drm/tidss: oldi: Remove define for unused register OLDI_LB_CTRL Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 08/15] drm/tidss: Add mechanism to detect DPI output Tomi Valkeinen
2026-05-29 9:28 ` sashiko-bot [this message]
2026-05-29 8:45 ` [PATCH v3 09/15] drm/tidss: Add external data and sync signal edge configuration Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 10/15] drm/tidss: Add support for DPIENABLE bit Tomi Valkeinen
2026-05-29 9:30 ` sashiko-bot
2026-05-29 8:45 ` [PATCH v3 11/15] drm/tidss: oldi: Fix OLDI signal polarities Tomi Valkeinen
2026-05-29 9:37 ` sashiko-bot
2026-05-29 8:45 ` [PATCH v3 12/15] drm/tidss: oldi: Convert OLDI to an aux driver Tomi Valkeinen
2026-05-29 10:01 ` sashiko-bot
2026-05-29 8:45 ` [PATCH v3 13/15] drm/tidss: Add support for AM62P display subsystem Tomi Valkeinen
2026-05-29 8:45 ` [PATCH v3 14/15] arm64: dts: ti: k3-am62p-j722s-common-main: Add support for DSS Tomi Valkeinen
2026-05-29 9:54 ` sashiko-bot
2026-05-29 8:45 ` [PATCH v3 15/15] arm64: dts: ti: beagley-ai: Enable HDMI display and audio Tomi Valkeinen
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=20260529092818.42D7F1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tomi.valkeinen@ideasonboard.com \
/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