Skip to content

Commit

Permalink
drm: Clean up planes in atomic commit helper failure path
Browse files Browse the repository at this point in the history
If waiting for fences fails for blocking commits, planes must be cleaned
up before returning.

Cc: stable@vger.kernel.org
Fixes: f6ce410 ("drm/fence: allow fence waiting to be interrupted by userspace")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170102231427.7192-1-laurent.pinchart@ideasonboard.com
  • Loading branch information
Laurent Pinchart authored and Daniel Vetter committed Jan 4, 2017
1 parent 0c744ea commit aebe55c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/drm_atomic_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,8 +1259,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,

if (!nonblock) {
ret = drm_atomic_helper_wait_for_fences(dev, state, true);
if (ret)
if (ret) {
drm_atomic_helper_cleanup_planes(dev, state);
return ret;
}
}

/*
Expand Down

0 comments on commit aebe55c

Please sign in to comment.