mirror-linux/drivers/gpu/drm/bridge
Douglas Anderson acb06210b0 drm/bridge: ti-sn65dsi86: Fix power off sequence
When testing with a panel that's apparently a little more persnickety
about the correct power sequence (specifically Samsung ATNA33XC20), we
found that the ti-sn65dsi86 was doing things just slightly wrong.

Looking closely at the ti-sn65dsi86's datasheet, the power off
sequence is supposed to be:
1. Clear VSTREAM_ENABLE bit
2. Stop DSI stream from GPU. DSI lanes must be placed in LP11 state.
3. Program the ML_TX_MODE to 0x0 (OFF)
4. Program the DP_NUM_LANES register to 0x0
5. Clear the DP_PLL_EN bit.
6. Deassert the EN pin.
7. Remove power from supply pins

Since we were doing the whole sequence in the "disable", I believe
that step #2 (stopping the DSI stream from the GPU) wasn't
happening. We also weren't setting DP_NUM_LANES to 0.

Let's fix this.

NOTE: things are a little asymmetric now. For instance, we turn the
PLL on in "enable" but now we're not turning it off until
"post_disable". It would seem to make sense to move the PLL turning on
to "pre_enable" to match. Unfortunately, I don't believe that's
allowed. It looks as if (in the non-refclk mode which probably nobody
is using) we have to wait until the MIPI clock is there before we can
enable the PLL. In any case, the way it is here won't really
hurt--it'll just leave the PLL on a little longer.

Fixes: a095f15c00 ("drm/bridge: add support for sn65dsi86 bridge driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210730084534.v2.2.If8a8ec3bf1855cf0dbb62c005a71d6698c99c125@changeid
2021-07-31 20:03:17 +02:00
..
adv7511 drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features 2021-07-27 09:48:24 +02:00
analogix drm-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
cadence drm: bridge: cdns-mhdp8546: Fix PM reference leak in 2021-05-31 15:50:59 +02:00
synopsys drm-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
Kconfig drm/bridge: ti-sn65dsi86: Add support for the DP AUX bus 2021-06-11 12:31:38 -07:00
Makefile drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver 2021-06-08 11:42:25 +02:00
cdns-dsi.c drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features 2021-07-27 09:48:24 +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
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: add DP support 2020-12-08 13:01:10 +02:00
ite-it66121.c drm: bridge: it66121: fix a resource leak in probe 2021-05-18 13:16:37 +02:00
lontium-lt8912b.c drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features 2021-07-27 09:48:24 +02:00
lontium-lt9611.c drm/bridge: lt9611: Add missing MODULE_DEVICE_TABLE 2021-05-17 10:41:13 +02:00
lontium-lt9611uxc.c drm: bridge: convert sysfs sprintf/snprintf family to sysfs_emit 2021-03-25 17:26:22 +01:00
lvds-codec.c drm/bridge: lvds-codec: Use dev_err_probe for error handling 2020-11-08 15:45:55 +01:00
megachips-stdpxxxx-ge-b850v3-fw.c
nwl-dsi.c drm/bridge: nwl-dsi: Avoid potential multiplication overflow on 32-bit 2021-07-25 14:15:18 +02:00
nwl-dsi.h
nxp-ptn3460.c
panel.c drm: bridge/panel: Cleanup connector on bridge detach 2021-03-29 16:46:01 +01:00
parade-ps8622.c
parade-ps8640.c drm/bridge: ps8640: Rework power state handling 2020-09-15 15:12:24 +02: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
sil-sii8620.c
sil-sii8620.h
simple-bridge.c
tc358762.c
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-misc-next for v5.15: 2021-07-30 14:52:00 +10:00
tc358775.c drm/bridge/tc358775: Remove unneeded semicolon 2020-09-10 08:46:24 +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: ti-sn65dsi83: Retrieve the display mode from the state 2021-06-22 10:15:58 +02:00
ti-sn65dsi86.c drm/bridge: ti-sn65dsi86: Fix power off sequence 2021-07-31 20:03:17 +02:00
ti-tfp410.c
ti-tpd12s015.c drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe 2020-11-05 22:09:09 +01:00