Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5678775rwr; Mon, 1 May 2023 09:10:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gSbqWOcDr1/jG8MvTtlx39+A+BA/KIMqkm9etChpplvvTt78i14qRrUYEmUmaSn9sEmU8 X-Received: by 2002:a17:90a:f289:b0:24d:f966:2503 with SMTP id fs9-20020a17090af28900b0024df9662503mr2004466pjb.38.1682957450142; Mon, 01 May 2023 09:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682957450; cv=none; d=google.com; s=arc-20160816; b=wdGRzLFVvlYHQHychlvehrAX3BB7fNRspAOFs1YK0+37FSJe/7bqZpMFtfaO8DdHYv RdXxyOZ9ILG/xN5j8J046ONspbSq63qoORx6hmYdPshH4VTZlxBTpMhKztjEDZiabKMw CiAkq85RW/vPivG+9PXn338E2EeMnI4u75IQTY6gyXHo9Dmj5HK5GiaOp2uQN3MT+p73 +7ysY6hr3dRpzkax70QRBn1vZ9U1OattvfyM1DKyDddAO8VriyY13r8CiRb+Gry0iTgE mUYk1x15E3UpqOU5e/h2chDklvsMoj8jq1jGBhbgqVN44EZ3/qLjszwICQF3P1o9YDYl RYsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=iqAvd60sN9sZiDbwW/i77b+MhzOYG/D5hj7tzw9Z4TA=; b=PjVgIXH2g3uEhC33plqrGLD6AW+PRelQfeT4EbvpHxH+oeXkPPL4CtXwVFxBOeDDMI ubmUhS9En/XH7/RjV9jjVOgj4NckxG1WiW8/xlk3hBcaCFYYaJSXLo3+k3L6MnhsR1x+ gy9X+B1EYjq/WLIXsCXrEHzlefgMM2wUVFtsXjQz7+dYicyQBDmOnjTVpbhGzhU9xiZi AsQXzfDMeJljr0Qdf5uAxfFkhZSymC4m24vEp3c/+zIVLmGYZ0v39vhBNx2ioPhANlV2 kziKOWOX1jmzBwD6zHJcICgdjJVyZAQWAgo2CI6AfpxOU/5k4wCOpWFm4weTaKzQqwnp BBxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nFPnn1Md; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a170902ce9000b001a4f2975d0dsi29558933plg.448.2023.05.01.09.09.57; Mon, 01 May 2023 09:10:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nFPnn1Md; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232879AbjEAQJW (ORCPT + 99 others); Mon, 1 May 2023 12:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231229AbjEAQJU (ORCPT ); Mon, 1 May 2023 12:09:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B4C6C3; Mon, 1 May 2023 09:09:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB2C860FDA; Mon, 1 May 2023 16:09:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E49CAC433D2; Mon, 1 May 2023 16:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682957358; bh=FpX1zNwZQzmzSkTPVq4PcLD3xWjdT3sXy6nTbjcK06Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nFPnn1MdR23QP0io14jeQsK8WBK8E0y7G8G37buFvBxFvbHWDdKo76elxOU+pZInP VL0YOYaYclgnWfZhctvmv9H4En4qjRie3Zbr96Ca55KFhtGPM84yPV9a0WZ6DDO3j7 rrB4o/1uO19CtnzLgJnxkQmjdwER4TWZImzkK8LKEtpqvcLwGIic1PwDIJ06j8r/ck lP3a1u9WwXwm2m1Eg8cXo+IkrcypCIsiusgB/dDJ50wnhhQK4OHqPzucqRbWKUBxA2 /t2uqEi80OMTxnUe9y42Bf40xd8zkq8NIWjOIvTtqCFBRrGyeeGm4mHydH6+9OH97O cDQFyymLTnZWQ== Date: Mon, 1 May 2023 17:25:02 +0100 From: Jonathan Cameron To: Paul Cercueil Cc: Lars-Peter Clausen , Vinod Koul , Michael Hennerich , Nuno =?UTF-8?B?U8Oh?= , Sumit Semwal , Christian =?UTF-8?B?S8O2bmln?= , linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-iio@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Subject: Re: [PATCH v3 03/11] iio: buffer-dma: Get rid of outgoing queue Message-ID: <20230501172502.125e4859@jic23-huawei> In-Reply-To: <1f63ffced9ed18309401af9a885310e1715b6538.camel@crapouillou.net> References: <20230403154800.215924-1-paul@crapouillou.net> <20230403154800.215924-4-paul@crapouillou.net> <20230416152422.477ecf67@jic23-huawei> <1f63ffced9ed18309401af9a885310e1715b6538.camel@crapouillou.net> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Apr 2023 10:08:21 +0200 Paul Cercueil wrote: > Hi Jonathan, >=20 > Le dimanche 16 avril 2023 =C3=A0 15:24 +0100, Jonathan Cameron a =C3=A9cr= it=C2=A0: > > On Mon,=C2=A0 3 Apr 2023 17:47:52 +0200 > > Paul Cercueil wrote: > > =20 > > > The buffer-dma code was using two queues, incoming and outgoing, to > > > manage the state of the blocks in use. > > >=20 > > > While this totally works, it adds some complexity to the code, > > > especially since the code only manages 2 blocks. It is much easier > > > to > > > just check each block's state manually, and keep a counter for the > > > next > > > block to dequeue. > > >=20 > > > Since the new DMABUF based API wouldn't use the outgoing queue > > > anyway, > > > getting rid of it now makes the upcoming changes simpler. > > >=20 > > > With this change, the IIO_BLOCK_STATE_DEQUEUED is now useless, and > > > can > > > be removed. > > >=20 > > > Signed-off-by: Paul Cercueil > > >=20 > > > --- > > > v2: - Only remove the outgoing queue, and keep the incoming queue, > > > as we > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 want the buffer to start streaming dat= a as soon as it is > > > enabled. > > > =C2=A0=C2=A0=C2=A0 - Remove IIO_BLOCK_STATE_DEQUEUED, since it is now= functionally > > > the > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 same as IIO_BLOCK_STATE_DONE. =20 > >=20 > > I'm not that familiar with this code, but with my understanding this > > makes > > sense.=C2=A0=C2=A0 I think it is independent of the earlier patches and= is a > > useful > > change in it's own right.=C2=A0 As such, does it make sense to pick this > > up > > ahead of the rest of the series? I'm assuming that discussion on the > > rest will take a while.=C2=A0 No great rush as too late for the coming > > merge > > window anyway. =20 >=20 > Actually, you can pick patches 3 to 6 (when all have been acked). They > add write support for buffer-dma implementations; which is a dependency > for the rest of the patchset, but they can live on their own. Remind me of that in the cover letter for v4. Thanks, Jonathan >=20 > Cheers, > -Paul