diff options
author | Eric Anholt <eric@anholt.net> | 2017-06-21 11:50:00 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2017-06-22 11:14:19 -0700 |
commit | 53ad06949d3b18ffeb530ff876b1ae35e7640f39 (patch) | |
tree | 30021fd27c2b9042db0bef8fc0d1f5c0bbb14b84 | |
parent | 334dbd69c604cb33d906a30195010d090e6eb80c (diff) | |
download | op-kernel-dev-53ad06949d3b18ffeb530ff876b1ae35e7640f39.zip op-kernel-dev-53ad06949d3b18ffeb530ff876b1ae35e7640f39.tar.gz |
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: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-2-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_kms.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index c2c9f82..86fcdb0 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -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 = |