From patchwork Fri Jun 1 19:49:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10444327 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 E633B604D4 for ; Fri, 1 Jun 2018 19:50:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D724F28CBE for ; Fri, 1 Jun 2018 19:50:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC19328CCA; Fri, 1 Jun 2018 19:50:27 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 52D1128CC7 for ; Fri, 1 Jun 2018 19:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BiuiiXDcX3gobQ35AmwLxEhPNeENdRVCf349hWrAziQ=; b=dk4DFa8Sdet7GARdAxmojP24BI sYrduLImcN6xOWRue+c0LIVOMh+tY9ti5uCLn7naSWvb/fKMNqNDohJiEahc9tN5eAmJwRx4Lwqp/ fIFQQ0K/DU5nCM/6PJIuewcMQQczIxHttZ5/fgOlRufbz4ZjhUwY/V6+fgGMdaHcNBDsvdPFU4Caa R4P7xREWj5SxejJI8u1e/cf6epGDnNeH3tFQ8gjGXY2yBN25GxJwaV2mytN4PQ4TYvI60CZwY/v2U IuzN5FlVXI52h2c/M5f8+jEaBjOQPl4qZquzh30GaoUqmc4JXGbxynHU6zMdkFVIrIBfmzfaGilgf f1uQ3aGA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOq47-0001Ls-QR; Fri, 01 Jun 2018 19:50:23 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOq42-0000jS-TH for linux-rockchip@lists.infradead.org; Fri, 01 Jun 2018 19:50:21 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id C42BC287E7E From: Ezequiel Garcia To: linux-media@vger.kernel.org Subject: [PATCH 2/2] rockchip/rga: Remove unrequired wait in .job_abort Date: Fri, 1 Jun 2018 16:49:52 -0300 Message-Id: <20180601194952.17440-3-ezequiel@collabora.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180601194952.17440-1-ezequiel@collabora.com> References: <20180601194952.17440-1-ezequiel@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180601_125019_118127_D86A608C X-CRM114-Status: GOOD ( 10.04 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jacob chen , Mauro Carvalho Chehab , Ezequiel Garcia , Heiko Stuebner , linux-rockchip@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.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. Signed-off-by: Ezequiel Garcia --- drivers/media/platform/rockchip/rga/rga.c | 13 +------------ drivers/media/platform/rockchip/rga/rga.h | 2 -- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index d508a8ba6f89..5a5a6139e18a 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -41,14 +41,7 @@ module_param(debug, int, 0644); static void job_abort(void *prv) { - struct rga_ctx *ctx = prv; - 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)); + /* Can't do anything rational here */ } static void device_run(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(dst, VB2_BUF_STATE_DONE); v4l2_m2m_job_finish(rga->m2m_dev, ctx->fh.m2m_ctx); - - wake_up(&rga->irq_queue); } return IRQ_HANDLED; @@ -838,8 +829,6 @@ static int rga_probe(struct platform_device *pdev) spin_lock_init(&rga->ctrl_lock); mutex_init(&rga->mutex); - init_waitqueue_head(&rga->irq_queue); - ret = rga_parse_dt(rga); if (ret) dev_err(&pdev->dev, "Unable to parse OF data\n"); diff --git a/drivers/media/platform/rockchip/rga/rga.h b/drivers/media/platform/rockchip/rga/rga.h index 5d43e7ea88af..72d8a159fa7b 100644 --- a/drivers/media/platform/rockchip/rga/rga.h +++ b/drivers/media/platform/rockchip/rga/rga.h @@ -86,8 +86,6 @@ struct rockchip_rga { /* ctrl parm lock */ spinlock_t ctrl_lock; - wait_queue_head_t irq_queue; - struct rga_ctx *curr; dma_addr_t cmdbuf_phy; void *cmdbuf_virt;