From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04408C433ED for ; Fri, 23 Apr 2021 17:20:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6898613CD for ; Fri, 23 Apr 2021 17:20:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230482AbhDWRVW (ORCPT ); Fri, 23 Apr 2021 13:21:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:54806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbhDWRVV (ORCPT ); Fri, 23 Apr 2021 13:21:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ACEB3611BD; Fri, 23 Apr 2021 17:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619198444; bh=6nDF3Mx1RMRmqx9XA8SbAOUoFBZdUSTxHMGv17X3KeI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UZ8gyl+JM5UK7RbjYGlVTyDdRYnGeBz7XSGusTedMf9i+qbsOHa/Up9eZgChNNfbu ugqLQ0hA+sRFUWXPzVZuWGb+oSp11yuhvnM09uMYvwNeQyp3H6a5OQHMiheVcrOUQF wMLn02O5j9kTXhS7BVGdGEyyUz1lyf9FMzsrSB1aJlDizkuijSKIci2hci49WCfk5U GGNJjP0XGnQ6k+dObg/ooAPJ3HPGdMSr8J/jIa7B0w44mXu0MgoRIDLDBW3NHLrHRI 6bSz3zQGWIjaRtPsJpAPQg777zj6qJJzY8q49h4OK8XEQJ8G3MmG5+yfb88u0wMQ58 og3TkmjUfWp9A== Date: Fri, 23 Apr 2021 22:50:40 +0530 From: Vinod Koul To: Lars-Peter Clausen Cc: Adrian Larumbe , dmaengine@vger.kernel.org, michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 0/4] Expand Xilinx CDMA functions Message-ID: References: <20210423011913.13122-1-adrian.martinezlarumbe@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 23-04-21, 15:51, Lars-Peter Clausen wrote: > On 4/23/21 3:24 PM, Vinod Koul wrote: > > On 23-04-21, 11:17, Lars-Peter Clausen wrote: > > > It seems to me what we are missing from the DMAengine API is the equivalent > > > of device_prep_dma_memcpy() that is able to take SG lists. There is already > > > a memset_sg, it should be possible to add something similar for memcpy. > > You mean something like dmaengine_prep_dma_sg() which was removed? > > > Ah, that's why I could have sworn we already had this! Even at that time we had the premise that we can bring the API back if we had users. I think many have asked for it, but I havent seen a patch with user yet :) > > static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg( > > struct dma_chan *chan, > > struct scatterlist *dst_sg, unsigned int dst_nents, > > struct scatterlist *src_sg, unsigned int src_nents, > > unsigned long flags) > > > > The problem with this API is that it would work only when src_sg and > > dst_sg is of similar nature, if not then how should one go about > > copying...should we fill without a care for dst_sg being different than > > src_sg as long as total data to be copied has enough space in dst... > At least for the CDMA the only requirement is that both buffers have the > same total size. I will merge if with a user but semantics need to be absolutely clear on what is allowed and not, do I hear a volunteer ? -- ~Vinod From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BF63C433ED for ; Fri, 23 Apr 2021 17:22:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E5DB600CC for ; Fri, 23 Apr 2021 17:22:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E5DB600CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iDZTVX8Mqx3xE3hMhR1HEoIaef9zBGmZP89dYZuZZwY=; b=BJpWFi6SkvtnyeqrONWQnfQp+ dysO0I6/VX9D8DcvTGIveTG2/crSPNdhHjiHNaNpXw6QUL835HJbFBR2zGuREmh+Zyn1Wj4z0iC8N vP6ssE1qk86cSxhI4X19/QC4xDdvPNAsriaxUeSL40E4y/tL+T18GZSdktWSUYfR3icjEaLfSbTEX OdaYlKn2ULJmYdvO3k5JutcYquYEVLDZHoU+PzIQ8h6YzhHGvkujmeK/HwzOejOANQTuCwF7J1zXI okEoWm51aqiDyf/3etYclyOwasKjoWP2vngJfINUUqCMLbaeprdtHr9BW3aZAXte3OMWdLMhCR+qP gNn/8gCeA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZzU2-001zax-W5; Fri, 23 Apr 2021 17:20:51 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZzTz-001zal-TR for linux-arm-kernel@desiato.infradead.org; Fri, 23 Apr 2021 17:20:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Azcx0svsY1z0d2dG+alJBR3g28K+3xBRE2B0oMlbxFs=; b=JltAiKgcK3aG/nuANzZyJvwufy Se7OY8OuCzh5gvA3UkFZYav12ocV5A9PGV2U1NiRgW7OMnuRwpuckfQA4u+JjkKHppAtwyF3cBnB+ dz1j/vzE5PRh5UFbch/WBh7u4NyC/QirfN+sMZE8HdQPrCnwBkr8ThRt/fpH4KsDHUEq7wWI4lRX+ hHtJjbRi81tp5m1fb1yk4g6bjlMK4wVo8A8rX2SqzcHU6GkhEPZGmh8GgIL0+0QwyXnMm4UTQ7IpK LCALjguSAISMXoXLHr9a3r6mAsvJqTkRAfZF7c4dhjyVXA2aoMcnFuvhM31EC9ixXnc7Uxkyu+AVY DNcqTSKg==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZzTx-00EaUe-Cl for linux-arm-kernel@lists.infradead.org; Fri, 23 Apr 2021 17:20:46 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id ACEB3611BD; Fri, 23 Apr 2021 17:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619198444; bh=6nDF3Mx1RMRmqx9XA8SbAOUoFBZdUSTxHMGv17X3KeI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UZ8gyl+JM5UK7RbjYGlVTyDdRYnGeBz7XSGusTedMf9i+qbsOHa/Up9eZgChNNfbu ugqLQ0hA+sRFUWXPzVZuWGb+oSp11yuhvnM09uMYvwNeQyp3H6a5OQHMiheVcrOUQF wMLn02O5j9kTXhS7BVGdGEyyUz1lyf9FMzsrSB1aJlDizkuijSKIci2hci49WCfk5U GGNJjP0XGnQ6k+dObg/ooAPJ3HPGdMSr8J/jIa7B0w44mXu0MgoRIDLDBW3NHLrHRI 6bSz3zQGWIjaRtPsJpAPQg777zj6qJJzY8q49h4OK8XEQJ8G3MmG5+yfb88u0wMQ58 og3TkmjUfWp9A== Date: Fri, 23 Apr 2021 22:50:40 +0530 From: Vinod Koul To: Lars-Peter Clausen Cc: Adrian Larumbe , dmaengine@vger.kernel.org, michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 0/4] Expand Xilinx CDMA functions Message-ID: References: <20210423011913.13122-1-adrian.martinezlarumbe@imgtec.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210423_102045_588785_36BAAC69 X-CRM114-Status: GOOD ( 19.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 23-04-21, 15:51, Lars-Peter Clausen wrote: > On 4/23/21 3:24 PM, Vinod Koul wrote: > > On 23-04-21, 11:17, Lars-Peter Clausen wrote: > > > It seems to me what we are missing from the DMAengine API is the equivalent > > > of device_prep_dma_memcpy() that is able to take SG lists. There is already > > > a memset_sg, it should be possible to add something similar for memcpy. > > You mean something like dmaengine_prep_dma_sg() which was removed? > > > Ah, that's why I could have sworn we already had this! Even at that time we had the premise that we can bring the API back if we had users. I think many have asked for it, but I havent seen a patch with user yet :) > > static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_sg( > > struct dma_chan *chan, > > struct scatterlist *dst_sg, unsigned int dst_nents, > > struct scatterlist *src_sg, unsigned int src_nents, > > unsigned long flags) > > > > The problem with this API is that it would work only when src_sg and > > dst_sg is of similar nature, if not then how should one go about > > copying...should we fill without a care for dst_sg being different than > > src_sg as long as total data to be copied has enough space in dst... > At least for the CDMA the only requirement is that both buffers have the > same total size. I will merge if with a user but semantics need to be absolutely clear on what is allowed and not, do I hear a volunteer ? -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel