diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2017-11-30 08:31:46 -0500 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2017-11-30 09:47:40 -0500 |
commit | a152992062aa3803eeabfda84b5b844721ddf6ed (patch) | |
tree | bd3ca8c327ed5efefb5b1432b17cc3204b141b82 /drivers/gpu/drm/imx/imx-drm-core.c | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
drm/imx: always call wait_for_flip_done in commit_tail
drm_atomic_helper_wait_for_vblanks will go away in the future.
The new drm_atomic_helper_setup_commit in 4.15 expects that blocking commits
have completed flipping before the commit_tail returns. This must be ensured
by calling wait_for_vblanks or wait_for_flip_done, where flip_done might do
a less agressive wait, which is fine for imx-drm.
Fixes: 080de2e5be2d (drm/atomic: Check for busy planes/connectors before
setting the commit)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-drm-core.c')
-rw-r--r-- | drivers/gpu/drm/imx/imx-drm-core.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 93c7e3f9b4a8..17d2f3a1c562 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c | |||
@@ -133,9 +133,16 @@ static void imx_drm_atomic_commit_tail(struct drm_atomic_state *state) | |||
133 | plane_disabling = true; | 133 | plane_disabling = true; |
134 | } | 134 | } |
135 | 135 | ||
136 | if (plane_disabling) { | 136 | /* |
137 | drm_atomic_helper_wait_for_vblanks(dev, state); | 137 | * The flip done wait is only strictly required by imx-drm if a deferred |
138 | * plane disable is in-flight. As the core requires blocking commits | ||
139 | * to wait for the flip it is done here unconditionally. This keeps the | ||
140 | * workitem around a bit longer than required for the majority of | ||
141 | * non-blocking commits, but we accept that for the sake of simplicity. | ||
142 | */ | ||
143 | drm_atomic_helper_wait_for_flip_done(dev, state); | ||
138 | 144 | ||
145 | if (plane_disabling) { | ||
139 | for_each_old_plane_in_state(state, plane, old_plane_state, i) | 146 | for_each_old_plane_in_state(state, plane, old_plane_state, i) |
140 | ipu_plane_disable_deferred(plane); | 147 | ipu_plane_disable_deferred(plane); |
141 | 148 | ||