Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] drm/mediatek: OF graph traversal fails probe due to disconnected 
rdma0_out
--

commit 09e4433abd1ea0bcfece829092d5582ffb8243ec
Author: Luca Leonardo Scorcia <[email protected]>

arm64: dts: mediatek: mt8167: Add DRM nodes

Add all the DRM nodes required to get DSI and DPI to work on MT8167 SoC.

> diff --git a/arch/arm64/boot/dts/mediatek/mt8167.dtsi 
> b/arch/arm64/boot/dts/mediatek/mt8167.dtsi
> index 27cf32d7ae35f..a50bae4307c16 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8167.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8167.dtsi

[ ... ]

> @@ -120,10 +136,325 @@ iommu: m4u@10203000 {
>                       #iommu-cells = <1>;
>               };

[ ... ]

>               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 {

[Severity: High]
Does adding this port to mmsys cause the mtk_drm probe to fail unconditionally
on existing boards?

By adding this port, mtk_drm is forced to use OF graph traversal instead of
its legacy hardcoded array fallback. This opts the device into graph parsing,
making the disconnected rdma0_out a fatal probe failure instead of falling
back to legacy arrays. This occurs unconditionally on boot for any MT8167
board that does not explicitly define the connection in its .dts file (such as
the existing mt8167-pumpkin.dts).

> +                                     reg = <0>;
> +                                     remote-endpoint = <&ovl0_in>;
> +                             };

[ ... ]

> +             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: High]
Will the missing remote-endpoint at rdma0_out cause the OF graph traversal to
fail?

The traversal algorithm in mtk_drm_of_ddp_path_build_one walks the endpoints.
Because rdma0_out lacks a remote-endpoint property,
of_graph_get_remote_port_parent() returns NULL, causing
mtk_drm_of_get_ddp_ep_cid() to return -EINVAL.

Since rdma0 is not a valid final display output, the pipeline build fails with
-EINVAL and breaks display and DRM driver initialization. If rdma0_out had
been properly connected to dsi_in in the .dtsi (which is disabled by default),
mtk_drm_of_get_ddp_ep_cid() would have safely returned -ENODEV, allowing the
probe to succeed.

> +                     };
> +             };

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=4

Reply via email to