Message ID | 20190226084807.26045-1-alexandru.ardelean@analog.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <dmaengine-owner@kernel.org> 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 6C4621515 for <patchwork-dmaengine@patchwork.kernel.org>; Tue, 26 Feb 2019 08:48:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A9962A6C0 for <patchwork-dmaengine@patchwork.kernel.org>; Tue, 26 Feb 2019 08:48:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EAE12A9FD; Tue, 26 Feb 2019 08:48:55 +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 DDCCC2A6C0 for <patchwork-dmaengine@patchwork.kernel.org>; Tue, 26 Feb 2019 08:48:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725977AbfBZIsy (ORCPT <rfc822;patchwork-dmaengine@patchwork.kernel.org>); Tue, 26 Feb 2019 03:48:54 -0500 Received: from mail-eopbgr810050.outbound.protection.outlook.com ([40.107.81.50]:2320 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725908AbfBZIsy (ORCPT <rfc822;dmaengine@vger.kernel.org>); Tue, 26 Feb 2019 03:48:54 -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=Ei/nGmEYp85SRTL745GC8nbEskXBBTCzWpJWr0WWGEY=; b=EfA1UK1Su8G/SKPtnOOFYS5ySTYaaV64AbWlqunQCt9HZtzNr+HSdg3qKQegzsZUNlvPExGLuj2L2588UTFXtQF7iQoPymBY+oBTmyaAWF0HM0GhQFyV5btK8BnuQJ7YpoX3XKD07NDGixhW/H7Y9BGxIsNfSgiRh9Rdu2KATEU= Received: from CY1PR03CA0019.namprd03.prod.outlook.com (2603:10b6:600::29) by CY4PR03MB3064.namprd03.prod.outlook.com (2603:10b6:910:53::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.18; Tue, 26 Feb 2019 08:48:11 +0000 Received: from CY1NAM02FT031.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::202) by CY1PR03CA0019.outlook.office365.com (2603:10b6:600::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1643.16 via Frontend Transport; Tue, 26 Feb 2019 08:48:11 +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 CY1NAM02FT031.mail.protection.outlook.com (10.152.75.180) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1643.11 via Frontend Transport; Tue, 26 Feb 2019 08:48:10 +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 x1Q8m9Uo019811 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Tue, 26 Feb 2019 00:48:09 -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; Tue, 26 Feb 2019 03:48:09 -0500 From: Alexandru Ardelean <alexandru.ardelean@analog.com> To: <dmaengine@vger.kernel.org>, <vkoul@kernel.org> CC: Alexandru Ardelean <alexandru.ardelean@analog.com> Subject: [V2 PATCH] dmaengine: axi-dmac: don't check the number of frames for alignment Date: Tue, 26 Feb 2019 10:48:07 +0200 Message-ID: <20190226084807.26045-1-alexandru.ardelean@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain 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)(136003)(396003)(39860400002)(346002)(376002)(2980300002)(199004)(189003)(305945005)(7636002)(486006)(2616005)(476003)(126002)(51416003)(7696005)(44832011)(77096007)(26005)(72206003)(48376002)(356004)(478600001)(186003)(246002)(8676002)(5660300002)(336012)(1076003)(426003)(8936002)(50226002)(14444005)(2906002)(53416004)(106002)(110136005)(50466002)(107886003)(4326008)(316002)(16586007)(36756003)(47776003)(106466001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR03MB3064;H:nwd2mta2.analog.com;FPR:;SPF:Pass;LANG:en;PTR:nwd2mail11.analog.com;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5626093-0711-47ba-8b35-08d69bc72337 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4608103)(4709054)(2017052603328)(7153060);SRVR:CY4PR03MB3064; X-MS-TrafficTypeDiagnostic: CY4PR03MB3064: X-Microsoft-Exchange-Diagnostics: 1;CY4PR03MB3064;20:6Z1GUMDQrU6Aht7rbiK7g3H+M0Fi+By85mJBBD6jpp20PhcnG0acUfKF/K3911RSLy3RIyOqZhnGXbs9Sc49+ONluK5jg+87krYupV+J55QHoSXmAhLNxdL3DlvCugr9pD5iQHsXwap4lV1234tXNWJddsbbJ7a5FWdrMFUIhYHVXHSMj8pQJQXPEmw/FcD2WwsSzAxYZjsNqDs6wPbBBhGXoN26RvK4IQhaRQ7ShQLnCEkg5XejwqL3iRdnwKNw8gVWrigH7gjIQWTTj88AV9EsV7CV+ngxt0PRoUF4Uj3aMkXGnH0XucjLDGAeBoTrqL+CoR5vWrLU8PPfX9FTdKvXg7Y/EmmvWUF8bjFA+IdSwFIP2YaeODcWyZeltNJ5pgO5SPcItljRzmveyd86/+Yc4/X24rCZ1G4Bjyf04BDCRvzsquysB65UFJt6DkigXvokoick6UjTo0mslB2z1buamTZKC49WfYZF6XSR8ztClMv+zJ6PnsmBiYjoXHRS X-Microsoft-Antispam-PRVS: <CY4PR03MB306409EF48E31E8C72AA04F4957B0@CY4PR03MB3064.namprd03.prod.outlook.com> X-Forefront-PRVS: 096029FF66 X-Microsoft-Exchange-Diagnostics: 1;CY4PR03MB3064;23:BfLKjgyYfXyIGEOFbKDcsSXSUC4QIzq2wgsYPDWqUUFZWbMNJPxGycAwCPbKzfwLveJ0cnt2UUkAz3tG8OmUj1NYoeZGQjpP/qH+fCbuXBahnY3m3sv6046Sn/4Y+nlpNoNa3Ac+z7xyu+AS5HOF/BTo0ShbcPc8u9vBjs3+3ap6knzaIONkCyUPDA8E3BZgWqPAvKHp0QKi8SWS8xHWejhGmGi6kqrgbhZwEdGyd6AaxzPytb4DUSV7OmcPTx7YkIjkZ/trNQFGfehpWxyortePJgUUpzhc2sR7yOBH9B7fSwTmk40BIIhMZBun1BWpNa+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lmqh9Kfac2UojnaVcEDSRDlQ+w8QHnQQGc5HLr2wJNuf9UshIxL7arnqLze/6QeLuDD4ARJDE4kcEhU1jY= X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2019 08:48:10.8251 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5626093-0711-47ba-8b35-08d69bc72337 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: CY4PR03MB3064 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: <dmaengine.vger.kernel.org> X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
[V2] dmaengine: axi-dmac: don't check the number of frames for alignment
|
expand
|
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)
In 2D transfers (for the AXI DMAC), the number of frames (numf) represents Y_LENGTH, and the length of a frame is X_LENGTH. 2D transfers are useful for video transfers where screen resolutions ( X * Y ) are typically aligned for X, but not for Y. There is no requirement for Y_LENGTH to be aligned to the bus-width (or anything), and this is also true for AXI DMAC. Checking the Y_LENGTH for alignment causes false errors when initiating DMA transfers. This change fixes this by checking only that the Y_LENGTH is non-zero. Fixes: 0e3b67b348b8 ("maengine: Add support for the Analog Devices AXI-DMAC DMA controller") Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> --- drivers/dma/dma-axi-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)