Skip to content
Snippets Groups Projects
Commit 755ee35f authored by Liu Ying's avatar Liu Ying Committed by Jason Liu
Browse files

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: default avatarZhang Bo <bo.zhang@nxp.com>
Reviewed-by: default avatarSandor Yu <Sandor.yu@nxp.com>
Signed-off-by: default avatarLiu Ying <victor.liu@nxp.com>
Acked-by: default avatarJason Liu <jason.hui.liu@nxp.com>
parent 30ff7217
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment