]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dsi: Implement reset correctly
authorJeffrey Hugo <jeffrey.l.hugo@gmail.com>
Fri, 11 Oct 2019 13:39:39 +0000 (06:39 -0700)
committerSean Paul <seanpaul@chromium.org>
Fri, 11 Oct 2019 18:04:31 +0000 (14:04 -0400)
commitd35b16f89096fcc2521b994b852ed043de8eaa4c
treefb48c5986bb145b627bae6cc97a293ea49471589
parent57058acb6057c3821f29df4b07c105e95a4b3c48
drm/msm/dsi: Implement reset correctly

On msm8998, vblank timeouts are observed because the DSI controller is not
reset properly, which ends up stalling the MDP.  This is because the reset
logic is not correct per the hardware documentation.

The documentation states that after asserting reset, software should wait
some time (no indication of how long), or poll the status register until it
returns 0 before deasserting reset.

wmb() is insufficient for this purpose since it just ensures ordering, not
timing between writes.  Since asserting and deasserting reset occurs on the
same register, ordering is already guaranteed by the architecture, making
the wmb extraneous.

Since we would define a timeout for polling the status register to avoid a
possible infinite loop, lets just use a static delay of 20 ms, since 16.666
ms is the time available to process one frame at 60 fps.

Fixes: 2b9189e0556a ("drm/msm: Initial add DSI connector support")
Cc: Hai Li <hali@codeaurora.org>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Reviewed-by: Sean Paul <sean@poorly.run>
[seanpaul renamed RESET_DELAY to DSI_RESET_TOGGLE_DELAY_MS]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191011133939.16551-1-jeffrey.l.hugo@gmail.com
drivers/gpu/drm/msm/dsi/dsi_host.c