Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5945047pxb; Mon, 14 Feb 2022 11:20:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpxFiOh5C/jL+9mVRQRjgw3nb0ALUFeaErB5GZ/Sfo6Z+weLh5Th8XlIQ6K+RdQ3USntMc X-Received: by 2002:a17:902:cecb:: with SMTP id d11mr255752plg.148.1644866421170; Mon, 14 Feb 2022 11:20:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644866421; cv=none; d=google.com; s=arc-20160816; b=LdIt/LoLfLn8lXnidzpn2vzwHnjMjgutAQThw7IuYLJmBlNRAok8ZuqSJzW9Q8jvGJ 6BYlboU3qsO80Z2ZV61qBWSYZ4qO1iebR+l4dA+sUxLygaw3i83nzfFnirst8C4PeSQo NKMh8g6nY4k/WrYbeAWEVYvSa9iF5Dy34kyuSURUl6H0W3tBW5K+H+1dd4MFYYkUWIEb Js4dMpw1nc6G+S6g66pulYoB2Qb6tt6v08FCZzG4Zz/5Mg+xrWExU3eTK71oUUBkxUPy 8em4WVxCFcup1AjICf7UD2TXc/tucyOnynKr/QG0o3Kh2LTZuTjkTT1PBFjG3V8HXnRD +kPQ== 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=wd6/8hnkyeeVYJPFbuspw+5pnCK3o+1WWjMID+903z0=; b=StetTAa1Ums2RZTDjyuFD953wuBJ7M2UJvjulOPQCpK7TApfcCMHbBgZg3OM1zhfGv kB5kd0YMAbmW4i/OMiDJEjIAAgR6G3B9/3F+axOk0fc8KhGkRqwhcMYafk+wtMKqG1fo F4f6QM6baFHnH/NshIHR6oOyVYKeywOWeQpC3UCFbUi+kWnXSDAAKffYafkYQI80lRhu KSGeKmxftji4wMtwfH1oQBX9P+rN/UbkBylwfp6Lie+8NhStekdR0G0AvyFZy4KpDGBU K921+OsGoBFz1UGFfRB5AgWoyHp11nyQpuzBeOOqtcn1XWmN6u2tIWI0jIOLcMeZP7u5 RhXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mo5Qq7v0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o10si653496pgu.638.2022.02.14.11.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:20:21 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mo5Qq7v0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6E6EAA2E3; Mon, 14 Feb 2022 11:11:33 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237865AbiBMSvM (ORCPT + 99 others); Sun, 13 Feb 2022 13:51:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233785AbiBMSvK (ORCPT ); Sun, 13 Feb 2022 13:51:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C802157B36; Sun, 13 Feb 2022 10:51:04 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 79133B80B54; Sun, 13 Feb 2022 18:51:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49B95C004E1; Sun, 13 Feb 2022 18:50:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644778262; bh=ajZGYvyhJa3wD0M5n+Jzb3hdgWrFy+cw5hwyaeUdVcg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Mo5Qq7v0KbYG7JASp6Ui4ZOYm01H43aZtdgy/gGmYOwP76CbNOGbVRD36yY5i8NOt QbKyBBg0o9XSsC6foLRZHnM9LSn+99rqQqJg5GiQIT+Ynu+LkwtNTmNJt/emVj3YxK 6wo7hm0s+6N8m9up9Q/WrUoc8mHS93FTMuRELe5jzpifEalrZ7aHt416jWu0LCsmkD A+6FwVo2l3GxbEXD1JmRpzJy1nNymNMx74DnXnDcbaJgZggVN8Wf6y8dK8e9iiysbU nfG/YcNdFAxshgCK0BMSpgP54ju2d0Pvog9IcAgeANrsb2KEa1Rc3VdfnqXrhmkj3q eAGba/MMB+s/g== Date: Sun, 13 Feb 2022 18:57:40 +0000 From: Jonathan Cameron To: Paul Cercueil Cc: Michael Hennerich , Lars-Peter Clausen , Christian =?UTF-8?B?S8O2bmln?= , 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 Subject: Re: [PATCH v2 01/12] iio: buffer-dma: Get rid of outgoing queue Message-ID: <20220213185740.0322a83d@jic23-huawei> In-Reply-To: <20220207125933.81634-2-paul@crapouillou.net> References: <20220207125933.81634-1-paul@crapouillou.net> <20220207125933.81634-2-paul@crapouillou.net> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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. > drivers/iio/buffer/industrialio-buffer-dma.c | 44 ++++++++++---------- > include/linux/iio/buffer-dma.h | 7 ++-- > 2 files changed, 26 insertions(+), 25 deletions(-) >