OpenCloudOS-Kernel/drivers/gpu/drm/bridge
Douglas Anderson cb8e30ddb7 drm/bridge: ps8640: Add back the 50 ms mystery delay after HPD
Back in commit 826cff3f7e ("drm/bridge: parade-ps8640: Enable
runtime power management") we removed a mysterious 50 ms delay because
"Parade's support [couldn't] explain what the delay [was] for".

While I'm always a fan of removing mysterious delays, I suspect that
we need this mysterious delay to avoid some problems.

Specifically, what I found recently is that on sc7180-trogdor-homestar
sometimes the AUX backlight wasn't initializing properly. Some
debugging showed that the drm_dp_dpcd_read() function that the AUX
backlight driver was calling was returning bogus data about 1% of the
time when I booted up. This confused
drm_panel_dp_aux_backlight(). From continued debugging:
- If I retried the read then the read worked just fine.
- If I added a loop to perform the same read that
  drm_panel_dp_aux_backlight() was doing 30 times at bootup I could
  see that some percentage of the time the first read would give bogus
  data but all 29 additional reads would always be fine.
- If I added a large delay _after_ powering on the panel but before
  powering on PS8640 I could still reproduce the problem.
- If I added a delay after PS8640 powered on then I couldn't reproduce
  the problem.
- I couldn't reproduce the problem on a board with the same panel but
  the ti-sn65dsi86 bridge chip.

To me, the above indicated that there was a problem with PS8640 and
not the panel.

I don't really have any insight into what's going on in the MCU, but
my best guess is that when the MCU itself sees the HPD go high that it
does some AUX transfers itself and this is confusing things.

Let's go back and add back in the mysterious 50 ms delay. We only want
to do this the first time we see HPD go high after booting the MCU,
not every time we double-check HPD.

With this, the backlight initializes reliably on homestar.

Fixes: 826cff3f7e ("drm/bridge: parade-ps8640: Enable runtime power management")
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20221017121813.1.I59700c745fbc31559a5d5c8e2a960279c751dbd5@changeid
2022-10-21 08:07:12 -07:00
..
adv7511 drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
analogix drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
cadence gpu/drm/bridge/cadence: avoid flush_scheduled_work() usage 2022-09-01 13:43:46 +02:00
imx drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03:00
synopsys drm: bridge/dw-hdmi-ahb-audio: use strscpy() is more robust and safer 2022-09-20 08:59:13 +00:00
Kconfig drm/bridge: imx: Add i.MX8qm/qxp pixel combiner support 2022-06-20 21:15:07 +02:00
Makefile drm/bridge: imx: Add i.MX8qm/qxp pixel combiner support 2022-06-20 21:15:07 +02:00
cdns-dsi.c drm/bridge: cdns-dsi: Add support for pre_enable and post_enable control functions. 2022-05-11 14:26:13 +02:00
chipone-icn6211.c drm: bridge: icn6211: Add support for external REFCLK 2022-08-26 13:54:52 +02:00
chrontel-ch7033.c Revert "drm/bridge: chrontel-ch7033: Add byteswap order setting" 2022-09-19 15:17:04 +02:00
cros-ec-anx7688.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
display-connector.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
fsl-ldb.c drm/bridge: fsl-ldb: Enable split mode for LVDS dual link 2022-07-06 15:33:14 +02:00
ite-it6505.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
ite-it66121.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
lontium-lt8912b.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
lontium-lt9211.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
lontium-lt9611.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
lontium-lt9611uxc.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
lvds-codec.c drm/bridge: lvds-codec: Fix error checking of drm_of_lvds_get_data_mapping() 2022-08-29 17:30:32 +02:00
megachips-stdpxxxx-ge-b850v3-fw.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
nwl-dsi.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
nwl-dsi.h drm/bridge: Add NWL MIPI DSI host controller support 2020-04-09 15:52:47 +02:00
nxp-ptn3460.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
panel.c drm/bridge: panel: Introduce drmm_of_get_bridge 2022-07-13 10:46:06 +02:00
parade-ps8622.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
parade-ps8640.c drm/bridge: ps8640: Add back the 50 ms mystery delay after HPD 2022-10-21 08:07:12 -07:00
sii902x.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
sii9234.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
sil-sii8620.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
sil-sii8620.h
simple-bridge.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
tc358762.c drm/mipi-dsi: Make remove callback return void 2022-07-09 10:50:03 +02:00
tc358764.c drm/mipi-dsi: Make remove callback return void 2022-07-09 10:50:03 +02:00
tc358767.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
tc358768.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
tc358775.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
thc63lvd1024.c drm/bridge: thc63lvd1024: Fix regulator_get_optional() misuse 2021-01-05 07:19:48 +02:00
ti-dlpc3433.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
ti-sn65dsi83.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
ti-sn65dsi86.c Revert "Revert "drm/bridge: ti-sn65dsi86: Implement bridge connector operations for DP"" 2022-09-19 15:16:38 +02:00
ti-tfp410.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
ti-tpd12s015.c drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe 2020-11-05 22:09:09 +01:00