Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3456076imu; Fri, 18 Jan 2019 10:40:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Y3dwfqxHC4cFvQ/aFUJq6x8PEj8cExKC9GbnCZ5k9dxVwMJZHmAHkelr2z4h3vgosXRL/ X-Received: by 2002:a17:902:a58a:: with SMTP id az10mr20582326plb.10.1547836845756; Fri, 18 Jan 2019 10:40:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547836845; cv=none; d=google.com; s=arc-20160816; b=t3NsTEWLL7QsWQen7/YY6qboiDrCuBQ0SvEBl8JbH2d6Gl0NRAlTdAQGG+irl6xYEp VOH15LwwZOQmO/ghGZaGfeCq1eK3rOrVd3kHf4l8zZsrUuD582Sk51m7KpBCw0jlS/Iw sOvnHj4A5jnwH3grvolZH9MqWM4a4F87pCwtc26MbOaXkJ6n1ZvfKqUIJFZvbmnoScCc uEILv3BL5VdZcBpihnQKBvIYE/RpxTdhCLxukWEnUFTcVpliPmlEztrbigbFyLzmPcDz DWydTqSH12e1CdWsM2fGSpCu9lqMjpAmkXpYNMLsowOtLVf+IF6a/5AT4g8ADYIEts4r /cnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature; bh=S11CjbrynODDGC+d2hMLWrtJxRkcR6H+Di2DJk1pWyQ=; b=S5HTFJRV47bTf8muHDeEAMuH4gAL2rRmtlvEdn49cfwsq9czQA6uYRnT0o6C675TRF EJMH5f+ZaebMQxbpfuPLZo+4hQ6RTugyAF8HBX7Rjm/nOmvAwOXwEFdAkeWMwmEtA8zD PflY2uU1MEAZBldiy49NSH53BByke4TlzD7gKT7Z+M1frzsQNtlQkGPKDvxAwARE7xyH vGJCwxLY5KmjmJHTtp5HQknPlh9gJdrKwfsCkXkTjButURJ0WvR/GbzqVbaUFn/3vvig p2MJDaRGmUVzxi6J9OT1Ns+d3RObyDSRX/kV+zwZ0Ub1yE4OOM6GDacvXBem1LXpaSil TxFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=JPMweWD5; dkim=pass header.i=@codeaurora.org header.s=default header.b=bWmLcNJI; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si5394341pgg.1.2019.01.18.10.40.30; Fri, 18 Jan 2019 10:40:45 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=JPMweWD5; dkim=pass header.i=@codeaurora.org header.s=default header.b=bWmLcNJI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729192AbfARSiH (ORCPT + 99 others); Fri, 18 Jan 2019 13:38:07 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:36258 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728622AbfARSiE (ORCPT ); Fri, 18 Jan 2019 13:38:04 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 127F76095F; Fri, 18 Jan 2019 18:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547836684; bh=wraxb8tqxboMY5dWAZ4NH9qu+s9ojH3IOewaLdOWADc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JPMweWD5FWYiplTL90Qedt8tVZj+Mkfv2T5gSWftDxP5GqJBpN6/JHsrcVeHpCyVt zErXghLZcvNLCbz8WM88yjJQa0npqISb1huRtng9x9nq9aL+itALuUrb5eEO5tqDbk JIbhL6H2zRwPVKzfymbTWjQAT5BbE4Xb+D5Lvyy8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from lmark-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: lmark@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 699C3608FF; Fri, 18 Jan 2019 18:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1547836683; bh=wraxb8tqxboMY5dWAZ4NH9qu+s9ojH3IOewaLdOWADc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bWmLcNJI5dNDlYzuIGRxPHibM47e1IaIvOxyYTdcXMJJzaa8yNS8t6hNjtysEyJHe bqWoJY98HTufwdr7H2xBvz3khJQYJrb8LcIg1CUp2Kix2ip1fh3oFeHRQxQLG4Qe0C k8FwSfQZnrR9TzMyO3PNJ7b7qnA2kr9mpKuciReU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 699C3608FF Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=lmark@codeaurora.org From: Liam Mark To: labbott@redhat.com, sumit.semwal@linaro.org Cc: 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, Liam Mark Subject: [PATCH 3/4] dma-buf: add support for mapping with dma mapping attributes Date: Fri, 18 Jan 2019 10:37:46 -0800 Message-Id: <1547836667-13695-4-git-send-email-lmark@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1547836667-13695-1-git-send-email-lmark@codeaurora.org> References: <1547836667-13695-1-git-send-email-lmark@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/linux/dma-buf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 58725f890b5b..59bf33e09e2d 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -308,6 +308,8 @@ struct dma_buf { * @dev: device attached to the buffer. * @node: list of dma_buf_attachment. * @priv: exporter specific attachment data. + * @dma_map_attrs: DMA mapping attributes to be used in + * dma_buf_map_attachment() and dma_buf_unmap_attachment(). * * This structure holds the attachment information between the dma_buf buffer * and its user device(s). The list contains one attachment struct per device @@ -323,6 +325,7 @@ struct dma_buf_attachment { struct device *dev; struct list_head node; void *priv; + unsigned long dma_map_attrs; }; /** -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project