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=-8.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 6CA74C433E2 for ; Sun, 30 Aug 2020 11:10:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D69220BED for ; Sun, 30 Aug 2020 11:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598785837; bh=mu9wJFt6mGD5wvJQYVN4F/aho0AV/Y6T7Cnvd31Std8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=sEq1G+d/FVAfHurDpwVI7Xq4SnJ5J+4OIlTQkDi9uDwUBZNzWvuLQXWWsL8d4v1RM PxOaX+UjmbC6vAi6u156MqH803y5ek3VP9ugFc/jvxOv/eVEKhtPgH5sCO5I15mP2f /06l45ByJlBas2FAZO/0mJds/rAs+1IM7PXkvTus= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725941AbgH3LKg (ORCPT ); Sun, 30 Aug 2020 07:10:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:55612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725845AbgH3LKf (ORCPT ); Sun, 30 Aug 2020 07:10:35 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E2FD20757; Sun, 30 Aug 2020 11:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598785835; bh=mu9wJFt6mGD5wvJQYVN4F/aho0AV/Y6T7Cnvd31Std8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lwgFODbPwprBd1PN4CgTfaXa7fubifZKH7xXVNpY52jIpbhScSVeJdmde9LzpU87N Klo/+s30c/94lYSR0ydNQRWTBKkiDmkG6BS02+id61j4Z8TK/0cmO6nA2mPoDzJXai uIvntISqEcqAjCITLyh3w7qMMSFLGKdrL86n5OtQ= Date: Sun, 30 Aug 2020 12:10:30 +0100 From: Jonathan Cameron To: Lars-Peter Clausen Cc: Alexandru Ardelean , Hartmut Knaack , Peter Meerwald-Stadler , Alexandru Ardelean , linux-iio Subject: Re: [PATCH] iio: buffer-dmaengine: adjust `bytes_used` with residue info Message-ID: <20200830121030.66420067@archlinux> In-Reply-To: References: <20200826052011.13348-1-lars@metafoo.de> <20200829165134.3361315a@archlinux> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sat, 29 Aug 2020 20:30:04 +0200 Lars-Peter Clausen wrote: > On 8/29/20 5:51 PM, Jonathan Cameron wrote: > > On Wed, 26 Aug 2020 09:36:39 +0300 > > Alexandru Ardelean wrote: > > > >> On Wed, Aug 26, 2020 at 8:22 AM Lars-Peter Clausen wrote: > >>> From: Alexandru Ardelean > >>> > >>> A transfer may fall shorter than the bytes in the block. > >>> This information is available in the residue from the DMA engine, so we can > >>> compute actual `bytes_used` with that by subtracting the residue. > >>> > >> This was in my pipeline as well [obviously]. > >> Thanks :) > >> > >>> Signed-off-by: Alexandru Ardelean > >>> Signed-off-by: Lars-Peter Clausen > > "smells" like a fix. Is it? Or are we looking at something that > > only matters for some future hardware, or an optmization? > > > > If it's a fix, where is the fixes tag? > > It's a feature :) > > When we first added the IIO DMA buffer support this API did not exist in > dmaengine. So for the longest time most DMA drivers did not have the > ability to report short transfers. Primarily because in many cases the > hardware doesn't even support it. > > Now with this patch the IIO DMA buffer implementation supports systems > where the DMA can generate short transfers. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > > - Lars >