drm/msm/dsi: move DSI host powerup to modeset time
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 7 Dec 2021 22:29:00 +0000 (01:29 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 18 Feb 2022 15:33:00 +0000 (18:33 +0300)
commit7d8e9a90509f1bd1d193a0c93cb8d1dbad9049fb
tree82014e2f4cbb1692d22f89a0e3b51eddd76daf96
parent24b176d8827d167ac3b379317f60c0985f6e95aa
drm/msm/dsi: move DSI host powerup to modeset time

The DSI subsystem does not fully fall into the pre-enable/enable system
of callbacks, since typically DSI device bridge drivers expect to be
able to communicate with DSI devices at the pre-enable() callback. The
reason is that for some DSI hosts enabling the video stream would
prevent other drivers from sending DSI commands. For example see the
panel-bridge driver, which does drm_panel_prepare() from the
pre_enable() callback (which would be called before our pre_enable()
callback, resulting in panel preparation failures as the link is not yet
ready).

Therewere several attempts to solve this issue, but currently the best
approach is to power up the DSI link from the mode_set() callback,
allowing next bridge/panel to use DSI transfers in the pre_enable()
time. Follow this approach.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Link: https://lore.kernel.org/r/20211207222901.988484-2-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/dsi/dsi_manager.c