Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aebe55c2 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Daniel Vetter
Browse files

drm: Clean up planes in atomic commit helper failure path



If waiting for fences fails for blocking commits, planes must be cleaned
up before returning.

Cc: stable@vger.kernel.org
Fixes: f6ce410a ("drm/fence: allow fence waiting to be interrupted by userspace")
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170102231427.7192-1-laurent.pinchart@ideasonboard.com
parent 0c744ea4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1259,9 +1259,11 @@ 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;
		}
	}

	/*
	 * This is the point of no return - everything below never fails except