From: sashiko-bot@kernel.org
To: "Luca Leonardo Scorcia" <l.scorcia@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH] arm64: dts: mediatek: mt8167: Add DRM nodes
Date: Tue, 17 Nov 2026 13:00:03 +0000 [thread overview]
Message-ID: <sashiko-outbox-218823@kernel.org> (raw)
In-Reply-To: <20261117122802.728987-1-l.scorcia@gmail.com>
Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [High] arm64: dts: mediatek: mt8167: missing reg = <1> on rdma1
endpoints breaks CRTC_EXT
- [Medium] arm64: dts: mediatek: mt8167: undocumented
mediatek,mt8167-dpi compatible
- [Medium] arm64: dts: mediatek: mt8167: unconnected rdma0_out breaks
mtk_drm_probe()
- [Low] arm64: dts: mediatek: mt8167: non-generic display node names
with indices
--
commit 550fb79e6d290ccbb35fb88f6c76ac7ea3a27e5b
Author: Luca Leonardo Scorcia <l.scorcia@gmail.com>
arm64: dts: mediatek: mt8167: Add DRM nodes
This commit adds the devicetree nodes and aliases for the display subsystem
on the MediaTek MT8167 SoC.
> diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
> index 27cf32d7ae35f..2bcdab2934f4f 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
[ ... ]
> @@ -120,10 +136,325 @@ iommu: m4u@10203000 {
[ ... ]
> mmsys: syscon@14000000 {
> compatible = "mediatek,mt8167-mmsys", "syscon";
> reg = <0 0x14000000 0 0x1000>;
> + power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
> #clock-cells = <1>;
> +
> + port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + mmsys_main: endpoint@0 {
> + reg = <0>;
> + remote-endpoint = <&ovl0_in>;
> + };
> +
> + mmsys_ext: endpoint@1 {
> + reg = <1>;
> + remote-endpoint = <&rdma1_in>;
> + };
> + };
> + };
> +
> + ovl0: ovl0@14007000 {
[Severity: Low]
This isn't a bug, but ovl0@14007000, rdma0@14009000, rdma1@1400a000,
wdma0@1400b000, and dpi1@14019000 include instance numbers in their node
names. Should these use generic node names without trailing indices
(ovl@14007000, rdma@14009000, rdma@1400a000, wdma@1400b000, and
dpi@14019000) to match dpi0 (dpi@14013000), the MediaTek display bindings,
and other MediaTek devicetrees?
[ ... ]
> + rdma0: rdma0@14009000 {
> + compatible = "mediatek,mt8167-disp-rdma", "mediatek,mt2701-disp-rdma";
> + reg = <0 0x14009000 0 0x1000>;
> + clocks = <&mmsys CLK_MM_DISP_RDMA0>;
> + interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_LOW>;
> + iommus = <&iommu M4U_PORT_DISP_RDMA0>;
> + power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + rdma0_in: endpoint {
> + remote-endpoint = <&dither_out>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + rdma0_out: endpoint { };
> + };
> + };
> + };
[Severity: Medium]
Does leaving the main pipeline (ovl0 through rdma0) enabled while rdma0_out
has no remote-endpoint cause mtk_drm_probe() to fail on boards that do not
connect rdma0_out?
When mtk_drm_of_ddp_path_build_one() walks the main pipeline from
mmsys_main, it reaches rdma0_out, where of_graph_get_remote_port_parent()
returns null and mtk_drm_of_get_ddp_ep_cid() fails with an invalid-argument
error instead of a no-such-device error:
drivers/gpu/drm/mediatek/mtk_drm_drv.c:mtk_drm_of_ddp_path_build_one() {
...
if (ret == -ENODEV)
return ret;
/* If the last entry is not a final display output, the configuration is wrong */
switch (temp_path[idx - 1]) {
case DDP_COMPONENT_DP_INTF0:
case DDP_COMPONENT_DP_INTF1:
case DDP_COMPONENT_DPI0:
case DDP_COMPONENT_DPI1:
case DDP_COMPONENT_DSI0:
case DDP_COMPONENT_DSI1:
case DDP_COMPONENT_DSI2:
case DDP_COMPONENT_DSI3:
break;
default:
dev_err(dev, "Invalid display hw pipeline. Last component: %d (ret=%d)\n",
temp_path[idx - 1], ret);
return -EINVAL;
}
}
Because rdma0 is not a final display output, mtk_drm_of_ddp_path_build()
aborts mtk_drm_probe() with an error on boards without a main display (such
as mt8167-pumpkin.dts) and before evaluating the external pipeline on
boards that only use rdma1.
> +
> + rdma1: rdma1@1400a000 {
> + compatible = "mediatek,mt8167-disp-rdma", "mediatek,mt2701-disp-rdma";
> + reg = <0 0x1400a000 0 0x1000>;
> + clocks = <&mmsys CLK_MM_DISP_RDMA1>;
> + interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_LOW>;
> + iommus = <&iommu M4U_PORT_DISP_RDMA1>;
> + power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
> + status = "disabled";
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + rdma1_in: endpoint {
> + remote-endpoint = <&mmsys_ext>;
> + };
> + };
> +
> + port@1 {
> + reg = <1>;
> + rdma1_out: endpoint { };
> + };
> + };
> + };
[Severity: High]
Does omitting reg = <1> on the rdma1 endpoints break the external display
pipeline whenever rdma1 is enabled?
mmsys_ext has reg = <1>, so mtk_drm_of_ddp_path_build() builds that path
with crtc_path set to 1. When mtk_drm_of_ddp_path_build_one() steps from
rdma1 to its output port, mtk_drm_of_get_ddp_ep_cid() looks up the endpoint
whose reg matches crtc_path:
drivers/gpu/drm/mediatek/mtk_drm_drv.c:mtk_drm_of_get_ddp_ep_cid() {
...
ep_out = of_graph_get_endpoint_by_regs(node, output_port, crtc_path);
if (!ep_out)
return -ENOENT;
}
Because rdma1_out has no reg property, its endpoint id defaults to 0, so
of_graph_get_endpoint_by_regs(rdma1, 1, 1) returns null and
mtk_drm_of_ddp_path_build_one() fails with an invalid pipeline error.
Adding #address-cells = <1> and #size-cells = <0> to port@0 and port@1 and
using endpoint@1 with reg = <1> on rdma1_in and rdma1_out (as in
mt8365.dtsi and mt8183.dtsi) would allow the driver to follow the external
path.
[ ... ]
> + dpi0: dpi@14013000 {
> + compatible = "mediatek,mt8167-dpi";
> + reg = <0 0x14013000 0 0x1000>;
> + clocks = <&mmsys CLK_MM_DPI0_PXL>, <&mmsys CLK_MM_DPI0_ENGINE>,
> + <&apmixedsys CLK_APMIXED_LVDSPLL>;
> + clock-names = "pixel", "engine", "pll";
> + interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_LOW>;
> + power-domains = <&spm MT8167_POWER_DOMAIN_MM>;
> + status = "disabled";
[Severity: Medium]
Is "mediatek,mt8167-dpi" missing from the devicetree bindings and MediaTek
drm driver in this tree, or should dpi0 and dpi1 include a fallback
compatible?
Without a matching entry in Documentation/devicetree/bindings/display/
mediatek/mediatek,dpi.yaml, mtk_dpi_of_ids, and mtk_ddp_comp_dt_ids,
dtbs_check fails on both nodes and mtk_drm_of_get_ddp_comp_type() rejects
the pipeline when either dpi node is enabled.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117122802.728987-1-l.scorcia@gmail.com?part=1
prev parent reply other threads:[~2026-11-17 13:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 12:26 [PATCH] arm64: dts: mediatek: mt8167: Add DRM nodes Luca Leonardo Scorcia
2026-11-17 12:31 ` Krzysztof Kozlowski
2026-11-17 13:00 ` sashiko-bot [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=sashiko-outbox-218823@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=l.scorcia@gmail.com \
--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 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.