summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-30 15:27:36 +0100
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-11 17:28:01 +0200
commite5bc0e1ddd1cd3328297f255e215b3ca55f4fbc8 (patch)
treec9c0c0d160ea735a88231c4077d0352938dab3c5 /drivers/media/platform
parentmedia: MAINTAINERS: Add meson video decoder (diff)
downloadlinux-e5bc0e1ddd1cd3328297f255e215b3ca55f4fbc8.tar.xz
linux-e5bc0e1ddd1cd3328297f255e215b3ca55f4fbc8.zip
media: vicodec: move v4l2_ctrl_request_complete after spin_unlock
v4l2_ctrl_request_complete can sleep, so can't be called while a spinlock is held. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/vicodec/vicodec-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c
index 72c56756e45b..358469f23191 100644
--- a/drivers/media/platform/vicodec/vicodec-core.c
+++ b/drivers/media/platform/vicodec/vicodec-core.c
@@ -442,14 +442,14 @@ static void device_run(void *priv)
ctx->comp_has_next_frame = false;
}
v4l2_m2m_buf_done(dst_buf, state);
- if (ctx->is_stateless && src_req)
- v4l2_ctrl_request_complete(src_req, &ctx->hdl);
ctx->comp_size = 0;
ctx->header_size = 0;
ctx->comp_magic_cnt = 0;
ctx->comp_has_frame = false;
spin_unlock(ctx->lock);
+ if (ctx->is_stateless && src_req)
+ v4l2_ctrl_request_complete(src_req, &ctx->hdl);
if (ctx->is_enc)
v4l2_m2m_job_finish(dev->stateful_enc.m2m_dev, ctx->fh.m2m_ctx);