From patchwork Mon Jun 18 04:38:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10469355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9CE9B6020C for ; Mon, 18 Jun 2018 04:40:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CB86289AD for ; Mon, 18 Jun 2018 04:40:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 811B0289AF; Mon, 18 Jun 2018 04:40:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29361289AD for ; Mon, 18 Jun 2018 04:40:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753740AbeFREkj (ORCPT ); Mon, 18 Jun 2018 00:40:39 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:51238 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752703AbeFREki (ORCPT ); Mon, 18 Jun 2018 00:40:38 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id D2D1E2639A3 From: Ezequiel Garcia To: linux-media@vger.kernel.org Cc: Hans Verkuil , kernel@collabora.com, Mikhail Ulyanov , Kyungmin Park , Kamil Debski , Andrzej Hajda , Ezequiel Garcia Subject: [PATCH v2 1/3] rcar_jpu: Remove unrequired wait in .job_abort Date: Mon, 18 Jun 2018 01:38:50 -0300 Message-Id: <20180618043852.13293-2-ezequiel@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180618043852.13293-1-ezequiel@collabora.com> References: <20180618043852.13293-1-ezequiel@collabora.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Cc: Mikhail Ulyanov Signed-off-by: Ezequiel Garcia Acked-by: Mikhail Ulyanov --- drivers/media/platform/rcar_jpu.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c index 469a326838aa..dec696e6b974 100644 --- a/drivers/media/platform/rcar_jpu.c +++ b/drivers/media/platform/rcar_jpu.c @@ -198,7 +198,6 @@ * @vfd_decoder: video device node for decoder mem2mem mode * @m2m_dev: v4l2 mem2mem device data * @curr: pointer to current context - * @irq_queue: interrupt handler waitqueue * @regs: JPEG IP registers mapping * @irq: JPEG IP irq * @clk: JPEG IP clock @@ -213,7 +212,6 @@ struct jpu { struct video_device vfd_decoder; struct v4l2_m2m_dev *m2m_dev; struct jpu_ctx *curr; - wait_queue_head_t irq_queue; void __iomem *regs; unsigned int irq; @@ -1494,11 +1492,6 @@ static void jpu_device_run(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 = { @@ -1584,9 +1577,6 @@ static irqreturn_t jpu_irq_handler(int irq, void *dev_id) 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; handled: @@ -1620,7 +1610,6 @@ static int jpu_probe(struct platform_device *pdev) if (!jpu) return -ENOMEM; - init_waitqueue_head(&jpu->irq_queue); mutex_init(&jpu->mutex); spin_lock_init(&jpu->lock); jpu->dev = &pdev->dev;