diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2019-06-18 12:45:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-24 14:44:26 -0400 |
commit | 9ee50a9489f16048a82c94139f5436f4bb2620d9 (patch) | |
tree | d54aa68424c1ebf85667a7b9f269284e199a55eb /drivers/media/platform/coda/coda.h | |
parent | cf895efc4d9c2dfb3cd03cf298ea55637feba901 (diff) |
media: coda: lock capture queue wakeup against encoder stop command
Make sure that an encoder stop command running concurrently with an
encoder finish_run always either flags the last returned buffer or wakes
up the capture queue to signal the end of stream condition afterwards.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
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/coda/coda.h')
-rw-r--r-- | drivers/media/platform/coda/coda.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h index 6911c1c811ce..97845e58fb8b 100644 --- a/drivers/media/platform/coda/coda.h +++ b/drivers/media/platform/coda/coda.h @@ -258,6 +258,12 @@ struct coda_ctx { bool use_bit; bool use_vdoa; struct vdoa_ctx *vdoa; + /* + * wakeup mutex used to serialize encoder stop command and finish_run, + * ensures that finish_run always either flags the last returned buffer + * or wakes up the capture queue to signal EOS afterwards. + */ + struct mutex wakeup_mutex; }; extern int coda_debug; |