From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759164AbdADNbf (ORCPT ); Wed, 4 Jan 2017 08:31:35 -0500 Received: from mail-sn1nam01on0062.outbound.protection.outlook.com ([104.47.32.62]:3392 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758467AbdADNaN (ORCPT ); Wed, 4 Jan 2017 08:30:13 -0500 Authentication-Results: spf=pass (sender IP is 149.199.60.100) 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; From: Appana Durga Kedareswara Rao To: Jose Abreu , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "dan.j.williams@intel.com" , "vinod.koul@intel.com" , "michal.simek@xilinx.com" , Soren Brinkmann , "moritz.fischer@ettus.com" , "laurent.pinchart@ideasonboard.com" , "luis@debethencourt.com" CC: "dmaengine@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: RE: [PATCH v3 2/3] dmaeninge: xilinx_dma: Fix bug in multiple frame stores scenario in vdma Thread-Topic: [PATCH v3 2/3] dmaeninge: xilinx_dma: Fix bug in multiple frame stores scenario in vdma Thread-Index: AQHSZldmkQC5i0dUBUykLlvBwiYV3aEnj8EAgACLViA= Date: Wed, 4 Jan 2017 13:30:00 +0000 Message-ID: References: <1483512847-25710-1-git-send-email-appanad@xilinx.com> <1483512847-25710-3-git-send-email-appanad@xilinx.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.23.95.44] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22802.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39410400002)(39450400003)(39840400002)(39860400002)(39850400002)(2980300002)(438002)(52164004)(51914003)(24454002)(199003)(189002)(377424004)(2201001)(7736002)(63266004)(33656002)(356003)(47776003)(305945005)(106116001)(54356999)(106466001)(76176999)(55846006)(50986999)(97756001)(2950100002)(54906002)(229853002)(38730400001)(7696004)(81166006)(81156014)(626004)(92566002)(8936002)(2501003)(8746002)(5660300001)(2920100001)(2900100001)(8676002)(6116002)(102836003)(5001770100001)(3846002)(189998001)(7416002)(2906002)(23726003)(55016002)(4326007)(50466002)(5250100002)(46406003)(921003)(107986001)(5001870100001)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:CO1PR02MB206;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;SN1NAM02FT001;1:bnhPyVypXKwYAhbuu5l4IqOa5rNvVtm9sZuGIGD/GRPKPim1pXYeY452NRP/NYZI7OJRO2rykePyrSDZYNyGf318MUJ3zGcqGmIrnPB+1rM5s2KmeHH4LVFERr4AhhMz2MhQjdHquVgUWVUsQbz+xDuIJ75O3hiS6scACHn1OjhirSGbor8dULNsspxi1cQlRTnQ/nFL1KUCzSZ6UPQEiRCnYBOepmAl7aOm8lPQJNhjzJCV6OYJ1fZgA7k3m2ELhA10BEqTd7nFGLJORlMY4JWixpUWg5uUG0qhfW0ebKkOKQn7xPrvkmpzu7THZxI5w2QlXwM+ywdG6NWsK2r5QGsOjCTSYvZhMVeCeUHXFiCoGqHy5SRllqrQLCtd1aGFyGLVfMp+r+qWTzl1zRKJGfVM9iGl6dFNJqz2hUi2kLwyPlDgiZwOQSoaq2AzRC/gqWf4nyJ8JQPSwioSGNSuvZspVhF+vLNLmOxDBP5mYihMcn4x5d4K3D7kd9AXIEmcNsZXab+66DXPXrVSGSavH8FXiMJ8Okb8fPiOuFCdSJVj7eXDS0lRu8qYLZ9WxIO7s3mudBSxfOJM7ccO9PUwlYfCBUybhox3fVtc21Sh48GW+ZfHL69njhgAPNpPAL8xfH10SuBRNzdBGJQmV9CmrQ== X-MS-Office365-Filtering-Correlation-Id: d49aa21a-6b5a-4249-c07f-08d434a5cd99 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:CO1PR02MB206; X-Microsoft-Exchange-Diagnostics: 1;CO1PR02MB206;3:ese2Wnsm2+VW0nf+OtvP/D9hs3Iv7USmpIrCYUH94B5QjNYJkBLG3geffV9Alr7l0acPVMShIJiR7uOn4GIgxJtBQ8zcBjoUQoR/9C9cWmNwgMVAhwNwy1Q+afGoMN9YQf+uR6tqMaNd0jFGBFz19w1ppOIbUfj2wag23qBdIOuXNGyzHf32kCQWWnuqvpRNhqbLhh9k9XIcAnztwVeSC181gWOhUxrPvyxHo6OuxgzH0E8QkD0OLF4uJYYaK4O9bKMI6AW47dbTze5XWy40sNBwJuJVsdv0fZ5cOsuS4PzR2WQymgskO17Zmjb/oK49KTy7obDQflfU2VbvSpkQDENtk8lNf8N43QXpudTiZJkgZ9TjNresoE+9FMlPCAkP8jLiDLFaz+QhSy2+YGh1bQ== X-Microsoft-Exchange-Diagnostics: 1;CO1PR02MB206;25:ULADc3fGSdQj+P83gdlxS0eSVdU6jepZJoK+yMXN3Hpz1gmGiYcfG55uzabjrT2GbYiCuCuxGCPyi7udczVTSzERaLfPNUHaI9Mtd4OEGgGf3V9Gi6III6a3P/Qrmf3BzKWzPiWFi0g5nzed5eKbBTuIVB2ofnTBwWw+bBVrswcixUAHsLL8tXOLzNgMugYzUejBydDUj04u4ZJFcNtiz2lC3gZYqDMxp5QoAgP6hrmtSytbKe80LbhjwcEWIAByPQzyOluIe0W1evJcD8Z8HKGrof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fVUUYqUdMyn+n+Ynp53Lnm4FABHz8AetgQQ2fdVs1+mc4AOYDvze5vLf1XOOpkgIFXJca4/vYY6gHw3UFzl22JVbx3ZXB5r1rbbHDBBRcTlSHgB2mi4ZUnAXD7SmbVRPp3Gccfvapt3k0dJmO6Mi9cqdAC7BhQSVrevpisSV1/QF1/98H8HcqhE13LyJJdUX1ErGlVqPVlPv84+/5rhCRaNI8R1zU8+nmrkFWbuohWt70HdtmwvFH4Tsvn2iHzgUNiJKID+ZPGzg68fVIkOBukJstvjRHDxYBc4WLaguyO+OVjmv2qbLt4qQ49dRL6AzFZuQwDlgxsRyG/Fi4z2tE/ 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)(13015025)(13017025)(13023025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558021)(6072148);SRVR:CO1PR02MB206;BCL:0;PCL:0;RULEID:;SRVR:CO1PR02MB206; X-Microsoft-Exchange-Diagnostics: 1;CO1PR02MB206;4:cOqVcg294ppdpzyqkgDyh+uWcG5+5ThESc+TFpP1YaQBirnHESLcoNXiABS7I2/csHqDF+CXDUxw7Tvje3ObSZT0f83Nn4nSkgDvbVNdbMe/wEzfWicCnRbvGCGkarK/yIVzg0r8D1zbRCIiPWAVdHahYDrCRlX6g3u/GGJ/hCja3BSnl+oGZJF248MsCB9gcPnApIr1goI7en/EMPaTPltKdU+ahje8rLC1+g7/Lh00dZEX9U7X9H5P7nnVXQy4AcJXzLPs916sz7CGfyjAutpWK2T4Dx7d5zLMLKY0/EAYIqoUTeNur3LAVlB6F1O0MRyp1ft/FSBvKdAgHb7bSWr3vftieaEtYUcJIko6h/u27A8YRSAeBzd6qDtu0boO6EJwNxyxqNfiDIsMdMMb7hcKSeu5CsH02re8uI4S4WQCm6FgjVyGw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7+QyOmO?= =?us-ascii?Q?qqXGN8D3AdJr9sZjxLOK0IXAvjK26d+zWYIQF4ck5N654ISEikE/CQGF8ER6?= =?us-ascii?Q?ZNBrXSpbhDIw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;CO1PR02MB206;6:7ySe5tYGhLznoLDfP1ePxw8OsxbqkmcBCj+C2yvfa8kqw+csfyHyy5yIdSKeGLSPyzwsSUyfimzx1+YfQQcT7Ye5kIEKaNq0wZlG5ugEgu3BnMPRyOxgvvzbZJMR31bJw/gNl/3goc8v0I+IAlWJszQukH1JAFKehSBkSCrW9dJOn4lNyUB+r/g3/+OVDsVqj9JmdF9c1MLlg4MnovMgc+cOlmVSmEMcMYlWESmsaBIqTPF7IEoOU5QOYQlSwRFvsHhMGxWdN/G4ui5szYjv0/j0p7PuJixPWFQCDWy5ik5K1AEYyqztQFcJOdQZW66VIfvTgM54MLcrBP34aGCw8cMyf3n5z+me1s+2AcYLihH2rnRAW5KK73YL2NCiU016d6DPAoLKdNCJCdx01jLn11RvtCgfqMk6fMDEnEChLYRgFJWsT96pj1vi/ClL7cqHt2ULMIRHD2ohsQVgUXT2NA==;5:3K4k1UrH719+q85QO387yuSa4e3TF00rvnFUxp6Ohs6sIYtYOo9BgLIAjRikKUY75eBll5/p6OPUbbDLnATU61CpwQnN84FB/BLxnpPCsz6U2yu4jjQ1n+lOD79YTpGk/OPNpLX1EwAdvkK0GD3K4vV8gHLAQ4C8HOE/d/DQzX0=;24:p8/iA1xKWEFDB6Ckhqi6n3H/RvKGm7PtW1X6Phtj7awEJiiV/imTC1BD0V6deByAbNOExsISvfQRQ8CEYFv/dgHJ2UHMKyFr7+PaDzBmpH4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CO1PR02MB206;7:pyix8iFgxlyW2bYsY1gkmPvJMtTm+t/o56ZYusLXJyFN+GrA7zL0NYCIqLzkf3tEDbrm1MVFkdS2IE3HcOZqYglwCXQJbKd/9oUeEdJSoXcvE2KbYcLl+xrh2q0fVe8c3eX8ABZQDGn9XSNvPKZKOgN6+8Xm6lWqsFk0nihlPO+kRqtvV4QHZHkCw9DWhJaZ9F6Pe06gz0g3ROl7TBFK/YhoucF4KNsuGGQFvQsyLORtmVwoo3UMTHb+oRW+QuF8zqYaCEe4B3dytEUUcSeGWeBXmO3wckeRbOucTB+vTXQH5EMj0Ldj154/62seUDKHlaool+Ne2dEgLLvgWFCe+NRUQXlW+pd4KE/QCUEUHiQDkpyQP5z92sUxlTqU3AsD5aysLdJUiiH2SAJAlq3zDOctIw9hwK4Obc/baZrK8dCWGUR96y2VXZJ8LynBb8iHU5liUSlEAxqr1iQyXRtxNQ== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2017 13:30:08.4267 (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.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR02MB206 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v04DVdTl017313 Hi Thanks for the review... > > Hi Kedar, > > > On 04-01-2017 06:54, Kedareswara rao Appana wrote: > > 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 > > Looks fine. I have a couple of minor comments, if you address them you can add > "Reviewed-by: Jose Abreu " > in next version. Thanks... Sure will fix the comments and will add your' s Reviewed-by.... [snip] > > + /* > > + * Note: When VDMA is built with default h/w configuration > > + * On the S2MM(recv) side user should submit frames upto > > + * H/W configured. If users submits less than h/w configured > > + * VDMA engine tries to write to a invalid location > > + * Results undefined behaviour/memory corruption. > > + * > > + * If user would like to submit frames less than h/w capable > > + * On S2MM side please enable debug info 13 at the h/w level > > + * It will allows the frame buffers numbers to be modified at runtime. > > + */ > > + if (!chan->has_fstoreconfig && chan->direction == DMA_DEV_TO_MEM > && > > + chan->desc_pendingcount < chan->num_frms) { > > + dev_dbg(chan->dev, "Frame Store Configuration is not enabled > at the"); > > + dev_dbg(chan->dev, " H/w level enable Debug info 13 at the > h/w level"); > > + dev_dbg(chan->dev, " OR Submit the frames upto h/w > Capable\n\r"); > > + > > + return; > > + } > > Hmm, may dev_warn would be more suitable because with dev_dbg and no > dynamic debug enabled user will not know what happened. Also, I am aware > that in direction DMA_MEM_TO_DEV there will be no corruption in PC side but it > will be corruption in VDMA side because it will read from invalid memory > locations. Maybe drop the check for channel direction. Sure will fix it in the next version.... > > I am also not fancy about dropping prints that are not grep'able (you do not > break line in each print so a user searching for the whole string will not find it). > Try to do a line break in each print or change the string to be smaller. > Sure will add a line break in each print in the next version... Regards, Kedar. > Best regards, > Jose Miguel Abreu > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Appana Durga Kedareswara Rao Subject: RE: [PATCH v3 2/3] dmaeninge: xilinx_dma: Fix bug in multiple frame stores scenario in vdma Date: Wed, 4 Jan 2017 13:30:00 +0000 Message-ID: References: <1483512847-25710-1-git-send-email-appanad@xilinx.com> <1483512847-25710-3-git-send-email-appanad@xilinx.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Jose Abreu , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "dan.j.williams@intel.com" , "vinod.koul@intel.com" , "michal.simek@xilinx.com" , Soren Brinkmann , "moritz.fischer@ettus.com" , "laurent.pinchart@ideasonboard.com" , "luis@debethencourt.com" Cc: "dmaengine@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" List-Id: devicetree@vger.kernel.org Hi=20 Thanks for the review... >=20 > Hi Kedar, >=20 >=20 > On 04-01-2017 06:54, Kedareswara rao Appana wrote: > > 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 >=20 > Looks fine. I have a couple of minor comments, if you address them you ca= n add > "Reviewed-by: Jose Abreu " > in next version. Thanks... Sure will fix the comments and will add your' s Reviewed-by.... [snip] > > + /* > > + * Note: When VDMA is built with default h/w configuration > > + * On the S2MM(recv) side user should submit frames upto > > + * H/W configured. If users submits less than h/w configured > > + * VDMA engine tries to write to a invalid location > > + * Results undefined behaviour/memory corruption. > > + * > > + * If user would like to submit frames less than h/w capable > > + * On S2MM side please enable debug info 13 at the h/w level > > + * It will allows the frame buffers numbers to be modified at runtime= . > > + */ > > + if (!chan->has_fstoreconfig && chan->direction =3D=3D DMA_DEV_TO_MEM > && > > + chan->desc_pendingcount < chan->num_frms) { > > + dev_dbg(chan->dev, "Frame Store Configuration is not enabled > at the"); > > + dev_dbg(chan->dev, " H/w level enable Debug info 13 at the > h/w level"); > > + dev_dbg(chan->dev, " OR Submit the frames upto h/w > Capable\n\r"); > > + > > + return; > > + } >=20 > Hmm, may dev_warn would be more suitable because with dev_dbg and no > dynamic debug enabled user will not know what happened. Also, I am aware > that in direction DMA_MEM_TO_DEV there will be no corruption in PC side b= ut it > will be corruption in VDMA side because it will read from invalid memory > locations. Maybe drop the check for channel direction. Sure will fix it in the next version.... >=20 > I am also not fancy about dropping prints that are not grep'able (you do = not > break line in each print so a user searching for the whole string will no= t find it). > Try to do a line break in each print or change the string to be smaller. >=20 Sure will add a line break in each print in the next version... Regards, Kedar. > Best regards, > Jose Miguel Abreu >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 From: appana.durga.rao@xilinx.com (Appana Durga Kedareswara Rao) Date: Wed, 4 Jan 2017 13:30:00 +0000 Subject: [PATCH v3 2/3] dmaeninge: xilinx_dma: Fix bug in multiple frame stores scenario in vdma In-Reply-To: References: <1483512847-25710-1-git-send-email-appanad@xilinx.com> <1483512847-25710-3-git-send-email-appanad@xilinx.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Thanks for the review... > > Hi Kedar, > > > On 04-01-2017 06:54, Kedareswara rao Appana wrote: > > 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 > > Looks fine. I have a couple of minor comments, if you address them you can add > "Reviewed-by: Jose Abreu " > in next version. Thanks... Sure will fix the comments and will add your' s Reviewed-by.... [snip] > > + /* > > + * Note: When VDMA is built with default h/w configuration > > + * On the S2MM(recv) side user should submit frames upto > > + * H/W configured. If users submits less than h/w configured > > + * VDMA engine tries to write to a invalid location > > + * Results undefined behaviour/memory corruption. > > + * > > + * If user would like to submit frames less than h/w capable > > + * On S2MM side please enable debug info 13 at the h/w level > > + * It will allows the frame buffers numbers to be modified at runtime. > > + */ > > + if (!chan->has_fstoreconfig && chan->direction == DMA_DEV_TO_MEM > && > > + chan->desc_pendingcount < chan->num_frms) { > > + dev_dbg(chan->dev, "Frame Store Configuration is not enabled > at the"); > > + dev_dbg(chan->dev, " H/w level enable Debug info 13 at the > h/w level"); > > + dev_dbg(chan->dev, " OR Submit the frames upto h/w > Capable\n\r"); > > + > > + return; > > + } > > Hmm, may dev_warn would be more suitable because with dev_dbg and no > dynamic debug enabled user will not know what happened. Also, I am aware > that in direction DMA_MEM_TO_DEV there will be no corruption in PC side but it > will be corruption in VDMA side because it will read from invalid memory > locations. Maybe drop the check for channel direction. Sure will fix it in the next version.... > > I am also not fancy about dropping prints that are not grep'able (you do not > break line in each print so a user searching for the whole string will not find it). > Try to do a line break in each print or change the string to be smaller. > Sure will add a line break in each print in the next version... Regards, Kedar. > Best regards, > Jose Miguel Abreu >