Nícolas F. R. A. Prado 90144dd8b0 drm/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff()
As the comment right before the mtk_dsi_stop() call advises,
mtk_dsi_stop() should only be called after
mtk_drm_crtc_atomic_disable(). That's because that function calls
drm_crtc_wait_one_vblank(), which requires the vblank irq to be enabled.

Previously mtk_dsi_stop(), being in mtk_dsi_poweroff() and guarded by a
refcount, would only be called at the end of
mtk_drm_crtc_atomic_disable(), through the call to mtk_crtc_ddp_hw_fini().
Commit cde7e2e35c28 ("drm/mediatek: Separate poweron/poweroff from
enable/disable and define new funcs") moved the mtk_dsi_stop() call to
mtk_output_dsi_disable(), causing it to be called before
mtk_drm_crtc_atomic_disable(), and consequently generating vblank
timeout warnings during suspend.

Move the mtk_dsi_stop() call back to mtk_dsi_poweroff() so that we have
a working vblank irq during mtk_drm_crtc_atomic_disable() and stop
getting vblank timeout warnings.

Fixes: cde7e2e35c28 ("drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Link: http://lists.infradead.org/pipermail/linux-mediatek/2022-August/046713.html
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
2022-09-22 07:31:43 +08:00
..
2022-08-06 10:19:51 -07:00
2022-08-06 10:19:51 -07:00
2022-06-20 23:53:55 +03:00
2022-08-06 10:19:51 -07:00
2022-08-06 10:42:38 -07:00
2022-08-03 19:52:08 -07:00
2022-08-05 10:07:23 -07:00
2022-08-03 19:52:08 -07:00
2022-08-03 19:52:08 -07:00
2022-07-25 09:31:02 -04:00
2022-08-03 19:52:08 -07:00
2022-08-03 19:52:08 -07:00
2022-08-06 10:19:51 -07:00
2022-07-13 10:54:56 +10:00
2022-07-12 16:50:05 +10:00
2022-08-03 19:52:08 -07:00
2022-06-20 23:53:55 +03:00
2022-06-12 22:10:50 -01:00
2022-08-06 10:19:51 -07:00
2022-07-13 10:54:56 +10:00
2022-06-28 07:56:32 +02:00
2022-03-24 16:19:43 -07:00
2022-05-04 14:09:34 +02:00
2022-07-16 09:19:47 -04:00
2022-04-12 09:27:20 +03:00