Commit 1b97e527 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab

media: rockchip/rga: Remove unrequired wait in .job_abort

As per the documentation, job_abort is not required
to wait until the current job finishes. It is redundant
to do so, as the core will perform the wait operation.

Remove the wait infrastructure completely.
Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Reviewed-by: default avatarJacob Chen <jacob-chen@iotwrt.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 9aecc035
...@@ -41,14 +41,7 @@ module_param(debug, int, 0644); ...@@ -41,14 +41,7 @@ module_param(debug, int, 0644);
static void job_abort(void *prv) static void job_abort(void *prv)
{ {
struct rga_ctx *ctx = prv; /* Can't do anything rational here */
struct rockchip_rga *rga = ctx->rga;
if (!rga->curr) /* No job currently running */
return;
wait_event_timeout(rga->irq_queue,
!rga->curr, msecs_to_jiffies(RGA_TIMEOUT));
} }
static void device_run(void *prv) static void device_run(void *prv)
...@@ -104,8 +97,6 @@ static irqreturn_t rga_isr(int irq, void *prv) ...@@ -104,8 +97,6 @@ static irqreturn_t rga_isr(int irq, void *prv)
v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE); v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE);
v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE); v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);
v4l2_m2m_job_finish(rga->m2m_dev, ctx->fh.m2m_ctx); v4l2_m2m_job_finish(rga->m2m_dev, ctx->fh.m2m_ctx);
wake_up(&rga->irq_queue);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -838,8 +829,6 @@ static int rga_probe(struct platform_device *pdev) ...@@ -838,8 +829,6 @@ static int rga_probe(struct platform_device *pdev)
spin_lock_init(&rga->ctrl_lock); spin_lock_init(&rga->ctrl_lock);
mutex_init(&rga->mutex); mutex_init(&rga->mutex);
init_waitqueue_head(&rga->irq_queue);
ret = rga_parse_dt(rga); ret = rga_parse_dt(rga);
if (ret) if (ret)
dev_err(&pdev->dev, "Unable to parse OF data\n"); dev_err(&pdev->dev, "Unable to parse OF data\n");
......
...@@ -86,8 +86,6 @@ struct rockchip_rga { ...@@ -86,8 +86,6 @@ struct rockchip_rga {
/* ctrl parm lock */ /* ctrl parm lock */
spinlock_t ctrl_lock; spinlock_t ctrl_lock;
wait_queue_head_t irq_queue;
struct rga_ctx *curr; struct rga_ctx *curr;
dma_addr_t cmdbuf_phy; dma_addr_t cmdbuf_phy;
void *cmdbuf_virt; void *cmdbuf_virt;
......
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