Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1059460rdb; Tue, 30 Jan 2024 06:56:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwPT0jPsVAfMK5XXjwZbIvlp/OjMoS4CPGBCcHoaMRE3ps6D+rsQRgWEQhwkAH44B7XcRE X-Received: by 2002:a05:6402:27d1:b0:55f:1311:bebb with SMTP id c17-20020a05640227d100b0055f1311bebbmr4007351ede.26.1706626597975; Tue, 30 Jan 2024 06:56:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706626597; cv=pass; d=google.com; s=arc-20160816; b=E69dpeRY0X6bkeSTewsznn1m+76sYKN7Ef0+hyTeR6JWY6+ek0DPrbfyJsxn2zPdZA wFvZYDAx7XnX9QrktYBdtTnnJbFn08Ew2uVarmExi0rB2jBML8L4rlZOr2TxBrIOKOur KtLN+yKSTVKm27SvSAY38Y/wMrEfwWiAzZYGpUY/ysnMHGz2W1y9qfqIcj/D+TRl+iaE yEcVshwx3bZFLi4UVEfwNXObrFE4/Zr0X4jaKsRIXlEaQR8FAH6wcZ8K0hyHIA02zdVB 9KEesVLTV4wfLK327TiOc7/2xAxb21p4ycCV3dzhHHvR9bRA1PZr2Exk3xBnmIXLed5n o+3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=bpht1JVVU83PUsSOfehDgTwxwvmRcn3OoCMGwiYoquM=; fh=/+KYdRx97WmqTv2ld5IykQ05NF3wTKqUhATcgwUf2Ug=; b=bRmn2vq4VUxqPCLI3AL1MeIxRMKYKCMv+o7Qzrzza4NtzcnL1FN67RUu9ezM+vJaNB w1E5T2icFpRbJdBdS9lqhSlOiXwdCFrcFVOHi1LbkwwFkVItkJ4soU9XNJTInB1BZ4jS BGUX14uYFWEulFNY3XZ+7kTuOXuanK9d/BD+mvCvk4fwKWVo6iNmHioHS7pyp21zSMb5 9Z3sB7TKURCOEn3xZrF4f6t01o0ORftns1T9vfN/iw87/3o2ZOHaJcmqbFJgR0ztq+ox 9U8nNIibhZLDz/1i0aO8b7yUb4wW26Qr+ofiIJEnHt2Ebg2cifaL+n2Qr4ijf6pqd2oZ rVCg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=FlVy2dkm; arc=pass (i=1 dkim=pass dkdomain=ffwll.ch); spf=pass (google.com: domain of linux-kernel+bounces-44405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44405-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id el15-20020a056402360f00b0055f49c505f8si472356edb.433.2024.01.30.06.56.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 06:56:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=FlVy2dkm; arc=pass (i=1 dkim=pass dkdomain=ffwll.ch); spf=pass (google.com: domain of linux-kernel+bounces-44405-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44405-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2B05C1F26301 for ; Tue, 30 Jan 2024 10:41:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 780F5657BC; Tue, 30 Jan 2024 10:40:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="FlVy2dkm" Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 ED7A765BB0 for ; Tue, 30 Jan 2024 10:40:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706611244; cv=none; b=peTBu1AGopTIOlkBeK0aTeRQ6kr6VqAuAwndB+cvM+Z9DF1UxSxGsx3NC8OYnr/fRoI7ruJWO9hjSCuFNJ4uY8QXqeP6Bn4JKQqySbnX4Wd94rh7T1ZSsKgsCx+ozOAR92IIgn8QzdzDcgCzDuNUYfPQwTqP6+Az+1TOCJfKx3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706611244; c=relaxed/simple; bh=ETdl8coLEmvqaxOFLDsn4/glTC/AoKOwDmqO3n9zkAw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BXh7cgphduDcy7vX0UQfs98/7VwjQQevUPFTFayHO7M0OPGQUFfMSE2rjGB5VdZsGJ5PO3keCGw27V+7l8C5Mi1ewU9YUzfWWr5mNyEUwGzx4OTbtlf3g2/5X724n47iczXCzlHUiYQYSLzXn9vcEX8AKCItHEHxbLmymzzJrhA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch; spf=none smtp.mailfrom=ffwll.ch; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b=FlVy2dkm; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ffwll.ch Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-55f35ad4d36so192827a12.0 for ; Tue, 30 Jan 2024 02:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; t=1706611241; x=1707216041; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:from:to:cc:subject:date:message-id:reply-to; bh=bpht1JVVU83PUsSOfehDgTwxwvmRcn3OoCMGwiYoquM=; b=FlVy2dkmMTm3VdInTzYzAVaHF+mck+lV2jkocL6K9V/yoLpfW8TxGh+hPuPO8Gc/jP jsoY9okfXGxxpxdPmN1WiKHmImOHqvN0HYVkdWHUSbYNl7RhPq16oxRAP7oI294IDWX6 tgDOrKnuBQONnsmTBh56esl8g6dVEx1XwOYk4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706611241; x=1707216041; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bpht1JVVU83PUsSOfehDgTwxwvmRcn3OoCMGwiYoquM=; b=Y+zhfZaGv0O6313m/3mCjq18eLWeHndoupm32mfUCHIpMemJUPPjfgLOQJvuU9xB5G 9Sn31mWBfCj8TLZQzgSnQq3Ze5gmgQGcQYkZQXvwm043drRk+nP3KdVGIz5jZuoBGIBk WEOWD9jF07lD6VcN38OcjtxQ41r+lTpcDc19dWVLemp9Scb1NJMenercmJpeLuFrxklC TMrUOjHH8zD73wFWnaO+eOxJFwptYIOsXNrmEtakEvCvHHv/AGJoMOSgVNGBWV4/VcoI +7xFwnmyvdPua5Z6HP/f0qTtPp+RveTsTAUURiBOBgV/b907ZD7bT1/MW6c8g0BHRwI9 G65Q== X-Gm-Message-State: AOJu0YyHq4ByZuaC5FUE7wLydVrwBZ4SXTdVTXBp9AEhRmk52GT9ZIk2 j0FglGhjsvOARScko2gcJas1XAA3+2AdG+t12L1h1dLDLWlKqnHljFYeSqPsLZ4= X-Received: by 2002:aa7:d04f:0:b0:55f:99:fb30 with SMTP id n15-20020aa7d04f000000b0055f0099fb30mr3223522edo.4.1706611241253; Tue, 30 Jan 2024 02:40:41 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id es19-20020a056402381300b0055cffd3fd32sm4749393edb.68.2024.01.30.02.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 02:40:40 -0800 (PST) Date: Tue, 30 Jan 2024 11:40:38 +0100 From: Daniel Vetter To: Paul Cercueil Cc: Christian =?iso-8859-1?Q?K=F6nig?= , Christian =?iso-8859-1?Q?K=F6nig?= , Greg Kroah-Hartman , Jonathan Corbet , Sumit Semwal , Jonathan Cameron , Nuno =?iso-8859-1?Q?S=E1?= , Michael Hennerich , linux-usb@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Christoph Hellwig Subject: Re: [Linaro-mm-sig] Re: [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access() Message-ID: Mail-Followup-To: Paul Cercueil , Christian =?iso-8859-1?Q?K=F6nig?= , Christian =?iso-8859-1?Q?K=F6nig?= , Greg Kroah-Hartman , Jonathan Corbet , Sumit Semwal , Jonathan Cameron , Nuno =?iso-8859-1?Q?S=E1?= , Michael Hennerich , linux-usb@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Christoph Hellwig References: <85a89505-edeb-4619-86c1-157f7abdd190@amd.com> <0fe2755fb320027234c086bcc88fd107855234c5.camel@crapouillou.net> <577501f9-9d1c-4f8d-9882-7c71090e5ef3@amd.com> <7928c0866ac5b2bfaaa56ad3422bedc9061e0f7b.camel@crapouillou.net> <2ac7562c-d221-409a-bfee-1b3cfcc0f1c6@amd.com> <7eec45a95808afe94ac65a8518df853356ecf117.camel@crapouillou.net> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7eec45a95808afe94ac65a8518df853356ecf117.camel@crapouillou.net> X-Operating-System: Linux phenom 6.6.11-amd64 On Tue, Jan 30, 2024 at 10:48:23AM +0100, Paul Cercueil wrote: > Le mardi 30 janvier 2024 ? 10:23 +0100, Christian K?nig a ?crit?: > > ?I would say we start with the DMA-API by getting away from sg_tables > > to something cleaner and state oriented.? > > FYI I am already adding a 'dma_vec' object in my IIO DMABUF patchset, > which is just a dead simple > > struct dma_vec { > dma_addr_t addr; > size_t len; > }; > > (The rationale for introducing it in the IIO DMABUF patchset was that > the "scatterlist" wouldn't allow me to change the transfer size.) > > So I believe a new "sg_table"-like could just be an array of struct > dma_vec + flags. Yeah that's pretty much the proposal I've seen, split the sg table into input data (struct page + len) and output data (which is the dma_addr_t + len you have above). The part I don't expect to ever happen, because it hasn't the past 20 or so years, is that the dma-api will give us information about what is needed to keep the buffers coherency between various devices and the cpu. -Sima -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch