aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/sunxi/cedrus/cedrus_hw.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2018-10-18 14:02:24 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-11-23 06:38:37 -0500
commit949f29f6071416f847ed8d2b2ad3a5f702583468 (patch)
tree8d3af8fe5ddb45818781c108e95c723de22345d5 /drivers/staging/media/sunxi/cedrus/cedrus_hw.c
parentmedia: v4l2-mem2mem: Avoid calling .device_run in v4l2_m2m_job_finish (diff)
downloadlinux-dev-949f29f6071416f847ed8d2b2ad3a5f702583468.tar.xz
linux-dev-949f29f6071416f847ed8d2b2ad3a5f702583468.zip
media: cedrus: Get rid of interrupt bottom-half
Now that the mem2mem framework guarantees that .device_run won't be called from interrupt context, it is safe to call v4l2_m2m_job_finish directly in the top-half. So this means the bottom-half is no longer needed and we can get rid of it. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/staging/media/sunxi/cedrus/cedrus_hw.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c
index 32adbcbe6175..493e65b17b30 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c
@@ -98,23 +98,6 @@ void cedrus_dst_format_set(struct cedrus_dev *dev,
}
}
-static irqreturn_t cedrus_bh(int irq, void *data)
-{
- struct cedrus_dev *dev = data;
- struct cedrus_ctx *ctx;
-
- ctx = v4l2_m2m_get_curr_priv(dev->m2m_dev);
- if (!ctx) {
- v4l2_err(&dev->v4l2_dev,
- "Instance released before the end of transaction\n");
- return IRQ_HANDLED;
- }
-
- v4l2_m2m_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx);
-
- return IRQ_HANDLED;
-}
-
static irqreturn_t cedrus_irq(int irq, void *data)
{
struct cedrus_dev *dev = data;
@@ -165,7 +148,9 @@ static irqreturn_t cedrus_irq(int irq, void *data)
spin_unlock_irqrestore(&dev->irq_lock, flags);
- return IRQ_WAKE_THREAD;
+ v4l2_m2m_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx);
+
+ return IRQ_HANDLED;
}
int cedrus_hw_probe(struct cedrus_dev *dev)
@@ -187,9 +172,8 @@ int cedrus_hw_probe(struct cedrus_dev *dev)
return irq_dec;
}
- ret = devm_request_threaded_irq(dev->dev, irq_dec, cedrus_irq,
- cedrus_bh, 0, dev_name(dev->dev),
- dev);
+ ret = devm_request_irq(dev->dev, irq_dec, cedrus_irq,
+ 0, dev_name(dev->dev), dev);
if (ret) {
v4l2_err(&dev->v4l2_dev, "Failed to request IRQ\n");