linux/drivers/gpu/drm/mediatek
Hsin-Yi Wang 3b60f98ef4 drm/mediatek: call mtk_dsi_stop() after mtk_drm_crtc_atomic_disable()
[ Upstream commit 2458d9d6d9 ]

mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), which
needs ovl irq for drm_crtc_wait_one_vblank(), since after mtk_dsi_stop() is
called, ovl irq will be disabled. If drm_crtc_wait_one_vblank() is called
after last irq, it will timeout with this message: "vblank wait timed out
on crtc 0". This happens sometimes when turning off the screen.

In drm_atomic_helper.c#disable_outputs(),
the calling sequence when turning off the screen is:

1. mtk_dsi_encoder_disable()
     --> mtk_output_dsi_disable()
       --> mtk_dsi_stop();  /* sometimes make vblank timeout in
                               atomic_disable */
       --> mtk_dsi_poweroff();
2. mtk_drm_crtc_atomic_disable()
     --> drm_crtc_wait_one_vblank();
     ...
       --> mtk_dsi_ddp_stop()
         --> mtk_dsi_poweroff();

mtk_dsi_poweroff() has reference count design, change to make
mtk_dsi_stop() called in mtk_dsi_poweroff() when refcount is 0.

Fixes: 0707632b5b ("drm/mediatek: update DSI sub driver flow for sending commands to panel")
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-10 09:53:34 +02:00
..
Kconfig drm/mediatek: Using the function drm_display_mode_to_videomode 2018-05-02 14:20:47 +08:00
Makefile
mtk_cec.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
mtk_cec.h
mtk_disp_color.c
mtk_disp_ovl.c drm/mediatek: add function to return OVL layer number 2018-08-27 11:24:36 +08:00
mtk_disp_rdma.c drm/mediatek: add function to return RDMA layer number 2018-08-27 11:24:37 +08:00
mtk_dpi_regs.h
mtk_dpi.c drm/mediatek: Using the function drm_display_mode_to_videomode 2018-05-02 14:20:47 +08:00
mtk_drm_crtc.c treewide: Replace more open-coded allocation size multiplications 2018-10-05 18:06:30 -07:00
mtk_drm_crtc.h drm/mediatek: update some variable name from ovl to comp 2018-08-27 11:24:37 +08:00
mtk_drm_ddp_comp.c drm/mediatek: add the DSI1 for component init condition 2018-06-24 12:03:57 +08:00
mtk_drm_ddp_comp.h drm/mediatek: add function to get layer number for component 2018-08-27 11:24:36 +08:00
mtk_drm_ddp.c drm/mediatek: fix connection from RDMA2 to DSI1 2018-08-27 11:24:37 +08:00
mtk_drm_ddp.h
mtk_drm_drv.c drm/mediatek: clear num_pipes when unbind driver 2019-07-10 09:53:34 +02:00
mtk_drm_drv.h drm/mediatek: add third ddp path 2018-06-24 12:09:01 +08:00
mtk_drm_fb.c drm/mtk: mtk_drm_fb -> drm_framebuffer 2018-06-28 00:27:36 +08:00
mtk_drm_fb.h drm/mtk: Move GEM BO to drm_framebuffer 2018-06-28 00:27:36 +08:00
mtk_drm_gem.c drm/mediatek: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) 2018-04-25 14:01:32 +08:00
mtk_drm_gem.h
mtk_drm_plane.c drm/mtk: Move GEM BO to drm_framebuffer 2018-06-28 00:27:36 +08:00
mtk_drm_plane.h
mtk_dsi.c drm/mediatek: call mtk_dsi_stop() after mtk_drm_crtc_atomic_disable() 2019-07-10 09:53:34 +02:00
mtk_hdmi_ddc.c
mtk_hdmi_regs.h
mtk_hdmi.c drm/mediatek: fix possible object reference leak 2019-05-10 17:54:09 +02:00
mtk_hdmi.h
mtk_mipi_tx.c
mtk_mt8173_hdmi_phy.c