Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5964101pxb; Mon, 14 Feb 2022 11:50:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOr03OSTZU5uFKzd9GcgAjBNbQz5/BlBAJLchr5EcJMY9BpjVwH1flyG7aEKr/UFAfr17l X-Received: by 2002:a17:902:bf02:: with SMTP id bi2mr337086plb.139.1644868232328; Mon, 14 Feb 2022 11:50:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644868232; cv=none; d=google.com; s=arc-20160816; b=sfVeFOrrFmmPSAcUwq/C75OkVHGjh327JN5QvH44UgdBYE4cGn7FBz7P1euNoHsJJW YgbyNIRDbV/qiv+GIP8P0pqwkxGV1wvfdgCIYQH79wZnKNfQifoivBMYJ/ZJZII9nPoF GNblN7ChcVdqPdXVvE8bzCv1iVIepi04oWw15qKsyV8gI0oCJaOsNEACiXn9IZOi+Qoe 0ar40fGOucEgt9ldRiFAWgTSEFGuCCwSyQzN+hzkQawT+gPlaFr9uIZHiFEiem9UnrKE bSn6is2IP6uln6D9y/koTki9DUVF20IoCxe/nmc5GhyH79wSVpsX6gy33Qj4UbN5riA2 lB3g== 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:cc:to:subject:from:date; bh=u45NPvrhnwvCOq7H6uwb8KC4b52Z4/WQSrF2Xj8FuQE=; b=BEo8xtmGoZ1HfvM1gfvz62X0n+he+apELAOJYhI4nY2c7jV4YIkYiQwQ1B8N9MGQsO 4jur5G+Q1TcZlv09RtLT0IVboMQHz/ZBgQYHp5GaCGTKretM1woNZ4bwA+mH1Pk23Dke k2Dy8gCgPyj5WPQsL0ZKzjAqRtz5eiyFoJFDNZwEL1E3KAskZsPzkdtk1rtSUH6nYdHa m0pE05EnyI6+FlxEYVUibe4X9LCHOt3K4FECEGabtLZ0U80yLzTCM4aTEZQwCoeRXodE qVyJdtxCw26VXL57O8kETKcq7Wr9d0SnoQPzape4/jecW7lRUsLphMIQ+0wWLJAbPzwo 26oA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q4si543268pgq.613.2022.02.14.11.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:50:32 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5AD2D9FDA; Mon, 14 Feb 2022 11:33:41 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238020AbiBMTZq convert rfc822-to-8bit (ORCPT + 99 others); Sun, 13 Feb 2022 14:25:46 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238006AbiBMTZp (ORCPT ); Sun, 13 Feb 2022 14:25:45 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E608318; Sun, 13 Feb 2022 11:25:38 -0800 (PST) Date: Sun, 13 Feb 2022 19:25:26 +0000 From: Paul Cercueil Subject: Re: [PATCH v2 01/12] iio: buffer-dma: Get rid of outgoing queue To: Jonathan Cameron Cc: Michael Hennerich , Lars-Peter Clausen , Christian =?iso-8859-1?b?S/ZuaWc=?= , Sumit Semwal , Jonathan Corbet , Alexandru Ardelean , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Message-Id: In-Reply-To: <20220213185740.0322a83d@jic23-huawei> References: <20220207125933.81634-1-paul@crapouillou.net> <20220207125933.81634-2-paul@crapouillou.net> <20220213185740.0322a83d@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Jonathan, Le dim., f?vr. 13 2022 at 18:57:40 +0000, Jonathan Cameron a ?crit : > On Mon, 7 Feb 2022 12:59:22 +0000 > Paul Cercueil wrote: > >> The buffer-dma code was using two queues, incoming and outgoing, to >> manage the state of the blocks in use. >> >> 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. >> >> Since the new DMABUF based API wouldn't use the outgoing queue >> anyway, >> getting rid of it now makes the upcoming changes simpler. >> >> With this change, the IIO_BLOCK_STATE_DEQUEUED is now useless, and >> can >> be removed. >> >> v2: - Only remove the outgoing queue, and keep the incoming queue, >> as we >> want the buffer to start streaming data as soon as it is >> enabled. >> - Remove IIO_BLOCK_STATE_DEQUEUED, since it is now functionally >> the >> same as IIO_BLOCK_STATE_DONE. >> >> Signed-off-by: Paul Cercueil >> --- > > Trivial process thing but change log should be here, not above as we > don't > want it to end up in the main git log. I'm kinda used to do this now, it's the policy for sending patches to the DRM tree. I like it because "git notes" disappear after rebases and it's a pain. At least like this I don't lose the changelog. But okay, I'll change it for v3, if there's a v3. Cheers, -Paul >> drivers/iio/buffer/industrialio-buffer-dma.c | 44 >> ++++++++++---------- >> include/linux/iio/buffer-dma.h | 7 ++-- >> 2 files changed, 26 insertions(+), 25 deletions(-) >>