RFC drm/bridge: Add support for selecting DSI host HS clock from DSI bridge
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest7 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | drm/bridge: Pass struct drm_bus_cfg to select_bus_fmt_recursive()drivers/ | +27 | 0 replies | |
| 2/7 | drm/bridge: Add new atomic_get_input_bus_cfgs callbackdrivers/ include/ | +74 | 0 replies | |
| 3/7 | drm/bridge: Extend struct drm_bus_cfg with clock fielddrivers/ include/ | +11 | 3 replies | |
| 4/7 | drm/bridge: dw-mipi-dsi: Move PLL setup into atomic_enabledrivers/ | +8 | 0 replies | |
| 5/7 | drm/bridge: dw-mipi-dsi: Pass bridge state into dw_mipi_dsi_get_lane_mbps()drivers/ drivers/ drivers/ +1 more | +14 | 0 replies | |
| 6/7 | drm/bridge: dw-mipi-dsi: Prefer DSI bus clock settings from bridge_statedrivers/ | +10 | 0 replies | |
| 7/7 | drm/bridge: tc358767: Add support for PLL clock derivation from DSI HS clockdrivers/ | +79 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC][PATCH 0/7] drm/bridge: Add support for selecting DSI host HS clock from DSI bridge
This patch series attempts to address a problem of missing support for DSI bridge-to-bridge or panel-to-bridge clock frequency negotiation. The problem has two variants.
First, a DSI->to->x bridge derives its own internal clock from DSI HS clock, but the DSI HS clock cannot be set to arbitrary values. TS358767 is one such bridge in case it operates without Xtal. In that case, the TC358767 driver must be able to negotiate the specific suitable DSI HS clock frequency for the chip.
Second, both DSI->to->x bridges and DSI hosts currently calculate, or rather guess and hope they both guess the same number as their neighbor, the DSI HS clock frequency from form of PLL=(width * height * bpp / lanes / 2). This is dangerous, since the PLL capabilities on both ends of the DSI bus might differ and the DSI host could easily end up generating wildly different clock than what the DSI bridge/panel expects to receive.
This series attempts to address these negotiation problems by extending the existing .atomic_get_input_bus_fmts callback into .atomic_get_input_bus_cfgs callback in struct drm_bridge_funcs {}. The extended version returns not only a list of a list of bus formats supported by a bridge, but the entire list of struct drm_bus_cfg, which currently contains format and bus flags, but can be extended with other members, like desired clock frequency, as required.
This series demonstrates such extension by adding the support for negotiating the DSI clock and by implementing such support in DW DSI Host and TC358767 DSI bridge.
TC358767 part depends on:
https://patchwork.freedesktop.org/series/100372
Marek Vasut (7):
drm/bridge: Pass struct drm_bus_cfg to select_bus_fmt_recursive() drm/bridge: Add new atomic_get_input_bus_cfgs callback drm/bridge: Extend struct drm_bus_cfg with clock field drm/bridge: dw-mipi-dsi: Move PLL setup into atomic_enable drm/bridge: dw-mipi-dsi: Pass bridge state into
dw_mipi_dsi_get_lane_mbps()
drm/bridge: dw-mipi-dsi: Prefer DSI bus clock settings from
bridge_state
drm/bridge: tc358767: Add support for PLL clock derivation from DSI HS
clock
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 22 +++-- drivers/gpu/drm/bridge/tc358767.c | 97 +++++++++++++++---- drivers/gpu/drm/drm_bridge.c | 78 +++++++++++---- .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 1 + drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 17 ++-- include/drm/bridge/dw_mipi_dsi.h | 2 + include/drm/drm_atomic.h | 5 + include/drm/drm_bridge.h | 42 ++++++++ 8 files changed, 214 insertions(+), 50 deletions(-)
Signature · 1 line
2.34.1