linux/drivers/gpu/drm/bridge/analogix
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
..
Kconfig drm/display: Move HDCP helpers into display-helper module 2022-04-25 11:19:36 +02:00
Makefile drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP 2020-10-16 23:35:16 +02:00
analogix-anx78xx.c drm: Rename dp/ to display/ 2022-04-25 11:17:45 +02:00
analogix-anx78xx.h drm/bridge: split some definitions of ANX78xx to dedicated headers 2019-11-08 10:27:32 +01:00
analogix-anx6345.c drm: Rename dp/ to display/ 2022-04-25 11:17:45 +02:00
analogix-i2c-dptx.c drm: Rename dp/ to display/ 2022-04-25 11:17:45 +02:00
analogix-i2c-dptx.h drm/bridge: Prepare Analogix anx6345 support 2019-11-08 10:27:53 +01:00
analogix-i2c-txcommon.h drm/bridge: Prepare Analogix anx6345 support 2019-11-08 10:27:53 +01:00
analogix_dp_core.c Revert "drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time" 2022-09-23 07:15:18 -07:00
analogix_dp_core.h drm: Rename dp/ to display/ 2022-04-25 11:17:45 +02:00
analogix_dp_reg.c drm/bridge: analogix_dp: Make PSR-exit block less 2021-11-04 11:54:09 +01:00
analogix_dp_reg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
anx7625.c drm/bridge: anx7625: Add wait_hpd_asserted() callback 2022-07-06 15:19:55 +02:00
anx7625.h drm/bridge: anx7625: Use uint8 for lane-swing arrays 2022-04-19 18:59:12 +02:00