summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2019-04-12 11:51:33 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-05-29 06:20:55 -0400
commit7edd18b64a16722a2059c2334657de01be810806 (patch)
tree941d9c791c7e5ff72ef7fbc04effcd1b993f2a42
parent8a8621ba0135f47c7d65b413d1cb9141b9422c96 (diff)
media: coda: add lockdep asserts
coda_command_sync, coda_hw_reset, and __coda_start_decoding all expect to be called under the coda_mutex device lock. 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>
-rw-r--r--drivers/media/platform/coda/coda-bit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index a5b2891392b8..fd8c66a62099 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -102,6 +102,8 @@ static int coda_command_sync(struct coda_ctx *ctx, int cmd)
struct coda_dev *dev = ctx->dev;
int ret;
+ lockdep_assert_held(&dev->coda_mutex);
+
coda_command_async(ctx, cmd);
ret = coda_wait_timeout(dev);
trace_coda_bit_done(ctx);
@@ -116,6 +118,8 @@ int coda_hw_reset(struct coda_ctx *ctx)
unsigned int idx;
int ret;
+ lockdep_assert_held(&dev->coda_mutex);
+
if (!dev->rstc)
return -ENOENT;
@@ -1676,6 +1680,8 @@ static int __coda_start_decoding(struct coda_ctx *ctx)
u32 val;
int ret;
+ lockdep_assert_held(&dev->coda_mutex);
+
coda_dbg(1, ctx, "Video Data Order Adapter: %s\n",
ctx->use_vdoa ? "Enabled" : "Disabled");