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

Commit 53ad0694 authored by Eric Anholt's avatar Eric Anholt
Browse files

drm/vc4: Wait for fences interruptibly in blocking mode.



We should allow SIGIO and things to interrupt us before we get to the
no-error stage of the commit process.  This code is effectively copied
from drm_atomic_helper_commit().

Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-2-eric@anholt.net


Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent 334dbd69
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -142,6 +142,16 @@ static int vc4_atomic_commit(struct drm_device *dev,
		return ret;
	}

	if (!nonblock) {
		ret = drm_atomic_helper_wait_for_fences(dev, state, true);
		if (ret) {
			drm_atomic_helper_cleanup_planes(dev, state);
			kfree(c);
			up(&vc4->async_modeset);
			return ret;
		}
	}

	for_each_plane_in_state(state, plane, new_state, i) {
		if ((plane->state->fb != new_state->fb) && new_state->fb) {
			struct drm_gem_cma_object *cma_bo =