From patchwork Fri Feb 15 09:17:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 10814405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1475B13B5 for ; Fri, 15 Feb 2019 09:18:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A22B22EB02 for ; Fri, 15 Feb 2019 09:18:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9480D2EB4F; Fri, 15 Feb 2019 09:18:01 +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,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 106C82EB02 for ; Fri, 15 Feb 2019 09:18:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730486AbfBOJR7 (ORCPT ); Fri, 15 Feb 2019 04:17:59 -0500 Received: from mail-eopbgr710061.outbound.protection.outlook.com ([40.107.71.61]:6048 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726045AbfBOJR5 (ORCPT ); Fri, 15 Feb 2019 04:17:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.onmicrosoft.com; s=selector1-analog-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I3xrlW5wKr2Co0314vjSVtzrZDI6teva9qcSLW1T8bE=; b=o6PvBA2beIgL7AHpPKYoVjIcT1DqZda4twhFlO245QmR1sK0sIix/mcJEKYKZ0K0BUUjx90/KUhpX0KT9GUCBPZliRjx7Zqz2LILQCWCajwV2MVAKEZiZrd+HNtjSa3w1kAZxXpFys5TuVp67OYcnoUbjS9jf6agvp4RJ/1gC5Y= Received: from CY4PR03CA0094.namprd03.prod.outlook.com (2603:10b6:910:4d::35) by CY4PR03MB3061.namprd03.prod.outlook.com (2603:10b6:910:53::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Fri, 15 Feb 2019 09:17:55 +0000 Received: from SN1NAM02FT014.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::204) by CY4PR03CA0094.outlook.office365.com (2603:10b6:910:4d::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1622.16 via Frontend Transport; Fri, 15 Feb 2019 09:17:55 +0000 Authentication-Results: spf=pass (sender IP is 137.71.25.57) smtp.mailfrom=analog.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=analog.com; Received-SPF: Pass (protection.outlook.com: domain of analog.com designates 137.71.25.57 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.57; helo=nwd2mta2.analog.com; Received: from nwd2mta2.analog.com (137.71.25.57) by SN1NAM02FT014.mail.protection.outlook.com (10.152.72.106) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1580.10 via Frontend Transport; Fri, 15 Feb 2019 09:17:54 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.69.107]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id x1F9HrhE006426 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Fri, 15 Feb 2019 01:17:53 -0800 Received: from saturn.analog.com (10.50.1.244) by NWD2HUBCAS7.ad.analog.com (10.64.69.107) with Microsoft SMTP Server id 14.3.408.0; Fri, 15 Feb 2019 04:17:52 -0500 From: Alexandru Ardelean To: , CC: Alexandru Ardelean Subject: [PATCH 1/2] dma: axi-dmac: don't check the number of frames for alignment Date: Fri, 15 Feb 2019 11:17:49 +0200 Message-ID: <20190215091750.28035-1-alexandru.ardelean@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-ADIRoutedOnPrem: True X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.57;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(39860400002)(376002)(396003)(136003)(2980300002)(189003)(199004)(246002)(106466001)(51416003)(107886003)(7696005)(4326008)(48376002)(50466002)(72206003)(7636002)(478600001)(305945005)(53416004)(126002)(2616005)(486006)(36756003)(336012)(426003)(50226002)(47776003)(44832011)(26005)(8676002)(110136005)(77096007)(476003)(14444005)(8936002)(186003)(1076003)(106002)(316002)(356004)(6666004)(4744005)(16586007)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR03MB3061;H:nwd2mta2.analog.com;FPR:;SPF:Pass;LANG:en;PTR:nwd2mail11.analog.com;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 72c06366-5b0b-4e41-562a-08d6932677ed X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605077)(4608076)(4709027)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060);SRVR:CY4PR03MB3061; X-MS-TrafficTypeDiagnostic: CY4PR03MB3061: X-Microsoft-Exchange-Diagnostics: 1;CY4PR03MB3061;20:K6ErI+tG/nvLJatGNe1+zFcx3aKTb5m3uix9ttWNEVR10+f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zZ/QzBVigJkBI6XNfBi0lXM8rNgjaC9tKapC+y492n4NPpXVieNsDdkH59llBH7CRvnLLEsgrRMgab+GVMt6nd8849iBBvSec5/c9QTUJYgI+hSEdv8XBDdHj+pNxLheXpCCGU0Q5b+QGc28u+Fpir99sflNHKgy0mfQNV5pCgm8E4DRtiGICH46RukTk4H6Fg6u4mtnSjdxduMfNeKuerG/XzlunH83Spk+Ef3dsHT0dgjmxrab9iWf0S6TCtb7XDk4jbLnZAYKESexffQtl12D3csCmsxblNt/xR6I5XTQcVg2bgGBaHzRYDrvuwWAFBkRvK3P3goE+3V6VMYXX+09MhQ2pRNKWamfQfPPiKDjZgofcU6ISbg0JS0UbbtAVEiD3XmrJ43Hxy0g6+t3SsBOts/gxca7Cj9edwfnIBnRJVyglhn3by3IYB0VRJyWnsyv0Q4wTw8enZ3YojrFYmP6ebZkSF2/eG5t7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: Eq/w1xGvp3wKqMJCxXXsYYeT5ieTSH5UXMBrou5adrg3mdU/sZ2TfEmGgfX2YVW9UPI17mFzF1KCrPRiWgZO5D6+09SVoJSCF/xE3vLCEoKbF4mpMMk3c6n3TEntEOGpNZXKXOt2p1+A501Gw+glsyqHGUcbdXygvs7Ysz3QiHw+wKUe6Io9W2eEGHtRwifvNdZ937BTjf03hk1/KM6MGQev2uKqqiI41BTcP4ftyAvVVUUE0QIKREr5hyId3iSUgkclgiV98omcQGzyvF7NTK/7hU8BGhhiq1u0BPZVhNjmoKG4LNnyDBNxzs6IG+6vNBGxUb9qNsQ9JpST8Hu4+LQoCPjhcIfqiMmfvbZ1jUDa+i1FA2pb725aGyXRg1JHnAKkcGTL2/rHht1rjMIFOwOSbmVl6AlXUtJAUtQTMSA= X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2019 09:17:54.0659 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 72c06366-5b0b-4e41-562a-08d6932677ed X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.57];Helo=[nwd2mta2.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB3061 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes commit 0e3b67b348b8 ("dmaengine: Add support for the Analog Devices AXI-DMAC DMA controller") For 2D transfers, there is no requirement for Y_LENGTH to be aligned to the bus-width (or anything). X_LENGTH is required to be aligned though. So, we shouldn't check that the number of frames is aligned. Signed-off-by: Alexandru Ardelean --- drivers/dma/dma-axi-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index ffc0adc2f6ce..2c999113b989 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -485,7 +485,7 @@ static struct dma_async_tx_descriptor *axi_dmac_prep_interleaved( if (chan->hw_2d) { if (!axi_dmac_check_len(chan, xt->sgl[0].size) || - !axi_dmac_check_len(chan, xt->numf)) + xt->numf == 0) return NULL; if (xt->sgl[0].size + dst_icg > chan->max_length || xt->sgl[0].size + src_icg > chan->max_length)