linux/drivers/gpu/drm/bridge
Liu Ying 9a8406ba1a phy: dphy: Correct clk_pre parameter
The D-PHY specification (v1.2) explicitly mentions that the T-CLK-PRE
parameter's unit is Unit Interval(UI) and the minimum value is 8.  Also,
kernel doc of the 'clk_pre' member of struct phy_configure_opts_mipi_dphy
mentions that it should be in UI.  However, the dphy core driver wrongly
sets 'clk_pre' to 8000, which seems to hint that it's in picoseconds.

So, let's fix the dphy core driver to correctly reflect the T-CLK-PRE
parameter's minimum value according to the D-PHY specification.

I'm assuming that all impacted custom drivers shall program values in
TxByteClkHS cycles into hardware for the T-CLK-PRE parameter.  The D-PHY
specification mentions that the frequency of TxByteClkHS is exactly 1/8
the High-Speed(HS) bit rate(each HS bit consumes one UI).  So, relevant
custom driver code is changed to program those values as
DIV_ROUND_UP(cfg->clk_pre, BITS_PER_BYTE), then.

Note that I've only tested the patch with RM67191 DSI panel on i.MX8mq EVK.
Help is needed to test with other i.MX8mq, Meson and Rockchip platforms,
as I don't have the hardwares.

Fixes: 2ed869990e ("phy: Add MIPI D-PHY configuration options")
Tested-by: Liu Ying <victor.liu@nxp.com> # RM67191 DSI panel on i.MX8mq EVK
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> # for phy-meson-axg-mipi-dphy.c
Tested-by: Neil Armstrong <narmstrong@baylibre.com> # for phy-meson-axg-mipi-dphy.c
Tested-by: Guido Günther <agx@sigxcpu.org> # Librem 5 (imx8mq) with it's rather picky panel
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20220124024007.1465018-1-victor.liu@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2022-02-02 10:33:04 +05:30
..
adv7511 drm/bridge: adv7511: Register and attach our DSI device at probe 2021-10-27 22:07:56 +02:00
analogix drm/bridge: anx7625: fix an error code in anx7625_register_audio() 2021-11-25 11:06:38 +01:00
cadence drm: bridge: cdns-mhdp8546: Fix PM reference leak in 2021-05-31 15:50:59 +02:00
synopsys drm/bridge: dw-hdmi: handle ELD when DRM_BRIDGE_ATTACH_NO_CONNECTOR 2021-11-12 10:05:45 +01:00
Kconfig drm/bridge: parade-ps8640: Populate devices on aux-bus 2021-11-11 08:23:19 -08:00
Makefile drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver 2021-06-08 11:42:25 +02:00
cdns-dsi.c drm/bridge: cdns: Make use of the helper function devm_platform_ioremap_resource() 2021-08-31 16:24:00 +02:00
chipone-icn6211.c drm: bridge: Add Chipone ICN6211 MIPI-DSI to RGB bridge 2021-03-25 17:46:08 +01:00
chrontel-ch7033.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
cros-ec-anx7688.c drm/bridge: Add ChromeOS EC ANX7688 bridge driver support 2021-05-18 16:41:01 +02:00
display-connector.c drm/bridge: display-connector: implement bus fmts callbacks 2021-11-12 10:07:11 +01:00
ite-it66121.c drm: bridge: it66121: Fix return value it66121_probe 2021-09-20 11:26:06 +02:00
lontium-lt8912b.c drm/bridge: lt8912b: Register and attach our DSI device at probe 2021-10-27 22:07:56 +02:00
lontium-lt9611.c lontium-lt9611: check a different register bit for HDMI sensing 2021-11-30 13:03:04 +01:00
lontium-lt9611uxc.c drm/bridge: lt9611uxc: Register and attach our DSI device at probe 2021-10-27 22:07:57 +02:00
lvds-codec.c drm/bridge: lvds-codec: Add support for pixel data sampling edge select 2021-12-16 09:37:41 +01:00
megachips-stdpxxxx-ge-b850v3-fw.c drm/bridge: megachips: Ensure both bridges are probed before registration 2021-11-25 12:51:47 +01:00
nwl-dsi.c phy: dphy: Correct clk_pre parameter 2022-02-02 10:33:04 +05:30
nwl-dsi.h drm/bridge: Add NWL MIPI DSI host controller support 2020-04-09 15:52:47 +02:00
nxp-ptn3460.c drm/bridge: nxp-ptn3460: add drm_panel_bridge support 2020-07-27 19:25:10 +02:00
panel.c drm/bridge: Move devm_drm_of_get_bridge to bridge/panel.c 2021-09-22 10:44:00 +02:00
parade-ps8622.c drm/bridge: parade-ps8622: add drm_panel_bridge support 2020-07-27 17:22:14 +02:00
parade-ps8640.c drm/bridge: parade-ps8640: Add backpointer to drm_device in drm_dp_aux 2021-12-07 09:09:17 -08:00
sii902x.c drm/bridge: sii902x: Enable I/O and core VCC supplies if present 2020-11-08 11:53:37 +01:00
sii9234.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
sil-sii8620.c drm next for 5.9-rc1 2020-08-05 19:50:06 -07:00
sil-sii8620.h
simple-bridge.c drm: bridge: simple-bridge: Make connector creation optional 2020-06-23 19:52:32 +02:00
tc358762.c drm/bridge: tc358762: Add basic driver for Toshiba TC358762 DSI-to-DPI bridge 2020-08-12 22:06:18 +02:00
tc358764.c drm/bridge: tc358764: restore connector support 2020-10-05 16:25:25 +02:00
tc358767.c drm/dp: Add backpointer to drm_device in drm_dp_aux 2021-04-27 18:43:42 -04:00
tc358768.c drm/bridge: tc358768: Correct BTACNTRL1 programming 2021-10-19 11:40:02 +02:00
tc358775.c drm/bridge: tc358775: Register and attach our DSI device at probe 2021-10-27 22:07:58 +02:00
thc63lvd1024.c drm/bridge: thc63lvd1024: Fix regulator_get_optional() misuse 2021-01-05 07:19:48 +02:00
ti-sn65dsi83.c drm/bridge: sn65dsi83: Register and attach our DSI device at probe 2021-10-27 22:07:57 +02:00
ti-sn65dsi86.c drm/bridge: ti-sn65dsi86: Set max register for regmap 2021-12-16 13:02:23 +01:00
ti-tfp410.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
ti-tpd12s015.c drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe 2020-11-05 22:09:09 +01:00