Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp80085rdb; Thu, 21 Dec 2023 03:29:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfDXzFs9DlCHcYLb9aFdXMZ3FzhdibNaOyPiC+BhOdb8RtRb+qn2R/Sc/9Lg+da1mNM5lc X-Received: by 2002:a05:6a00:a0f:b0:6ce:6246:2a17 with SMTP id p15-20020a056a000a0f00b006ce62462a17mr13859205pfh.3.1703158157104; Thu, 21 Dec 2023 03:29:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703158157; cv=none; d=google.com; s=arc-20160816; b=ojR88iMnXxYPIiRV0+vz6c3omK+WH/PMaFI8ftB1QOdgGj0bvqnODc7T0/gj01jS2r sUQwamRM9eRlgLduqvbg7/5/6xufE2R4/tFzBXqg/zjYrBVsoz1/RPCirn0XiJuZ0Pfw jaUfqksW6gQwp3Isuz98AXf1hrTZZFElVJPlE61djBfrGxHwaGNHGoToXmT7tmQlGXU6 CyTXD9s3gGfXD3WBe32tJlCABByUcWQubZV2MZAqW/rYM4ZIjEY4HD6EUMHq0uvdqbcx 8HlOnBzQ1IVMlMTHT99P9JZhw2wUgksHVWSDyTxiTgq4Yc5MYl0+aMZudadUS1esh2zU JRsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=RyaD0hMfhH7FQz/L56YNonMUFimR+TsZN4snvRUwBZQ=; fh=WVp0xvjyzHxwiLMPTCrB9Hw30PrcT/SNQ5z/y+ClnXk=; b=lIsS+v6NGHqFyKax5xiNynnXwYOY+p7soCxwwA6o1UiXtaLLB4NYa+0gwPkB/2l0E3 spxZswj5w77D/CUgqGzxI0lgm1h1/7uNZGoWc+FIna8+d22A/AZFvECJ+TdNDsY4yQWM 6TrRl2cSymjx7sHMNDfZkh6/fHeA1DdaVNKONBJw8/91+yatz7zaUYR+4BXhuznr2pbf KiNlPOHV3hBtg6QuSfFsvqMs48+MiaqR+cVLol5dNzv0LO9tcEB2sw8qMC3mB4gZGTlR 9Fj857i9vo7fTQAHktOvPhui3+IPLapZx9blX8v52RwFoGDeIOaRLbHEFLAy2/lVCqjq 99HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XzDgUtMI; spf=pass (google.com: domain of linux-kernel+bounces-8284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8284-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h10-20020a056a00218a00b006d96cf2f124si1395466pfi.363.2023.12.21.03.29.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 03:29:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XzDgUtMI; spf=pass (google.com: domain of linux-kernel+bounces-8284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8284-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CB263B21B1E for ; Thu, 21 Dec 2023 11:29:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E0A06D1D2; Thu, 21 Dec 2023 11:28:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XzDgUtMI" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DE34697A6; Thu, 21 Dec 2023 11:28:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4D01C433C8; Thu, 21 Dec 2023 11:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703158138; bh=bn5TsZbZFAMzqugkbLLCAXDLCBCCddsOuTyKJNmW4j0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XzDgUtMIiyHvWufYrnuorriuX6ec0aKd75XvN4bvVRUU8h7RRq//v3hQxVZeIn26t DUfgKuHgBaG/HJamZr9h39OxZ2rPlqxn7ZQqwV8EbzYwFCvU6c/vR6aRYx1pngrWtm beBI35fawoXFmrakG6xJcSGxsszgy8mcmHJ2+25ZF+yJ7maIwhGu3MA2UGW3o0nQpm aLdOCtkcZ/FwpFUOsjWQBplirFA+rE0UXR7Z3lfqSiubbMx7FCsZ+vgu9IiqlwgUST YXW3Wg0+Xnf+lU3O0oRcaCI6LSrpv75aXN2tKalbPE6Aoxqmo9R9hGBBcGr+Wbymf7 sCwalRVuuimSg== Date: Thu, 21 Dec 2023 11:28:41 +0000 From: Jonathan Cameron To: Paul Cercueil Cc: Lars-Peter Clausen , Sumit Semwal , Christian =?UTF-8?B?S8O2bmln?= , Vinod Koul , Jonathan Corbet , linux-doc@vger.kernel.org, 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, Nuno =?UTF-8?B?U8Oh?= , Michael Hennerich Subject: Re: [PATCH v5 1/8] iio: buffer-dma: Get rid of outgoing queue Message-ID: <20231221112841.1de85482@jic23-huawei> In-Reply-To: <20231219175009.65482-2-paul@crapouillou.net> References: <20231219175009.65482-1-paul@crapouillou.net> <20231219175009.65482-2-paul@crapouillou.net> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 19 Dec 2023 18:50:02 +0100 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. > > Signed-off-by: Paul Cercueil > I've applied this in interests in reducing the outstanding set of patches and because it stands fine as on its own. Applied to the togreg branch of iio.git and pushed out as testing. Note this is now almost certainly 6.9 material given timing. Jonathan