Skip to content

Commit 53fc08c

Browse files
committed
drm/komeda: Annotate dma-fence critical section in commit path
Like the helpers, nothing special. Well except not, because we the critical section extends until after hw_done(), since that's the last thing which could hold up a subsequent atomic commit. That means the wait_for_flip_done is included, but that's not a problem, we're allowed to call dma_fence_wait() from signalling critical sections. Even on our own fence (which this does), it's just a bit confusing. But in a way those last 2 function calls are already part of the fence signalling critical section for the next atomic commit. Reading this I'm wondering why komeda waits for flip_done() before calling hw_done(), which is a bit backwards (but hey hw can be special). Might be good to throw a comment in there that explains why, because the original commit that added this just doesn't. v2: Small rebase Reviewed-by: James Qian Wang <[email protected]> (v1) Cc: "James (Qian) Wang" <[email protected]> Cc: Liviu Dudau <[email protected]> Cc: Mihail Atanassov <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 9e5eb5e commit 53fc08c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/arm/display/komeda/komeda_kms.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ static const struct drm_driver komeda_kms_driver = {
7373
static void komeda_kms_commit_tail(struct drm_atomic_state *old_state)
7474
{
7575
struct drm_device *dev = old_state->dev;
76+
bool fence_cookie = dma_fence_begin_signalling();
7677

7778
drm_atomic_helper_commit_modeset_disables(dev, old_state);
7879

@@ -85,6 +86,8 @@ static void komeda_kms_commit_tail(struct drm_atomic_state *old_state)
8586

8687
drm_atomic_helper_wait_for_flip_done(dev, old_state);
8788

89+
dma_fence_end_signalling(fence_cookie);
90+
8891
drm_atomic_helper_cleanup_planes(dev, old_state);
8992
}
9093

0 commit comments

Comments
 (0)