From patchwork Thu Dec 15 15:11:21 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: 9476405 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 4BC5A607EE for ; Thu, 15 Dec 2016 15:14:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A818287B3 for ; Thu, 15 Dec 2016 15:14:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F6AA287B9; Thu, 15 Dec 2016 15:14:37 +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 D9D59287B3 for ; Thu, 15 Dec 2016 15:14:36 +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 1cHXi3-0000bH-Kl; Thu, 15 Dec 2016 15:12:39 +0000 Received: from mail-sn1nam01on0059.outbound.protection.outlook.com ([104.47.32.59] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cHXhM-0000KS-QI for linux-arm-kernel@lists.infradead.org; Thu, 15 Dec 2016 15:11:59 +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=SEdk9p5bds4WskqGJWUOJUkzF4uBz64uK3VdAgRukRA=; b=qRekVAPMkNxe90ZtkaO+sNTcgiT3wDCJ/76Mhn+WLjIHafeyWvlVBH3iTCHp7dxb/jAP4ewSPZiA2RF9N2jWMNyQdWDnhkQbR0yyqziBnq57BB7JktWIHMFXEUHmkNJg4gM0AVrT9PU1AjXTsOyVsdva5oTn9Cnt2/OrdZIDnH0= Received: from CY4PR02CA0028.namprd02.prod.outlook.com (10.175.57.142) by CY1PR0201MB0892.namprd02.prod.outlook.com (10.160.163.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8; Thu, 15 Dec 2016 15:11:33 +0000 Received: from SN1NAM02FT013.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::207) by CY4PR02CA0028.outlook.office365.com (2603:10b6:903:117::14) 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:33 +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 SN1NAM02FT013.mail.protection.outlook.com (10.152.72.98) 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:1934; 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-000646-Sd; 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-PN; Thu, 15 Dec 2016 07:11:31 -0800 Received: from xsj-pvapsmtp01 (xsj-mail.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id uBFFBP6K006123; 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 1cHXgr-0002d6-BR; Thu, 15 Dec 2016 07:11:25 -0800 Received: by xhdrdevl6.xilinx.com (Postfix, from userid 13614) id 79D4EF20016; Thu, 15 Dec 2016 20:41:24 +0530 (IST) From: Kedareswara rao Appana To: , , , , , , , , , , Subject: [PATCH 2/3] dmaeninge: xilinx_dma: Fix bug in multiple frame stores scenario in vdma Date: Thu, 15 Dec 2016 20:41:21 +0530 Message-ID: <1481814682-31780-3-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)(39450400003)(39850400002)(39410400002)(39840400002)(39860400002)(2980300002)(438002)(189002)(199003)(8676002)(38730400001)(2201001)(45336002)(52956003)(81156014)(81166006)(46386002)(8936002)(33646002)(50986999)(5003940100001)(92566002)(90966002)(76176999)(626004)(4326007)(2906002)(5660300001)(63266004)(42186005)(103686003)(6666003)(5001770100001)(47776003)(305945005)(48376002)(106466001)(189998001)(356003)(50466002)(36756003)(50226002)(36386004)(2950100002)(921003)(107986001)(83996005)(2101003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB0892; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT013; 1:2r3oWRU8Dm7f6CuF8/+cefeW5zvv+VD2mTm2ns/8OI5Um0Syl1etKDnfaYmhYppGKWMvXRzVAhffFk+dgqskeyprjdblBPafw9ED+zfbXXq5T03xp3oKvGvYri1k0dh+1zWczB/bKqTMnDHM8aFNevCANb92msSBdhWXVsnjIVBvjXJPDFzzjIu3qnHTvgVlIGR7GqlE+wWrVomJJiOou0oTBp0XzATJVy3Da4OP3AKWLq7epir8X1o3el27MecUYi2krfLTjugoTuEzuwRB4Y8dJ+Zdojr7XEluRy4FSAv/rnXywbDA3i0asV0KncG2Zt7B2D44zCKSenh5Tl9FRoj1+S/sZEzwU6Rb7ThoXQgqgO8NpPl4HEfXFbH2MWl1h+lqweC6UEYgl0IpbOUu/pGDJAzZrpPF4McneIJye7mrrcsZxPKs+2mkyvHDV2AwjxzSaELobCf3jYLa+7voL0+P7GVnBWMHtNytlD3oMbK/TKBxPmokttyNAYHkwTWxmuG4B0evn0N0VIEZTlkavd4e+JCeXOi0s2HiIU5FGRoH4V+Kl60OeFeeNab3pLnbyTQT9ZfHXVWKK7jOgPE6HT7pV/OfSuctXvYLbdWasE6XQS88LNdSoEKMigQyCD3fGTaebl2qvUlkbvvWymn6UA== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a262e375-dc39-4682-c51e-08d424fca7c1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:CY1PR0201MB0892; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0892; 3:4gqUfuxnh4BfMiGgI8jPMvAawHBghiK68TP1PkXbBbC4YILAnoyl28UVL3QbTYy1l8Nm6jjzRElyxblBM/3l0X7+jXqCTh73Ys9hB+Dj5XkSlaVJ0pV6rK07GWhyhp/Z4WkDyQNYXdL3tZJhflKZ9/9j8LWXbyorP3gDyBBvjEMAXA2F7WiZ1my2/cqnvbBOOAcL6j0N2hFjrOL+rQSXfOnL386Zsp/hYCuTRvstzSQCPD/S2KBy5jwelJ2utzs4bVHd4eyJAwvm8mNLmHE9CHD2yJ3XWLVUVPt3rjDpz6SsF4jCPeoaleO3TtqOyv14tK2fOaOlPcM6hpjQsSBFfCtondWBj40ULpUl/P2P5e5M/GrsKq0O6lZBcFm8cHWnHFuElWLPY8jhgH3m5yJfNg== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0892; 25:MeVC68ZhHiYEk0+Vd7D+4ZIH+edKkET+UU+a52hEygjfj4UyDYr0YEmz+KgqkvuM755W/6Y29neAop/8cGUHYpqSmv0ECCKwFYpPfKkrY5J1ubkXuUDN5YVcvJ1YL6SQBQo5hTJkOCNfjGn9YVJxhPdGMoRab5k+GG7zyXFbzWodFChQH193Uts2LBKvsP49Wiv6Fxql8+8GKX/4K8REm2/HYGn00CZNKnuxWS65DmAbCN1mrMy3MF5+SCfyvck4HGAOYAxNmgrvwQxtgpd8f88/bVEZ09nuU20CGaYBq+TAmW7OXnz254KUVIeGmNHWDETI8n9Em27OX5tmq+i06DSooDS6E8G5JCPN4SApvAiEOnOjJTJ6/sMNCuUdZJI3nomYMARZEtoWZhhES2Pu3nV9IVRMpVABYAdgWjjkJQmLaOYqZKkkEmRsr5kDRpBAPmLGWmGmpTWz94CqlbaZC9FcASYj4xJFiENsJdDdSZPdzpLoOadIPVWbPwVMIL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qemcnRf3uHT8eFmhdovQ+W8PV/PvnFzqEsZCfdKfc+GQLm/Vjr1GvocAzCAGMO/6fWkqbW7PPVjcD2zOlPM16CRnYrei3n4DaVXmLpds6PZHD+ZCIgKi38YA0fb1Mszf8tnPqW 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)(13017025)(13015025)(13024025)(13018025)(13023025)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR0201MB0892; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB0892; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0892; 4:gt37LdIaFcGDpa+/gxAYcoFX+3u21r15fE1xnntr7LCF+jWGbwf1IWKA2NNTVsZ+OkVjh6AWrrRbBT2HaIDT3IMJrWT1Z2RFRwhNtAZNLfmfmrOCiGKsqAFk0ANKRR3UTFMV7hbyFjd7oU4Sw8UqL0yTGfwLTdzxfnvP1QI8+X8+7vJpd2eiFdpnmiG483YuknVwXQeAhuEucZxEsPDAEA+1XzASIEiXxPqwrsEl8pEO0JfvBN3x56aMcDVza28Yq1EbsO98QFN2CH3W4EDFWae3MgfirYNaXPzlgqPJ7G7dCRlzbY3hLIxLwepSJmYH6avZ5YHIfWjw/OHLCwdzUmy5uBLbdMX4r10xYtjqXiUuKlyY5F2e9z1EUSFNdshlDKk1rDt3mAJUEuIvghRO8Mv/rZh4InrEW2ZF2xfekS3GKyKHMJNBajPvK6trb7KpvkcR781dV76XQiRRhobTrJr5w6v/3ebjrz4ACJ8tFDVadySVcOFPT584SMDLlQIFQqVPjcBaSwxkx19sOSzrV0Jg+SxAi2vf+E6/Kjmw8BH5pLhBGjr/NSz74tmgl7gGbma7mh6xNrUWpBwlSUP9euBFihsh+jZJAwLGjfcePQWr5IumcfPSHJBVy4ZUTXFiUCd/3/V0NwpwPw+kYrA+KtpXLYlC9jPYIG9nSK4XPtA/YMO40CVS2aH0wGVI4un4esaAvA9z2Zcq9r58+XBQpPuLmfUzJC3sYylhDpoq66Q= X-Forefront-PRVS: 0157DEB61B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0201MB0892; 23:cDemBH06B05pMN08I6ARXUFk3d6lSnpYa80Yd48?= =?us-ascii?Q?jC17CFv6Hm3d2buCb69fiaTFf9cd5tEB8v1RzPVYLtqHpQv5/+96ZHrRN4ho?= =?us-ascii?Q?/EuEVKZvhZnSCcEWten2MSFbBc715Xl/gR3bqnd5kD27FQlxtFmDAadkzZRC?= =?us-ascii?Q?FHCBuOaAbdVkamjaTBwlQOxZ/FB3BZT+RWwSEtd0noByWtES843bCVLc2AGb?= =?us-ascii?Q?Oiq694wJDRQTeQesqo7bN/H9WUJ5y56GLKsqzZ16zT3S74LEsqIdsD+nLTfB?= =?us-ascii?Q?dQaIHd+FCi6yOfqK7h4P9bplC9BATJ1lWSz4gOmV+Sfc9JiGLVT/fEB17Vd2?= =?us-ascii?Q?jexEegu+xeljmGI3slmDvbaTTtJgUYPfiL6IO+bMg09O8gYgVhSuReDkxeXI?= =?us-ascii?Q?aouokI5Pvrxl9HS50+oehtIW+MnE1zvJYkQmtRwErUDvS2QLWtQmKBsE1gyO?= =?us-ascii?Q?fm6OXwpexNMdt1x4k4sJQ/Bg1JZQHtdre+haqQg/JXdfd7Kx9fZ/XF8x9d8k?= =?us-ascii?Q?ZKspjZ4OzRxFMcU4RsvuQnk4YrKd7ZYEnGOQ/9lHDXWLscTsU2I5G+/rXRXc?= =?us-ascii?Q?nGtY5oiY+QLMY9VDxavktN7wav6E4bqs3/wjxLxN8SVSmuYgdTYejp1P+plj?= =?us-ascii?Q?XY7lY7AjhjOCufyz6SdX3VFOf+VPkDlgJlTxH57pz6RLsi5gtkDXZtotjCUO?= =?us-ascii?Q?s1UJvYxQ3Mm3fsBymqOLpF4NlEQyXKr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3RrGR3AcL0omLx3hyWvMFuK0UJvKYqnU+6gep1RT4d5Ukphs+P7DICbsSt9LpZU7Vi8IvvK72UxFWdA==; 5:4+lfxi1L1vMjJxKc219U38nEyv9GJ/qX/V3qeHM4dnAC5Lp9lUtuNwcjuyju5Pd8qalDP9/tVXZgb2rgbcwhcOFZE+1xKFbO9CYmzkBR+wiRcLvS1fLmR2tKPAWiG7qee+hYWWNulWAHVKuZPeTz7A==; 24:pnaRg3JhnYz24iHaQXPGt7BBYEebPEbtcSGPK0kgcKQiCZrQ9DpgO/X2MSdbn+shS1VK669bNUl3Wp3EC1+RHBynl88qpx/CGtzJfWyCdsg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB0892; 7:7MkX72zT1Nv4r5yVTDB8+g5EHbLFanIkd4zMAfOOiAM5ZyShw3Qri8HdFBxxszAetwmhpEw7JqHqR0Sxqc7LzOgX6xEL859NR8X/Fb8SEocOHlBED4dDWTxHZ+QIBS3RZ+8yamvyegKqPxRtB4yyk909K7vxa5yaPrWKfnzX+sCcBRwBp5sKC64vluMOmRe0Hzmm51tWJ8rENy9K32ryuC1JM5s62jjS4/kyGzehBlkLWtbW9WMuly7TFeffpKhe51Wfml2hWsSkS3EQr0a4oys/XEN48qZaw26PCERwh+Afr3M+md2P3We8hXO9CXCyyf9M+gGqYaPFO5NxbOqcvAwFN+2CKUvcVzJg4FA0Bd5HTtGs41JSqWESAD48AJyghy8wZHZtui41XBTQIaMncdxFc1un9WJAUDyY5U3q8ctC40PByyPm7xLHrTSZszCiZz7jM6wbVCNPtI2io69YPg== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2016 15:11:32.4999 (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: CY1PR0201MB0892 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161215_071157_113712_CEFAD923 X-CRM114-Status: GOOD ( 11.78 ) 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 When VDMA is configured for more than one frame in the h/w for example h/w is configured for n number of frames and user Submits n number of frames and triggered the DMA using issue_pending API. In the current driver flow we are submitting one frame at a time but we should submit all the n number of frames at one time as the h/w Is configured for n number of frames. This patch fixes this issue. Signed-off-by: Kedareswara rao Appana --- drivers/dma/xilinx/xilinx_dma.c | 43 +++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 736c2a3..4f3fa94 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -1087,23 +1087,33 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan) tail_segment->phys); } else { struct xilinx_vdma_tx_segment *segment, *last = NULL; - int i = 0; + int i = 0, j = 0; if (chan->desc_submitcount < chan->num_frms) i = chan->desc_submitcount; - list_for_each_entry(segment, &desc->segments, node) { - if (chan->ext_addr) - vdma_desc_write_64(chan, - XILINX_VDMA_REG_START_ADDRESS_64(i++), - segment->hw.buf_addr, - segment->hw.buf_addr_msb); - else - vdma_desc_write(chan, - XILINX_VDMA_REG_START_ADDRESS(i++), - segment->hw.buf_addr); - - last = segment; + for (j = 0; j < chan->num_frms; ) { + list_for_each_entry(segment, &desc->segments, node) { + if (chan->ext_addr) + vdma_desc_write_64(chan, + XILINX_VDMA_REG_START_ADDRESS_64(i++), + segment->hw.buf_addr, + segment->hw.buf_addr_msb); + else + vdma_desc_write(chan, + XILINX_VDMA_REG_START_ADDRESS(i++), + segment->hw.buf_addr); + + last = segment; + } + list_del(&desc->node); + list_add_tail(&desc->node, &chan->active_list); + j++; + if (list_empty(&chan->pending_list)) + break; + desc = list_first_entry(&chan->pending_list, + struct xilinx_dma_tx_descriptor, + node); } if (!last) @@ -1114,14 +1124,13 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan) vdma_desc_write(chan, XILINX_DMA_REG_FRMDLY_STRIDE, last->hw.stride); vdma_desc_write(chan, XILINX_DMA_REG_VSIZE, last->hw.vsize); + + chan->desc_submitcount += j; + chan->desc_pendingcount -= j; } chan->idle = false; if (!chan->has_sg) { - list_del(&desc->node); - list_add_tail(&desc->node, &chan->active_list); - chan->desc_submitcount++; - chan->desc_pendingcount--; if (chan->desc_submitcount == chan->num_frms) chan->desc_submitcount = 0; } else {