mirror_ubuntu-kernels/drivers/gpu/drm/bridge
Brian Norris cc62d98bd5 Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time"
This reverts commit 211f276ed3.

For quite some time, core DRM helpers already ensure that any relevant
connectors/CRTCs/etc. are disabled, as well as their associated
components (e.g., bridges) when suspending the system. Thus,
analogix_dp_bridge_{enable,disable}() already get called, which in turn
call drm_panel_{prepare,unprepare}(). This makes these drm_panel_*()
calls redundant.

Besides redundancy, there are a few problems with this handling:

(1) drm_panel_{prepare,unprepare}() are *not* reference-counted APIs and
are not in general designed to be handled by multiple callers --
although some panel drivers have a coarse 'prepared' flag that mitigates
some damage, at least. So at a minimum this is redundant and confusing,
but in some cases, this could be actively harmful.

(2) The error-handling is a bit non-standard. We ignored errors in
suspend(), but handled errors in resume(). And recently, people noticed
that the clk handling is unbalanced in error paths, and getting *that*
right is not actually trivial, given the current way errors are mostly
ignored.

(3) In the particular way analogix_dp_{suspend,resume}() get used (e.g.,
in rockchip_dp_*(), as a late/early callback), we don't necessarily have
a proper PM relationship between the DP/bridge device and the panel
device. So while the DP bridge gets resumed, the panel's parent device
(e.g., platform_device) may still be suspended, and so any prepare()
calls may fail.

So remove the superfluous, possibly-harmful suspend()/resume() handling
of panel state.

Fixes: 211f276ed3 ("drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time")
Link: https://lore.kernel.org/all/Yv2CPBD3Picg%2FgVe@google.com/
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220822180729.1.I8ac5abe3a4c1c6fd5c061686c6e883c22f69022c@changeid
2022-09-23 07:15:18 -07:00
..
adv7511 drm: bridge: adv7511: Add check for mipi_dsi_driver_register 2022-06-24 22:32:02 +02:00
analogix Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time" 2022-09-23 07:15:18 -07:00
cadence drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
imx drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03:00
synopsys sound updates for 6.0-rc1 2022-08-06 10:19:51 -07: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: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
chrontel-ch7033.c drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03: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: 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/bridge: it6505: Send DPCD SET_POWER to downstream 2022-05-02 16:36:23 +02:00
ite-it66121.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
Kconfig drm/bridge: imx: Add i.MX8qm/qxp pixel combiner support 2022-06-20 21:15:07 +02:00
lontium-lt8912b.c drm/bridge: lt8912b: fix corrupted image output 2022-09-23 09:19:10 +00:00
lontium-lt9211.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
lontium-lt9611.c drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03:00
lontium-lt9611uxc.c drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03:00
lvds-codec.c drm/bridge: lvds-codec: Fix error checking of drm_of_lvds_get_data_mapping() 2022-08-11 01:44:15 +02:00
Makefile drm/bridge: imx: Add i.MX8qm/qxp pixel combiner support 2022-06-20 21:15:07 +02: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 drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
nwl-dsi.h
nxp-ptn3460.c drm/bridge: nxp-ptn3460: switch to devm_drm_of_get_bridge 2022-03-08 12:07:09 +01:00
panel.c drm: Config orientation property if panel provides it 2022-06-21 08:52:59 -07:00
parade-ps8622.c drm/bridge: parade-ps8622: Use backlight helper 2022-06-24 21:58:29 +02:00
parade-ps8640.c drm/bridge: parade-ps8640: Provide wait_hpd_asserted() in struct drm_dp_aux 2022-06-21 09:06:53 -07:00
sii902x.c sound updates for 6.0-rc1 2022-08-06 10:19:51 -07: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: bridge: sii8620: fix possible off-by-one 2022-07-04 20:38:34 +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/bridge: tc358762: drop connector field 2022-04-26 14:04:11 +02:00
tc358764.c drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
tc358767.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
tc358768.c drm/bridge: tc358768: Correct BTACNTRL1 programming 2021-10-19 11:40:02 +02:00
tc358775.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
thc63lvd1024.c drm/bridge: thc63lvd1024: Fix regulator_get_optional() misuse 2021-01-05 07:19:48 +02:00
ti-dlpc3433.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
ti-sn65dsi83.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
ti-sn65dsi86.c drm/bridge: ti-sn65dsi86: Use atomic variants of drm_bridge_funcs 2022-07-06 17:08:03 +02:00
ti-tfp410.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
ti-tpd12s015.c drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe 2020-11-05 22:09:09 +01:00