Commit a85fd20f authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

[media] mem2mem: make queue lock in v4l2_m2m_poll interruptible

This patch makes the queue lock taken in v4l2_m2m_poll interruptible.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 7e49027e
...@@ -568,8 +568,12 @@ unsigned int v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, ...@@ -568,8 +568,12 @@ unsigned int v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
if (m2m_ctx->m2m_dev->m2m_ops->lock) if (m2m_ctx->m2m_dev->m2m_ops->lock)
m2m_ctx->m2m_dev->m2m_ops->lock(m2m_ctx->priv); m2m_ctx->m2m_dev->m2m_ops->lock(m2m_ctx->priv);
else if (m2m_ctx->q_lock) else if (m2m_ctx->q_lock) {
mutex_lock(m2m_ctx->q_lock); if (mutex_lock_interruptible(m2m_ctx->q_lock)) {
rc |= POLLERR;
goto end;
}
}
spin_lock_irqsave(&src_q->done_lock, flags); spin_lock_irqsave(&src_q->done_lock, flags);
if (!list_empty(&src_q->done_list)) if (!list_empty(&src_q->done_list))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment