drm/bridge: tc358767: Move (e)DP bridge endpoint parsing into dedicated function
authorMarek Vasut <marex@denx.de>
Tue, 29 Mar 2022 08:50:10 +0000 (10:50 +0200)
committerRobert Foss <robert.foss@linaro.org>
Thu, 31 Mar 2022 13:59:07 +0000 (15:59 +0200)
commit8478095a8c4bcea3c83b0767d6c9127434160761
tree3d27834ecdc6713c7f870308cf413d51ff6a6788
parent65fdbb714d7f5764b6571b86f0617782cbe28ab1
drm/bridge: tc358767: Move (e)DP bridge endpoint parsing into dedicated function

The TC358767/TC358867/TC9595 are all capable of operating in multiple
modes, DPI-to-(e)DP, DSI-to-(e)DP, DSI-to-DPI. Only the first mode is
currently supported. In order to support the rest of the modes without
making the tc_probe() overly long, split the bridge endpoint parsing
into dedicated function, where the necessary logic to detect the bridge
mode based on which endpoints are connected, can be implemented.

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Lucas Stach <l.stach@pengutronix.de> # In both DPI to eDP and DSI to DPI mode.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220329085015.39159-7-marex@denx.de
drivers/gpu/drm/bridge/tc358767.c