Skip to content

Commit 250aa22

Browse files
committed
drm/omapdrm: Annotate dma-fence critical section in commit path
Nothing special, just put the end right after hw_done(). Note that in one path there's a wait for the flip/update to complete. But as far as I understand from comments and code that's only relevant for modesets, and skipped if there wasn't a modeset done on a given crtc. For a bit more clarity pull the hw_done() call out of the if/else, that way it's a bit clearer flow. But happy to shuffle this around as is seen fit. Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210121152959.1725404-9-daniel.vetter@ffwll.ch
1 parent a1891b9 commit 250aa22

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/gpu/drm/omapdrm/omap_drv.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static void omap_atomic_commit_tail(struct drm_atomic_state *old_state)
6868
{
6969
struct drm_device *dev = old_state->dev;
7070
struct omap_drm_private *priv = dev->dev_private;
71+
bool fence_cookie = dma_fence_begin_signalling();
7172

7273
dispc_runtime_get(priv->dispc);
7374

@@ -90,8 +91,6 @@ static void omap_atomic_commit_tail(struct drm_atomic_state *old_state)
9091
omap_atomic_wait_for_completion(dev, old_state);
9192

9293
drm_atomic_helper_commit_planes(dev, old_state, 0);
93-
94-
drm_atomic_helper_commit_hw_done(old_state);
9594
} else {
9695
/*
9796
* OMAP3 DSS seems to have issues with the work-around above,
@@ -101,10 +100,12 @@ static void omap_atomic_commit_tail(struct drm_atomic_state *old_state)
101100
drm_atomic_helper_commit_planes(dev, old_state, 0);
102101

103102
drm_atomic_helper_commit_modeset_enables(dev, old_state);
104-
105-
drm_atomic_helper_commit_hw_done(old_state);
106103
}
107104

105+
drm_atomic_helper_commit_hw_done(old_state);
106+
107+
dma_fence_end_signalling(fence_cookie);
108+
108109
/*
109110
* Wait for completion of the page flips to ensure that old buffers
110111
* can't be touched by the hardware anymore before cleaning up planes.

0 commit comments

Comments
 (0)