Browse Source

media: rcar_jpu: 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: Ezequiel Garcia <ezequiel@collabora.com>
Acked-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Ezequiel Garcia 7 years ago
parent
commit
7a0167fb68
1 changed files with 0 additions and 11 deletions
  1. 0 11
      drivers/media/platform/rcar_jpu.c

+ 0 - 11
drivers/media/platform/rcar_jpu.c

@@ -198,7 +198,6 @@
  * @vfd_decoder: video device node for decoder mem2mem mode
  * @vfd_decoder: video device node for decoder mem2mem mode
  * @m2m_dev: v4l2 mem2mem device data
  * @m2m_dev: v4l2 mem2mem device data
  * @curr: pointer to current context
  * @curr: pointer to current context
- * @irq_queue:	interrupt handler waitqueue
  * @regs: JPEG IP registers mapping
  * @regs: JPEG IP registers mapping
  * @irq: JPEG IP irq
  * @irq: JPEG IP irq
  * @clk: JPEG IP clock
  * @clk: JPEG IP clock
@@ -213,7 +212,6 @@ struct jpu {
 	struct video_device	vfd_decoder;
 	struct video_device	vfd_decoder;
 	struct v4l2_m2m_dev	*m2m_dev;
 	struct v4l2_m2m_dev	*m2m_dev;
 	struct jpu_ctx		*curr;
 	struct jpu_ctx		*curr;
-	wait_queue_head_t	irq_queue;
 
 
 	void __iomem		*regs;
 	void __iomem		*regs;
 	unsigned int		irq;
 	unsigned int		irq;
@@ -1496,11 +1494,6 @@ static void jpu_device_run(void *priv)
 
 
 static void jpu_job_abort(void *priv)
 static void jpu_job_abort(void *priv)
 {
 {
-	struct jpu_ctx *ctx = priv;
-
-	if (!wait_event_timeout(ctx->jpu->irq_queue, !ctx->jpu->curr,
-				msecs_to_jiffies(JPU_JOB_TIMEOUT)))
-		jpu_cleanup(ctx, true);
 }
 }
 
 
 static const struct v4l2_m2m_ops jpu_m2m_ops = {
 static const struct v4l2_m2m_ops jpu_m2m_ops = {
@@ -1586,9 +1579,6 @@ static irqreturn_t jpu_irq_handler(int irq, void *dev_id)
 
 
 	v4l2_m2m_job_finish(jpu->m2m_dev, curr_ctx->fh.m2m_ctx);
 	v4l2_m2m_job_finish(jpu->m2m_dev, curr_ctx->fh.m2m_ctx);
 
 
-	/* ...wakeup abort routine if needed */
-	wake_up(&jpu->irq_queue);
-
 	return IRQ_HANDLED;
 	return IRQ_HANDLED;
 
 
 handled:
 handled:
@@ -1622,7 +1612,6 @@ static int jpu_probe(struct platform_device *pdev)
 	if (!jpu)
 	if (!jpu)
 		return -ENOMEM;
 		return -ENOMEM;
 
 
-	init_waitqueue_head(&jpu->irq_queue);
 	mutex_init(&jpu->mutex);
 	mutex_init(&jpu->mutex);
 	spin_lock_init(&jpu->lock);
 	spin_lock_init(&jpu->lock);
 	jpu->dev = &pdev->dev;
 	jpu->dev = &pdev->dev;