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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 6F6BCC433ED for ; Fri, 23 Apr 2021 13:51:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3516661460 for ; Fri, 23 Apr 2021 13:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbhDWNvl (ORCPT ); Fri, 23 Apr 2021 09:51:41 -0400 Received: from www381.your-server.de ([78.46.137.84]:55574 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbhDWNvk (ORCPT ); Fri, 23 Apr 2021 09:51:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=4AIAwecX2RapGXS7Rv2jJCw2iNl4rN/QPj81c/yd3XI=; b=Lt3HWQdThg1ZPhA64Z3fju/GpD C5bRECQ/x7KI0b+Ixr2ZxUQbZenqRuYA/VowIf5o9+53fMF7Y7nXohOLRq8gVDoPfKa0RleYlZlPE 3LgiNvb2xOXRjXCo9VojB5dg/QIP5XngvrcYwrI8Zq/x4xf8i5fucRr+VG24fP9T46cY4RqIooPuM 6iI4/JBpwudYQpVNgK115h2fhnNeg3pe9AO4zzx6WGBIcQtDAAOVQts+DygHn5Zrp9nTkRaQoJp4V 41q9VTWg5G3S4cRh+W5bf6OFGdnAmp+z9Wrkj7PfVq0gkXHWAi8lak5uVYKbQiurVia9GiGsjTsA4 q9njxzoQ==; Received: from sslproxy03.your-server.de ([88.198.220.132]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lZwCz-000ENm-Nb; Fri, 23 Apr 2021 15:51:01 +0200 Received: from [2001:a61:2a42:9501:9e5c:8eff:fe01:8578] by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZwCz-0005PG-K3; Fri, 23 Apr 2021 15:51:01 +0200 Subject: Re: [PATCH 0/4] Expand Xilinx CDMA functions To: Vinod Koul Cc: Adrian Larumbe , dmaengine@vger.kernel.org, michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org References: <20210423011913.13122-1-adrian.martinezlarumbe@imgtec.com> From: Lars-Peter Clausen Message-ID: Date: Fri, 23 Apr 2021 15:51:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.102.4/26149/Fri Apr 23 13:08:44 2021) Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org 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! > 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. 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=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 6A7C1C433ED for ; Fri, 23 Apr 2021 13:53:05 +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 11E28613C9 for ; Fri, 23 Apr 2021 13:53:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11E28613C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=metafoo.de 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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hDyPcVWHRdLIMxIQ3DjHgJEIdUAHcVhimAtTLQSQwok=; b=ZNUzOLt5aRSB9sO5yeASgIZ8y Yhsheb4dQ2fRvp0J5L85bqsWT2uy1LzAnVTo/XisZAKoK48VqvM+R+bM+j8Qg4Yl3uYaquoS+XyeX Dr0gqg3/3otkFR1mE7fmovh3KKPVSa1c2289W34Jft4JNDpQ8BVVdhHePCfX+/OIIpjd/nNDHvXNf anQ2qUs4fZ+jmNoHd3GJWKayLhospwh0SClfJUnVtpA9wH4iL4Fvto//12P5WjmU5YztyjNdVsID9 +uEVq0oJkrPH6nJjyWPOUG3HSzXQWSIManWy0SjH5OoE6QbVyZIpdCAaSeIVHmt7IsyNdTynsfduE 3ElNCnzUQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZwDD-001cB4-EL; Fri, 23 Apr 2021 13:51:15 +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 1lZwD7-001cAY-Lv for linux-arm-kernel@desiato.infradead.org; Fri, 23 Apr 2021 13:51:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=4AIAwecX2RapGXS7Rv2jJCw2iNl4rN/QPj81c/yd3XI=; b=ncvZ6c+475p6yyAHjNLbfhc2qf b/b1yqkZlCZYSSg1s6KfDvIBnMX8yUD7jIOXU3w3IhOeoitD1qUf8h97IVt6+nlClfiCgE6EV7oEl kJ2gmDQ9FQbFj30Vu8raSOqtljzkOP7maSdzpb7XaTG3grXInkXtfoxMo7uKDAdcqPuUgYbvyuRFy bxdNkG7UTqTZdO/LcSI2r0J2DPrEp/S9hvYz13rGUhjeizglu3m4rGQnhDeYJDOSTA8Lr+AR34GpJ pwcmva3bjAtRF2VbV/YuavWFEkcwcjyiKWoBtHtBZuvNH2ZaZiifNWFoiopg2x0GDUXlr782qaKmQ vtg/u5aA==; Received: from www381.your-server.de ([78.46.137.84]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lZwD5-00ES5b-59 for linux-arm-kernel@lists.infradead.org; Fri, 23 Apr 2021 13:51:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=4AIAwecX2RapGXS7Rv2jJCw2iNl4rN/QPj81c/yd3XI=; b=Lt3HWQdThg1ZPhA64Z3fju/GpD C5bRECQ/x7KI0b+Ixr2ZxUQbZenqRuYA/VowIf5o9+53fMF7Y7nXohOLRq8gVDoPfKa0RleYlZlPE 3LgiNvb2xOXRjXCo9VojB5dg/QIP5XngvrcYwrI8Zq/x4xf8i5fucRr+VG24fP9T46cY4RqIooPuM 6iI4/JBpwudYQpVNgK115h2fhnNeg3pe9AO4zzx6WGBIcQtDAAOVQts+DygHn5Zrp9nTkRaQoJp4V 41q9VTWg5G3S4cRh+W5bf6OFGdnAmp+z9Wrkj7PfVq0gkXHWAi8lak5uVYKbQiurVia9GiGsjTsA4 q9njxzoQ==; Received: from sslproxy03.your-server.de ([88.198.220.132]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lZwCz-000ENm-Nb; Fri, 23 Apr 2021 15:51:01 +0200 Received: from [2001:a61:2a42:9501:9e5c:8eff:fe01:8578] by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZwCz-0005PG-K3; Fri, 23 Apr 2021 15:51:01 +0200 Subject: Re: [PATCH 0/4] Expand Xilinx CDMA functions To: Vinod Koul Cc: Adrian Larumbe , dmaengine@vger.kernel.org, michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org References: <20210423011913.13122-1-adrian.martinezlarumbe@imgtec.com> From: Lars-Peter Clausen Message-ID: Date: Fri, 23 Apr 2021 15:51:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.102.4/26149/Fri Apr 23 13:08:44 2021) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210423_065107_225733_699DD42F X-CRM114-Status: GOOD ( 15.25 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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! > 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel