drm_atomic_helper_commit_hw_done() is the last thing (no plane cleanup
apparrently), so it's the entire function. And a nice comment
explaining why thw wait_for_flip_done is ahead, unlike the usual
sequence.

Aside, I think since the atomic helpers do track plane disabling now
separately this might no longer be a real problem since:

commit 21a01abbe32a3cbeb903378a24e504bfd9fe0648
Author: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
Date:   Mon Sep 4 12:48:37 2017 +0200

    drm/atomic: Fix freeing connector/plane state too early by tracking 
commits, v3.

Plus the subsequent bugfixes of course, this was tricky to get right.

Signed-off-by: Daniel Vetter <daniel.vet...@intel.com>
Cc: Philipp Zabel <p.za...@pengutronix.de>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <s.ha...@pengutronix.de>
Cc: Pengutronix Kernel Team <ker...@pengutronix.de>
Cc: Fabio Estevam <feste...@gmail.com>
Cc: NXP Linux Team <linux-...@nxp.com>
Cc: linux-arm-ker...@lists.infradead.org
---
 drivers/gpu/drm/imx/imx-drm-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/imx/imx-drm-core.c 
b/drivers/gpu/drm/imx/imx-drm-core.c
index 36037b2e6564..8c209bd36780 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -80,6 +80,7 @@ static void imx_drm_atomic_commit_tail(struct 
drm_atomic_state *state)
        struct drm_plane_state *old_plane_state, *new_plane_state;
        bool plane_disabling = false;
        int i;
+       bool fence_cookie = dma_fence_begin_signalling();
 
        drm_atomic_helper_commit_modeset_disables(dev, state);
 
@@ -110,6 +111,7 @@ static void imx_drm_atomic_commit_tail(struct 
drm_atomic_state *state)
        }
 
        drm_atomic_helper_commit_hw_done(state);
+       dma_fence_end_signalling(fence_cookie);
 }
 
 static const struct drm_mode_config_helper_funcs imx_drm_mode_config_helpers = 
{
-- 
2.27.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to