drm/bridge: dw-mipi-dsi: Find the possible DSI devices
authorJagan Teki <jagan@amarulasolutions.com>
Sun, 4 Jul 2021 14:03:09 +0000 (19:33 +0530)
committerRobert Foss <robert.foss@linaro.org>
Tue, 27 Jul 2021 09:59:33 +0000 (11:59 +0200)
commitc206c7faeb3263a7cc7b4de443a3877cd7a5e74b
tree2fde11357cd59323aabf9a4b2feade09b79320d0
parent0f3b68b66a6deb41c3c0eb805bb3f407083d2f57
drm/bridge: dw-mipi-dsi: Find the possible DSI devices

Finding panel_or_bridge might vary based on associated
DSI devices like DSI panel, bridge, and I2C based DSI
bridge.

1. DSI panels and bridges will invoke the host attach
   from probe in order to find the panel_or_bridge.

   chipone_probe()
       dw_mipi_dsi_host_attach().start
   dw_mipi_dsi_panel_or_bridge()
...found the panel_or_bridge...

   ltdc_encoder_init().start
       dw_mipi_dsi_bridge_attach().start
   dw_mipi_dsi_host_attach().start
       chipone_attach(). start

               chipone_attach(). done
   dw_mipi_dsi_host_attach().done
       dw_mipi_dsi_bridge_attach(). done
   ltdc_encoder_init().done

2. I2C based DSI bridge will invoke the drm_bridge_attach
   from bridge attach in order to find the panel_or_bridge.

   ltdc_encoder_init().start
       dw_mipi_dsi_bridge_attach().start
   dw_mipi_dsi_panel_or_bridge()
...found the panel_or_bridge...
   dw_mipi_dsi_host_attach().start
       sn65dsi83_attach(). start

               sn65dsi83_attach(). done
   dw_mipi_dsi_host_attach().done
       dw_mipi_dsi_bridge_attach(). done
   ltdc_encoder_init().done

So, invoke the panel_or_bridge from host attach and
bridge attach in order to find all possible DSI devices.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Yannick Fertre <yannick.fertre@foss.st.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210704140309.268469-1-jagan@amarulasolutions.com
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c