drm/msm/mdp5: Fix wait-for-commit for cmd panels
authorIskren Chernev <iskren.chernev@gmail.com>
Wed, 27 Jan 2021 15:24:40 +0000 (17:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:12 +0000 (11:38 +0100)
commit5c49fc7b5d9b3aabf5e5bfb4fe96bbd3cc11e63f
tree812a3735f341fe086ed76cfe11ef5b6180ef5c52
parent92a1514e0a5d426b6002e2302985193260985d52
drm/msm/mdp5: Fix wait-for-commit for cmd panels

[ Upstream commit 68e4f01fddb4ead80e8c7084db489307f22c9cbb ]

Before the offending commit in msm_atomic_commit_tail wait_flush was
called once per frame, after the commit was submitted. After it
wait_flush is also called at the beginning to ensure previous
potentially async commits are done.

For cmd panels the source of wait_flush is a ping-pong irq notifying
a completion. The completion needs to be notified with complete_all so
multiple waiting parties (new async committers) can proceed.

Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Suggested-by: Rob Clark <robdclark@gmail.com>
Fixes: 2d99ced787e3d ("drm/msm: async commit support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c