Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp222220lqr; Wed, 5 Jun 2024 04:19:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVroRub17kv5e4Q83aVrtOerak8KODhf8sS7g87jkKin2Cw8cMlNgKEwqqhSzaJP3AEICaCgwd+xPKkje7qFK+zInah6ysi4xzAPfKSJw== X-Google-Smtp-Source: AGHT+IGr8abVDalSbJpIM7NTR4hq8vXc6ynZJ2cFTvF2SldXZaIdK43APnd+on1M62kTA2SS7qQF X-Received: by 2002:a05:6a20:2588:b0:1b0:2b96:5f9 with SMTP id adf61e73a8af0-1b2b7025eb1mr2647214637.36.1717586379013; Wed, 05 Jun 2024 04:19:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717586378; cv=pass; d=google.com; s=arc-20160816; b=S2VgrGHMwMfQZ5VpVd9E9CwhVdfIXur6fHKSuXMcPGKJ/csLKIs591kW9huQUJYw7x hz+ZP7+MRau2dPKNRtPOYyJpN41ZdCKetKfUEfp6zEIMC8aF6kVrprPR8Di29uPOsWSP DqNipXNCCU0k9xXXDylbMwKzQCw2qjns/EifuoDIl6HGMgrFLwQzE1mVQmC4xUmyFIxw 9GNHnQaBKluzwn3UY6WUZKXAAnQUeHCsraMEGaSJ3mDu/tVpL44++r80OFSrhGLETDUC WptdUM8DjKcWqhXj7B2BNKLQltI379QxfUii+8OQ+NqnFiYM/IG9grb9flfKoxNuk0UN JvIw== ARC-Message-Signature: i=2; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=lbF3Hr41nIth/kjABYAo6ELsT9zfo9W62/2gY+j3W6A=; fh=gIPS46kF5oiVtxHOjYLqoXg82bH7WL+T2QnpDaGuRdA=; b=oUMVwq2TAEC8+AXaNEvby2ZiwQykh4kBl9B2xlAauLb5oF0h9AeBzLhM6I0PDCdnjL byruoG+oUrLeDHiApw2cuuSnmx9KHPBXdh9Y8AlQ05IGqMcNcaN/D/JAW/kyCd5wwfym RiV1NEd2eEUOBwK3bxmV/SY46LAwdTsPBaUPVn20VJ1no4HaacGbfbBI8UQUvmro68GY xirhsXxlEWVg+7Gjzw7GwnlRXrXa3jx5NFO3apc5skRI5IBK9HqmdbSsqZbohXWTlF9j ndENSRdin+6Pt8j8Kg4u7HbFUAMLsLH5i9uG/3kEsX1CrEsVd4rPeT3DHjDOz2Xhm4qM OY1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=fnNXiWCz; arc=pass (i=1 spf=pass spfdomain=crapouillou.net dkim=pass dkdomain=crapouillou.net dmarc=pass fromdomain=crapouillou.net); spf=pass (google.com: domain of linux-kernel+bounces-202247-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-70265acd0b7si6315755b3a.139.2024.06.05.04.19.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 04:19:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202247-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=fnNXiWCz; arc=pass (i=1 spf=pass spfdomain=crapouillou.net dkim=pass dkdomain=crapouillou.net dmarc=pass fromdomain=crapouillou.net); spf=pass (google.com: domain of linux-kernel+bounces-202247-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net 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 CF689B24BFC for ; Wed, 5 Jun 2024 11:16:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05D74192B83; Wed, 5 Jun 2024 11:15:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="fnNXiWCz" Received: from aposti.net (aposti.net [89.234.176.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C717514B974; Wed, 5 Jun 2024 11:15:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.234.176.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717586156; cv=none; b=tI5qNrbKzzEr1IS5CLGnDht1AlolBma0XptRx36nA8HeMw6MjEgaVC/kSH88cMyZlyU0PiMby/t+SvwAryzJBw7G8EDjSk5S3rKCuTPZvr3n17XfKm7djCgOJATPFMKFLrFTjaDDJNHkH+U6PByB6su6En92LTLLWB9wFgG5DDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717586156; c=relaxed/simple; bh=j23cpuGAemJTmamOXD92cbvxQHnwkWvNJTIkvGKjv2U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EyyjgJFXVDVkY9ihX+6uxmb4JnUuA1oDV5my9RE1oeJ8x/I8BeszBU4phpwUPSvoNsa2Y9hVBObALJKOt/rnzH53k1XJhxfFkZHFHDUzJvreyt1jXD7fRGLni0YVnbyb2CS5smlFBRuy0A9K9e/Qe/cLUcB2joMR/f8gQU0kCnc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=crapouillou.net; spf=pass smtp.mailfrom=crapouillou.net; dkim=pass (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b=fnNXiWCz; arc=none smtp.client-ip=89.234.176.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=crapouillou.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crapouillou.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1717585738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lbF3Hr41nIth/kjABYAo6ELsT9zfo9W62/2gY+j3W6A=; b=fnNXiWCz+piHjs3cCFKX5GI5TCn9Y2prcen/ET7kh9pye5qm+pIgUBf/O3bV3BnNT1h/2u NyMwYH4qGWbWGr1IYazRbY6rtGSVJoiMLXi/3PHX/GFa4ahJSbYFIZ5go1Y3p1tTrpunF0 gFAQsaj5oi/revV7EdeAexrsKXH2qHg= From: Paul Cercueil To: Jonathan Cameron , Lars-Peter Clausen , Vinod Koul , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= Cc: Jonathan Corbet , Nuno Sa , linux-iio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Paul Cercueil Subject: [PATCH v10 0/6] iio: new DMABUF based API v10 Date: Wed, 5 Jun 2024 13:08:39 +0200 Message-ID: <20240605110845.86740-1-paul@crapouillou.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Jonathan, Here is a revised (and hopefully final?) version of my DMABUF patchset. This v10 removes the extra "flags" parameter of dmaengine_prep_peripheral_dma_vec(), and adds kernel doc to the function as Vinod requested. As Nuno upstreamed support for output buffers, I (slightly) modified patch 5/6 and now output buffers are supported with the DMABUF API. All I did was remove a "fail if output" check really. This was based on next-20240605. Changelog: - [1/6]: - Add kernel doc to dmaengine_prep_peripheral_dma_vec() - Remove extra flags parameter - [2/6]: - Use the new function prototype (without the extra prep_flags). - [5/6]: - Remove extra flags parameter to dmaengine_prep_peripheral_dma_vec() - Add support for TX transfers Cheers, -Paul Paul Cercueil (6): dmaengine: Add API function dmaengine_prep_peripheral_dma_vec() dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec iio: core: Add new DMABUF interface infrastructure iio: buffer-dma: Enable support for DMABUFs iio: buffer-dmaengine: Support new DMABUF based userspace API Documentation: iio: Document high-speed DMABUF based API Documentation/iio/iio_dmabuf_api.rst | 54 ++ Documentation/iio/index.rst | 1 + drivers/dma/dma-axi-dmac.c | 40 ++ drivers/iio/Kconfig | 1 + drivers/iio/buffer/industrialio-buffer-dma.c | 180 ++++++- .../buffer/industrialio-buffer-dmaengine.c | 62 ++- drivers/iio/industrialio-buffer.c | 462 ++++++++++++++++++ include/linux/dmaengine.h | 33 ++ include/linux/iio/buffer-dma.h | 31 ++ include/linux/iio/buffer_impl.h | 30 ++ include/uapi/linux/iio/buffer.h | 22 + 11 files changed, 896 insertions(+), 20 deletions(-) create mode 100644 Documentation/iio/iio_dmabuf_api.rst -- 2.43.0