LF-4321 drm/bridge: nwl-dsi: Avoid double modeset
When running the below system suspend/resume test case on i.MX8ulp EVK platform with RM68200 MIPI DSI panel enabled, panel register access would fail when the DRM connector's DPMS property is changed from off to on after system resumes, if the DPMS property is off before system suspends. The root cause is that the bridge_funcs->mode_set() is called twice during the procedure without bridge disablement, one at system resume stage and one for DPMS on operation. That means the MIPI DPHY is not powered down during the procedure and initialized/powered on twice. As the PHY core driver takes reference count for the power on operation, the second power on operation doesn't take effect, hence the DPHY stays at the initialization status. This patch introduces a flag to indicate if the modeset is done or not to avoid the doulbe modeset so that the DPHY will be active when the panel registers are accessed. while true; do modetest -M imx-dcnano -w 34:DPMS:3; done & while true; do /unit_tests/SRTC/rtcwakeup.out -s 2 -m mem; done Fixes: 120ffd6b ("MLK-25574-4 drm/bridge: nwl-dsi: Get MIPI DSI controller and PHY ready in ->mode_set()") Cc: Sandor Yu <Sandor.yu@nxp.com> Reported-by:Zhang Bo <bo.zhang@nxp.com> Reviewed-by:
Sandor Yu <Sandor.yu@nxp.com> Signed-off-by:
Liu Ying <victor.liu@nxp.com> Acked-by:
Jason Liu <jason.hui.liu@nxp.com>
Loading
Please register or sign in to comment