Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4411699imu; Sat, 19 Jan 2019 08:52:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN5+7DW1LOkXy7P6pzZYSuGdH+hb1k2R5vbECn8dabb08tvH9Gu6glf9zqMJwVtCeJFgOI14 X-Received: by 2002:a65:500c:: with SMTP id f12mr21771339pgo.226.1547916747852; Sat, 19 Jan 2019 08:52:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547916747; cv=none; d=google.com; s=arc-20160816; b=v3XVDfMuRoI9JZH4gIhTJclOYAllQW0cMGtZZvCcDNxq7GoCMGEUg86mSA8XcSFjXy DQwNCTuzlNDvGopsFCPcJlcfyWgEIxEWJl6g/4ebEAshG1Pz3208Qg/2iqKQSjQ76rfD 2RbFmNbcrmfjhyaIBCl6YwhmYFKmRFIbs0kKidxTH+DLv7Pcgk/owo8jWCte67aUHaXw 4g5tbWDyQfu3mHQh5jZgJWOVT9opQyBR4PObPvCmAQiMchmfJI8CVEMtGScBehvePtf2 ICCJeC47yXTO/OLime+0JCybPcSB8W80Ecfdo8bjHI5EQusqGixeUl5EwnA4jy/0DvJ9 +5lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=LJnWQwUwnX0sbOUmpB4Cr+Rh7vD7qTFlUyS9FK9e7vM=; b=zzLAzMr2NuWB72i8bAWH5mkahccSv1oYWsOUk2YWinT26XiObE9K3RRhMmX4kXEtmd DGmYkIt2BgHTkuVLCthHScKD63fpAt8OSmyEgTE/eDxlSBmHpI7OKosHvM1EY30OwlUK bfiBbz+yfrPgL1Oc7MZKwVJLlYX2qW+PJ+WO5ppzjYv7eEHSqtSfWEE+Pr4/sLTyNyun Y09gCptYnjbbOvR9wzL1q/C9yfI7kXsCytwAp+pzPrXjGn5R5aATMHjWlO+i81quuypv TfAQa2HRRhdS9Uxrvw6xKl+7Vd3V2dn7odGjB+pRWv05sR9j9k/Y3s6U/qIvjXst7M6r ehjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si7528616pgi.218.2019.01.19.08.52.08; Sat, 19 Jan 2019 08:52:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728548AbfASQup (ORCPT + 99 others); Sat, 19 Jan 2019 11:50:45 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:36859 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbfASQup (ORCPT ); Sat, 19 Jan 2019 11:50:45 -0500 Received: by mail-qt1-f196.google.com with SMTP id t13so18697854qtn.3 for ; Sat, 19 Jan 2019 08:50:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LJnWQwUwnX0sbOUmpB4Cr+Rh7vD7qTFlUyS9FK9e7vM=; b=C92NXrcn6GsFJEBc8DHIDpp58wV9XDPKB+HlHk+jnjwf7gARZuD3zT3f7Kdm8jGq0c F7xFZGSZLkLNkhh4k1wQClolXop1DhskW9Bm4vErkm1IUKXevEfnrLMdtLS7gmdc2r3q r/DNi/LfMdWTQztEGsMVae7qHReKLZclYifJebExZGb0ORlHJtq7j3czH+HQj/o4dJfR e3x4oQG3p9NYuEJbQ46kGdi5NcPrS1JOxHLdt29j9hUgTTjUkTssHMVuQXFOoFQvusK4 afmBhI5AK3Kkj2YjuVuzGJc+s9V5SpobZ1HMQromqXtj+QEI+NxAdAdAezvmhhupJyJb NsLg== X-Gm-Message-State: AJcUukc7ekmVo0WwHb7vrA25vixS+nLIST5Aqaky970v2ujP+YY0K50z xWZW/5OhjA9tBj488kKi3vJnbw== X-Received: by 2002:a0c:9d81:: with SMTP id s1mr19916830qvd.82.1547916644301; Sat, 19 Jan 2019 08:50:44 -0800 (PST) Received: from ?IPv6:2601:602:9800:dae6::fb21? ([2601:602:9800:dae6::fb21]) by smtp.gmail.com with ESMTPSA id c48sm62635843qtd.9.2019.01.19.08.50.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Jan 2019 08:50:43 -0800 (PST) Subject: Re: [PATCH 3/4] dma-buf: add support for mapping with dma mapping attributes To: Christoph Hellwig , Liam Mark Cc: sumit.semwal@linaro.org, arve@android.com, tkjos@android.com, maco@android.com, joel@joelfernandes.org, christian@brauner.io, devel@driverdev.osuosl.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, afd@ti.com, john.stultz@linaro.org References: <1547836667-13695-1-git-send-email-lmark@codeaurora.org> <1547836667-13695-4-git-send-email-lmark@codeaurora.org> <20190119102527.GA17723@infradead.org> From: Laura Abbott Message-ID: <7ae73c39-9049-bcf6-775f-b0817ba0ec5f@redhat.com> Date: Sat, 19 Jan 2019 08:50:41 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190119102527.GA17723@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/19/19 2:25 AM, Christoph Hellwig wrote: > On Fri, Jan 18, 2019 at 10:37:46AM -0800, Liam Mark wrote: >> Add support for configuring dma mapping attributes when mapping >> and unmapping memory through dma_buf_map_attachment and >> dma_buf_unmap_attachment. >> >> Signed-off-by: Liam Mark > > And who is going to decide which ones to pass? And who documents > which ones are safe? > > I'd much rather have explicit, well documented dma-buf flags that > might get translated to the DMA API flags, which are not error checked, > not very well documented and way to easy to get wrong. > I'm not sure having flags in dma-buf really solves anything given drivers can use the attributes directly with dma_map anyway, which is what we're looking to do. The intention is for the driver creating the dma_buf attachment to have the knowledge of which flags to use. Thanks, Laura