[media] coda/imx-vdoa: always wait for job completion
authorLucas Stach <l.stach@pengutronix.de>
Wed, 5 Apr 2017 13:09:55 +0000 (10:09 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 20 Jun 2017 12:04:21 +0000 (09:04 -0300)
commit8b8470fdf4ce059460ffc6dd54a350df9ac87ad3
tree3b4320e11b10eed59274165cc20f59c1d2dbe67d
parentfb2be08f8cb332ef142314cc58a0f9e68406588c
[media] coda/imx-vdoa: always wait for job completion

As long as only one CODA context is running we get alternating device_run()
and wait_for_completion() calls, but when more then one CODA context is
active, other VDOA slots can be inserted between those calls for one context.

Make sure to wait on job completion before running a different context and
before destroying the currently active context.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/coda/imx-vdoa.c