Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/imx: Annotate dma-fence critical section in commit path

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 the 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.lankhorst@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.vetter@intel.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Daniel Vetter and committed by
Philipp Zabel
f4b34faa 06841148

+2
+2
drivers/gpu/drm/imx/imx-drm-core.c
··· 81 81 struct drm_plane_state *old_plane_state, *new_plane_state; 82 82 bool plane_disabling = false; 83 83 int i; 84 + bool fence_cookie = dma_fence_begin_signalling(); 84 85 85 86 drm_atomic_helper_commit_modeset_disables(dev, state); 86 87 ··· 112 111 } 113 112 114 113 drm_atomic_helper_commit_hw_done(state); 114 + dma_fence_end_signalling(fence_cookie); 115 115 } 116 116 117 117 static const struct drm_mode_config_helper_funcs imx_drm_mode_config_helpers = {