Re: [PATCH v9 07/18] drm: bridge: samsung-dsim: Lookup OF-graph or Child node devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 11, 2022 at 11:36 PM Marek Vasut <marex@xxxxxxx> wrote:
>
> On 12/11/22 06:42, Jagan Teki wrote:
> > On Sun, Dec 11, 2022 at 7:58 AM Marek Vasut <marex@xxxxxxx> wrote:
> >>
> >> On 12/9/22 16:23, Jagan Teki wrote:
> >>> The child devices in MIPI DSI can be binding with OF-graph
> >>> and also via child nodes.
> >>>
> >>> The OF-graph interface represents the child devices via
> >>> remote and associated endpoint numbers like
> >>>
> >>> dsi {
> >>>      compatible = "fsl,imx8mm-mipi-dsim";
> >>>
> >>>      ports {
> >>>        port@0 {
> >>>             reg = <0>;
> >>>
> >>>             dsi_in_lcdif: endpoint@0 {
> >>>                  reg = <0>;
> >>>                  remote-endpoint = <&lcdif_out_dsi>;
> >>>             };
> >>>        };
> >>>
> >>>        port@1 {
> >>>             reg = <1>;
> >>>
> >>>             dsi_out_bridge: endpoint {
> >>>                  remote-endpoint = <&bridge_in_dsi>;
> >>>             };
> >>>        };
> >>> };
> >>>
> >>> The child node interface represents the child devices via
> >>> conventional child nodes on given DSI parent like
> >>>
> >>> dsi {
> >>>      compatible = "samsung,exynos5433-mipi-dsi";
> >>>
> >>>      ports {
> >>>           port@0 {
> >>>                reg = <0>;
> >>>
> >>>                dsi_to_mic: endpoint {
> >>>                     remote-endpoint = <&mic_to_dsi>;
> >>>                };
> >>>           };
> >>>      };
> >>>
> >>>      panel@0 {
> >>>           reg = <0>;
> >>>      };
> >>> };
> >>>
> >>> As Samsung DSIM bridge is common DSI IP across all Exynos DSI
> >>> and NXP i.MX8M host controllers, this patch adds support to
> >>> lookup the child devices whether its bindings on the associated
> >>> host represent OF-graph or child node interfaces.
> >>>
> >>> v9, v8, v7, v6, v5, v4, v3:
> >>> * none
> >>>
> >>> v2:
> >>> * new patch
> >>
> >> This looks like a good candidate for common/helper code which can be
> >> reused by other similar drivers.
> >
> > Yes, I have responded to the same comment of yours in v7 [1]. It is
> > hard to make this code work in a generic way.
>
> It seems the patch adds a for_each...() loop and a function call. Should
> be easy enough to turn that into a helper. What am I missing ?

What I'm saying here is, initially, I added for_each in the existing
drm_of_find_panel_or_bridge helper but it fails to handle all drm_of
use cases generically. You can find more information on this commit
80253168dbfd. I keep this in mind and will see whether it can support
the new dsi helper once this supported is merged. Hope I'm clear on
it.

Jagan.



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux