From patchwork Thu Dec 15 15:11:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 9476401 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 32829607EE for ; Thu, 15 Dec 2016 15:14:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 309CD287B5 for ; Thu, 15 Dec 2016 15:14:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2313D287BC; Thu, 15 Dec 2016 15:14:10 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9203F287B5 for ; Thu, 15 Dec 2016 15:14:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cHXhl-0000XZ-5X; Thu, 15 Dec 2016 15:12:21 +0000 Received: from mail-by2nam01on0085.outbound.protection.outlook.com ([104.47.34.85] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cHXhM-0000KJ-AN for linux-arm-kernel@lists.infradead.org; Thu, 15 Dec 2016 15:11:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=erV3WiLzfaZZBpWZo7TQ/CI9LIVWUnv5/LniUfocPGE=; b=Y5VPX1pD8o5H72sALdSSrvHfFqMD1h0uc0kaincqoAuY3MhN+zbLuJIUU7u+e8495UFOc/TA4G9JYcOUwwRee9p2S71eCGWWh3iBYLPxn9b1TFiE98dcpaYYEAeA6ZDZz4pujLOYW4qLbv1HbqdQp4hGvJUqKwdfM8ZA0s33EOI= Received: from BLUPR0201CA0009.namprd02.prod.outlook.com (10.163.116.19) by DM5PR02MB2265.namprd02.prod.outlook.com (10.168.174.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Thu, 15 Dec 2016 15:11:32 +0000 Received: from SN1NAM02FT004.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::205) by BLUPR0201CA0009.outlook.office365.com (2a01:111:e400:52e7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8 via Frontend Transport; Thu, 15 Dec 2016 15:11:32 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT004.mail.protection.outlook.com (10.152.72.175) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.771.7 via Frontend Transport; Thu, 15 Dec 2016 15:11:32 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:1946; Count:18 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1cHXgx-00063t-I5; Thu, 15 Dec 2016 07:11:31 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1cHXgx-0002gq-El; Thu, 15 Dec 2016 07:11:31 -0800 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id uBFFBOGa006071; Thu, 15 Dec 2016 07:11:25 -0800 Received: from [172.23.64.208] (helo=xhdrdevl6.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1cHXgq-0002ch-Mh; Thu, 15 Dec 2016 07:11:24 -0800 Received: by xhdrdevl6.xilinx.com (Postfix, from userid 13614) id C8483F20018; Thu, 15 Dec 2016 20:41:23 +0530 (IST) From: Kedareswara rao Appana To: , , , , , , , , , , Subject: [PATCH 1/3] dmaengine: xilinx_dma: Check for channel idle state before submitting dma descriptor Date: Thu, 15 Dec 2016 20:41:20 +0530 Message-ID: <1481814682-31780-2-git-send-email-appanad@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1481814682-31780-1-git-send-email-appanad@xilinx.com> References: <1481814682-31780-1-git-send-email-appanad@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22762.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-IncomingHeaderCount: 18 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39850400002)(39860400002)(39410400002)(39450400003)(39840400002)(2980300002)(438002)(189002)(199003)(36756003)(36386004)(103686003)(47776003)(4326007)(48376002)(2906002)(626004)(5660300001)(90966002)(42186005)(63266004)(5003940100001)(50986999)(92566002)(50466002)(106466001)(8936002)(76176999)(81156014)(46386002)(8676002)(81166006)(2950100002)(38730400001)(356003)(2201001)(305945005)(5001770100001)(189998001)(45336002)(52956003)(33646002)(50226002)(921003)(107986001)(2101003)(83996005)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR02MB2265; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT004; 1:t4x2hV9sl3VhsFvWTEuLL4IYfGZmC4vRbNYzskt8DbUNIEeqNopI411RcY9Dk7yiQXzNTOb0NTSwSUROKCntqgwUcg2QFoMKGyBh+CUJ/BMdaiEOhPz35zDVMslsKA6tkFFTlduwRr+1P+o6EwbAMloGCUdbK3KZyFGAvH6aPBJ1AMEFUOyybMQ618pU94QLz+B22KVrKeebdnj+o9FnK3AM/z/l1JDdwiOpxI6qadba1FvbcWPBEHIS62PwDW77RPadBJDyTLaVzSiaS4lsdGk40kpM+fHE4fmwT68b/ceWxja7hP4vY/xsFJ5mA8GjrbqcKqR7wdZyjzCWh4/CJL0xnI0HN5nfG4UPPXNRF63Sidy9sepaQ4rUq3Sn+zvBbDrkLhETz54qyLsPoiQs+5ZjJ0PWN9m1LorlA1fgrwPJuUKmJtfD7tpA3pXHmzCWALVK5BC1fSlSMZw4pCi7Peqb5GXCjg9WqIVuEop3VLrtxilTkWBdTU07aSQ3Qgph6sCttSVh7lfGkokZ81XfeFwa2i70hFiZ+0/6H2uyJdJAZicUxJ/LK4NSjw/LZGJM6Q/zP56SMpXFI/KP+YTXosuiBpjD735z0KjU0kFtLMDQQxc96g02roUu1HC4sZ1H7fAfNRXO0ClN1mKBGh3wBw== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 09c1183f-8cfe-4591-1070-08d424fca75b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:DM5PR02MB2265; X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2265; 3:QEppOxZemKnd0ZlX8oDYOa+g8Pn8DX/hqkRm15RfDNK77Q3AuDUUQk8jGQ3ZJkd69LRtWSU1CSNafPVmWFCrMczHhCpS613yOhWH352t7x3PRCg8PH079+fRsmCm7F1GxUnJag+wNbfHFkoDM7IRb5r7wRa6GWf2NeM/U7Wwj/STFF5MYrFsw1zgCqctd64O9ExHBAe+IR6fJYGXhHi48DipPYyjlM8H6xSxzVdPhNtevJqDUvv66NUMxOfULiEey+eSo79dbOKX1RzTnIt9rayUIw4WOAuy4C3FRREiLOyA1K0mVvX5L0/b5D003sufTJ8SIhtYBxEogRv6coCjhw9sxdB2uG25RvkFvfhPsFtSMBgVgwLLKirctsBq2PTy+2ZhvPygPIW00SZOGDtfTA==; 25:8jGmUOg7moEZUR1G88RwGlV2yi2yOg1lQoUrnnrxsoaV6hfxzuzTyO//s2ie4NPw578vFLsWvMhy4acsC1mY4xGOkeLhY1fZTvRS89WQmtdK0/BV47vrexcVyIP4/+A9PHiE40Xn+5uvkVrCpzSqeaoiekkOyHAsiT1mtTOd+1NujtjBs4aToxxMzvKDT3pG0zu7lVSgZGopbPxeZjVzOE/GxwACfkWMe4c1OVAWwEb1TIzkDD6KT8S4eOA4lHCB8l7oORoYWAd6X+WVOl4UHy4cIbWMvqgALXZTPSbmvmUXpgOQlxLX7c0VYBgkB1wU6UuPRVkAOQKYxw82t842zBPYYsB6V7IK/PkY+vBaNOArGws3A/2MqbG8rU+SBmraGYXEeFNXP/6VmZWMS3PTeqEQcK/WfM6KZ4q4puB4w/myOokjSjmeBz823CUihwX6Cz/j8BBKsiJl7mlbmeDRjQ== X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2265; 31:vc0p0DiUSXeuzF2qyIXdcAUa45hdNUtoJODB+Gi3FxjsfkHHdXlVaq2/hN3M+0nFrNfTWnME/7pdzxwFCm1Fosz+anTD6KCvwtwXVRl89V9Q84ASRYa+DieLBNFZapd+LqvScPqFMYJ6IMtNa0A8Tfyz1i0E9q/8D1GlWH/uvcrP+rPDdeCZQ0ep+yg7DqfqhoMCuROcZQ9F2N9LsFs7dS8cxYPy/JctMP08poPrlxOkTr2zXcVcLAlDNZCHY7DnEHtnHFgE12jBPS5xc6rJ7Q==; 20:LX713RBomSPCLrOglJQQ7S/aIC1G788RHhKIUlkpQcz04VraWddDDB9sRxkTF5oJwwH9zSzJtJ6vZXTZ5cCHaLA5HzieGWmselrzw9CxxyA0cr13KKJyQH3S+lCT2xXStIQfo9Ag9vLVbsxzlRgTI+Z4MeH8irv1Oi2g/842V+W14SSwZcLD2KxQXVtuNnVRW64J++BWTc41M1Tf6rbUsmP+lgZwedQ08N7WfmAO29ekXSl6GibNW52pa022zuEfIEluywVBr8uy/PRJA1MebYLPiacayVGsgSxLd/zHmnmPILXgR+s/8kZKPW67/fhw1KrWucB5GRqnfnZLiLJrGSQUP8ImkbyyDKrovsSfDlB749NrTTyJEwGBngcpzoPchSwzNzNus8VUd2zacVtpPVqeyCyp2IyP2TYh5T3Xa1dxiZrk88oaol86qkidbLQmv1gE0l60zCa1ewD7F17O4QeguqnmxJDBPnB4arp3NRuOZgm3IwXHgCWUg72x4uGi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(13015025)(13017025)(13023025)(13024025)(13018025)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:DM5PR02MB2265; BCL:0; PCL:0; RULEID:; SRVR:DM5PR02MB2265; X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2265; 4:sCxO70Y41m/xQQyQ1qOtLJZxPMGbpqZzR6dMVe3niGHT4Njp0ecHch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CYedlj8ql2oSWOtEV4CrtCkdkUjmxjt9KMvw2bNh?= =?us-ascii?Q?FTwb/qzudHdRcX2zHpMZBXSAiKijO38gEF/KIf3Z64qhHz2fSTEqqRR3g=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2265; 6:btWjgRFdiDyrJljYnU60rAYXS98CYTzq9sjL3zAoyx5JWp+pHEOWCufs1Ckf7U3ml/PjKO3gDeC4u1ggGSJpzFcAQrV/FQnlY4HtJhkJ8jXnnHRbkPBAcideVxqL8GSa2gJn058S9R8Vx+SOVq7ZYM9EFAVIiKoskmwuSpRCVYB1sRYZsGokKTokHewFao8leUTFfI2Tz143noSAXOPsM5pGmwdqpwURLZgBJr/hh6k9wtlBmRNm56HBVXhsd69UnDKBZRe0wegqHqsSuNYARgimiflQ0bLAmN8Y0YMF/WjuOq4VhA0ElKSb2+wMaPGhio9dJAhQCNKQKI0rTGRnzmiTOAdDEKEJGU1rDLwOp1l5ChiBqS7sL6OUUNfQR9/5E1AP8EVhhzd8aGz4+3e9bA7EFwhJlyrk0BdF+j8D0EC7n4Cj1bqrqJoqOT/gsqVBiGTNtsK+GOmwjiIklU7gQQ==; 5:SrkJJrxVoIM9s68iy8heAdtuhDAl8X0CR4UgAxZrzXrWjHAC+AOHRbE4kquf1znK+mu2fVfOvWfwzQiY2V/O+I3tWslelzmHGOtxhbRbD05I3+XugVNkogd9S9KVIRn0sc05tAjuop1NOQl0y6IAQQ==; 24:Ye7suTxqbSf+t0IQRp1SVnej1fug0crjzyLA9HPdc/Zo/PXDqxgX9uRUa8KsBpxXFlyvUBcf9BnL2Ne3qD7v0rPHaIC9jGH4LWj7VmF1fX4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2265; 7:JNns2AdVM2oXyZf26pFvor014/FJvhFZIDhyDHVYxQDDxqqJArR3iByn6/LJ6Y9v3UGCCRRnlcSPmGhEeZuFMA505NhY+o2Cq2LbahYTUWzMPc6U1DBIEz5ZD1EaTZQoDTz5E9p8kHLQwIZqGDnJJCaJdXj1pphcPu+H+o+C7crdcxcw0aP9vpbayYTeIsCPyrYF7e3nTe1q498fyxeYuLBpZyDx9Utc5scODFavnccbLDy/H3yve3GGfIxg3T9Np5/12KKKyadv2P6YkWOmxkYaPrmWz3RRzs3O5erYffVZsbJsISeTh3klKE2QQDF9XrMZD8IU9hBl2gFORyb7ZjgSZW+fWpopmYeRTZODs/tb1HXy1s9YMrunQvzZDcLsarCBD3oxakXjuimH35nyd6u9u6G0kXKWmxh5JRPY6TWVH9EdKKoHuEiDeioqkyZepOb/vyOkD7zeXUxYSUh46g== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2016 15:11:32.0454 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB2265 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161215_071156_617302_EF2ECE71 X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add channel idle state to ensure that dma descriptor is not submitted when VDMA engine is in progress. Signed-off-by: Kedareswara rao Appana --- drivers/dma/xilinx/xilinx_dma.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 8288fe4..736c2a3 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -321,6 +321,7 @@ struct xilinx_dma_tx_descriptor { * @cyclic: Check for cyclic transfers. * @genlock: Support genlock mode * @err: Channel has errors + * @idle: Check for channel idle * @tasklet: Cleanup work after irq * @config: Device configuration info * @flush_on_fsync: Flush on Frame sync @@ -351,6 +352,7 @@ struct xilinx_dma_chan { bool cyclic; bool genlock; bool err; + bool idle; struct tasklet_struct tasklet; struct xilinx_vdma_config config; bool flush_on_fsync; @@ -966,6 +968,7 @@ static void xilinx_dma_halt(struct xilinx_dma_chan *chan) chan, dma_ctrl_read(chan, XILINX_DMA_REG_DMASR)); chan->err = true; } + chan->idle = true; } /** @@ -1007,6 +1010,9 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan) if (chan->err) return; + if (!chan->idle) + return; + if (list_empty(&chan->pending_list)) return; @@ -1110,6 +1116,7 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan) vdma_desc_write(chan, XILINX_DMA_REG_VSIZE, last->hw.vsize); } + chan->idle = false; if (!chan->has_sg) { list_del(&desc->node); list_add_tail(&desc->node, &chan->active_list); @@ -1447,6 +1454,7 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void *data) if (status & XILINX_DMA_DMASR_FRM_CNT_IRQ) { spin_lock(&chan->lock); xilinx_dma_complete_descriptor(chan); + chan->idle = true; chan->start_transfer(chan); spin_unlock(&chan->lock); } @@ -2327,6 +2335,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, chan->has_sg = xdev->has_sg; chan->desc_pendingcount = 0x0; chan->ext_addr = xdev->ext_addr; + chan->idle = true; spin_lock_init(&chan->lock); INIT_LIST_HEAD(&chan->pending_list);