]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff()
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Thu, 4 Aug 2022 19:43:25 +0000 (15:43 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 Nov 2022 14:11:48 +0000 (15:11 +0100)
commitec92e082e78f83d4b577d5fae3d207e07114f3e6
tree7407f382714d57a5d1156f34580d2fcf7b3d1011
parent2e0ba7376fab73631e8572ca749fc547fb74cd86
drm/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff()

BugLink: https://bugs.launchpad.net/bugs/1995420
[ Upstream commit 90144dd8b0d137d9e78ef34b3c418e51a49299ad ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/mediatek/mtk_dsi.c