From: Alistair Popple <apopple@nvidia.com>
To: "Christian König" <christian.koenig@amd.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Simona Vetter" <simona.vetter@ffwll.ch>,
"Matthew Brost" <matthew.brost@intel.com>,
"Vivek Kasireddy" <vivek.kasireddy@intel.com>,
"Dongwon Kim" <dongwon.kim@intel.com>,
"Kevin Tian" <kevin.tian@intel.com>,
"Xu Yilun" <yilun.xu@linux.intel.com>,
"Karl Mehltretter" <kmehltretter@gmail.com>,
"Baolu Lu" <baolu.lu@linux.intel.com>,
"Felix Kuehling" <felix.kuehling@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
intel-xe@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
linux-rdma@vger.kernel.org, iommu@lists.linux.dev,
"Keith Busch" <kbusch@kernel.org>, "Jens Axboe" <axboe@kernel.dk>,
"Christoph Hellwig" <hch@lst.de>,
"Sagi Grimberg" <sagi@grimberg.me>,
linux-nvme@lists.infradead.org,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Mina Almasry" <almasrymina@google.com>,
netdev@vger.kernel.org, "Alexey Kardashevskiy" <aik@amd.com>,
zhipingz@meta.com, treding@nvidia.com, jhubbard@nvidia.com,
chaitanyak@nvidia.com, "Jason Gunthorpe" <jgg@ziepe.ca>,
"Leon Romanovsky" <leon@kernel.org>
Cc: Alistair Popple <apopple@nvidia.com>
Subject: [PATCH v3 22/24] dma-buf: Let the exporter select mapping type at pin/map
Date: Fri, 20 Nov 2026 16:56:00 +1100 [thread overview]
Message-ID: <20261120-dma_mapping_type_v4-v3-22-c0183a409bdf@nvidia.com> (raw)
In-Reply-To: <20261120-dma_mapping_type_v4-v3-0-c0183a409bdf@nvidia.com>
Currently an attachment is always mapped with the first entry of the
match set negotiated at attach. The match set only records which types
both sides could use. Which of them the exporter can actually use time
depends on where the buffer is and on the other attachments at the time
an importer first pins or maps.
However currently an exporter offering more than one mapping type has
no way to select the mapping type to use. To allow that add an optional
dma_buf_ops.select_mapping() callback.
dma_buf_pin() and the map functions call it under the dma_resv lock
before the exporter's own pin or map callback. The exporter returns the
index of the entry to use given the current placement and attachments,
or -EBUSY if the attachment cannot be used without disturbing a mapping
that cannot be invalidated.
To avoid ping-ponging of buffers and other sub-optimal behaviour the
selection is not allowed to change without existing attachments being
explicitly invalidated by the exporter.
The core enforces this by recording the selection on first
map/pin and not calling it again across subsequent unmap/map until
dma_buf_invalidate_mappings() has been called on the attachment. This
means an importer remapping cannot bounce the buffer between placements
as the type cannot change unless the exporter invalidates first. An
attachment that is never invalidated keeps its type for life.
Mappings are unmapped via the returned mapping type to ensure the
correct unmap function is called. This is because whilst mappings should
no longer be used after an invalidate the mapping itself can outlive the
invalidate. Thus the attachment selection may have changed between map
and unmap.
Signed-off-by: Alistair Popple <apopple@nvidia.com>
---
Changes for v3:
- Return a type specific struct and unmap through it to ensure the
correct unmap callbacks are called.
---
drivers/dma-buf/dma-buf-mapping-internal.h | 29 +++++
drivers/dma-buf/dma-buf-mapping.c | 68 ++++++++++-
drivers/dma-buf/dma-buf.c | 179 +++++++++++++++++++----------
include/linux/dma-buf-mapping.h | 9 +-
include/linux/dma-buf.h | 35 ++++++
5 files changed, 256 insertions(+), 64 deletions(-)
diff --git a/drivers/dma-buf/dma-buf-mapping-internal.h b/drivers/dma-buf/dma-buf-mapping-internal.h
new file mode 100644
index 000000000000..e1337db2b205
--- /dev/null
+++ b/drivers/dma-buf/dma-buf-mapping-internal.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * DMA-buf mapping type internals shared by dma-buf.c and dma-buf-mapping.c.
+ * Nothing in here is for exporters or importers.
+ */
+#ifndef __DMA_BUF_MAPPING_INTERNAL_H__
+#define __DMA_BUF_MAPPING_INTERNAL_H__
+
+#include <linux/dma-buf.h>
+#include <linux/dma-buf-mapping.h>
+
+/*
+ * Internal: Selection is made by exporters through &dma_buf_ops.select_mapping
+ * in dma_buf_pin() or map paths. Importers never call this.
+ */
+int dma_buf_mapping_select(struct dma_buf_attachment *attach);
+void dma_buf_mapping_unselect(struct dma_buf_attachment *attach,
+ bool was_selected);
+
+/*
+ * Internal: Records the selection was successful after the pin or map that
+ * followed dma_buf_mapping_select() succeeds.
+ */
+static inline void dma_buf_mapping_commit(struct dma_buf_attachment *attach)
+{
+ attach->selected = true;
+}
+
+#endif /* __DMA_BUF_MAPPING_INTERNAL_H__ */
diff --git a/drivers/dma-buf/dma-buf-mapping.c b/drivers/dma-buf/dma-buf-mapping.c
index cf3d25aa3884..248ac81f616b 100644
--- a/drivers/dma-buf/dma-buf-mapping.c
+++ b/drivers/dma-buf/dma-buf-mapping.c
@@ -10,6 +10,8 @@
#include <linux/overflow.h>
#include <linux/align.h>
+#include "dma-buf-mapping-internal.h"
+
#define MAX_SG_ENT_SZ ALIGN_DOWN(UINT_MAX, PAGE_SIZE)
static struct scatterlist *fill_sg_entry(struct scatterlist *sgl, size_t length,
@@ -276,7 +278,8 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_free_sgt, "DMA_BUF");
* importer entry of the same type that the type's match() callback accepts.
* Every such pair is recorded in @args->attach->matches, so the match set
* preserves the exporter's priority. The first entry is the default returned
- * by dma_buf_attach_map_type().
+ * by dma_buf_attach_map_type() until &dma_buf_ops.select_mapping chooses
+ * otherwise at pin or map time.
*
* Because the exporter list is walked in order, the exporter controls the
* priority of mapping types.
@@ -329,6 +332,69 @@ int dma_buf_match_mapping(struct dma_buf_match_args *args,
}
EXPORT_SYMBOL_NS_GPL(dma_buf_match_mapping, "DMA_BUF");
+/**
+ * dma_buf_mapping_select - Let the exporter choose the type to map with
+ * @attach: Attachment about to be pinned or mapped
+ *
+ * Called with the dma_resv lock held by dma_buf_pin() and the map functions.
+ * The first call after attach, and after each dma_buf_invalidate_mappings(),
+ * calls &dma_buf_ops.select_mapping to pick the mapping type. Exporters without
+ * the callback get the first entry. Subsequent calls return the previous
+ * choice unchanged unless the mapping has been invalidated. This is to ensure
+ * the mapping type cannot change between unmap and remap.
+ *
+ * The choice only takes effect once the caller's pin or map has succeeded.
+ *
+ * Returns: 0 on success or the exporter's error, typically -EBUSY when the
+ * attachment cannot be served without disturbing a mapping that cannot be
+ * invalidated.
+ */
+int dma_buf_mapping_select(struct dma_buf_attachment *attach)
+{
+ int idx = 0;
+
+ dma_resv_assert_held(attach->dmabuf->resv);
+
+ if (attach->selected)
+ return 0;
+
+ if (WARN_ON(!attach->nr_matches))
+ return -EINVAL;
+
+ if (attach->dmabuf->ops->select_mapping) {
+ idx = attach->dmabuf->ops->select_mapping(attach);
+ if (idx < 0)
+ return idx;
+ if (WARN_ON(idx >= attach->nr_matches))
+ return -EINVAL;
+ }
+
+ attach->selected_idx = idx;
+ return 0;
+}
+
+/**
+ * dma_buf_mapping_unselect - Undo a selection that established nothing
+ * @attach: Attachment whose pin or map just failed
+ * @was_selected: attach->selected before the failed pin or map began
+ *
+ * A pin or map that fails after dma_buf_mapping_select() may reopen the
+ * choice only if it was the one that made it. A selection that predates the
+ * call belongs to a live pin or mapping and must survive, otherwise the next
+ * pin or map would reselect under it without an invalidate.
+ */
+void dma_buf_mapping_unselect(struct dma_buf_attachment *attach,
+ bool was_selected)
+{
+ dma_resv_assert_held(attach->dmabuf->resv);
+
+ if (was_selected)
+ return;
+
+ attach->selected = false;
+ attach->selected_idx = 0;
+}
+
static void
dma_buf_sgt_finish_match(struct dma_buf_match_args *args,
const struct dma_buf_mapping_match *exp,
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 20e397683826..8124e7bcd5c2 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -37,6 +37,8 @@
#define CREATE_TRACE_POINTS
#include <trace/events/dma_buf.h>
+#include "dma-buf-mapping-internal.h"
+
/*
* dmabuf->name must be accessed with holding dmabuf->name_lock.
* we need to take the lock around the tracepoint call itself where
@@ -1176,16 +1178,27 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_detach, "DMA_BUF");
int dma_buf_pin(struct dma_buf_attachment *attach)
{
struct dma_buf *dmabuf = attach->dmabuf;
+ bool selected = attach->selected;
int ret = 0;
WARN_ON(!attach->importer_ops);
dma_resv_assert_held(dmabuf->resv);
- if (dmabuf->ops->pin)
+ ret = dma_buf_mapping_select(attach);
+ if (ret)
+ return ret;
+
+ if (dmabuf->ops->pin) {
ret = dmabuf->ops->pin(attach);
+ if (ret) {
+ dma_buf_mapping_unselect(attach, selected);
+ return ret;
+ }
+ }
- return ret;
+ dma_buf_mapping_commit(attach);
+ return 0;
}
EXPORT_SYMBOL_NS_GPL(dma_buf_pin, "DMA_BUF");
@@ -1210,46 +1223,21 @@ void dma_buf_unpin(struct dma_buf_attachment *attach)
}
EXPORT_SYMBOL_NS_GPL(dma_buf_unpin, "DMA_BUF");
-/**
- * dma_buf_map_sgt - Returns the scatterlist table of the attachment;
- * mapped into _device_ address space. Is a wrapper for map_dma_buf() of the
- * dma_buf_ops.
- * @attach: [in] attachment whose scatterlist is to be returned
- * @direction: [in] direction of DMA transfer
- *
- * Returns sg_table containing the scatterlist to be returned; returns ERR_PTR
- * on error. May return -EINTR if it is interrupted by a signal.
- *
- * On success, the DMA addresses and lengths in the returned scatterlist are
- * PAGE_SIZE aligned.
- *
- * A mapping must be unmapped by using dma_buf_unmap_sgt(). Note that
- * the underlying backing storage is pinned for as long as a mapping exists,
- * therefore users/importers should not hold onto a mapping for undue amounts of
- * time.
- *
- * Important: Dynamic importers must wait for the exclusive fence of the struct
- * dma_resv attached to the DMA-BUF first.
- */
-struct sg_table *dma_buf_map_sgt(struct dma_buf_attachment *attach,
- enum dma_data_direction direction)
+/* The SGT type must have been selected for the attachment already */
+static struct dma_buf_sgt_mapping *
+__dma_buf_map_sgt(struct dma_buf_attachment *attach,
+ enum dma_data_direction direction)
{
- const struct dma_buf_mapping_sgt_exp_ops *sgt_exp_ops;
+ const struct dma_buf_mapping_match *match =
+ dma_buf_attach_map_type(attach);
+ const struct dma_buf_mapping_sgt_exp_ops *sgt_exp_ops =
+ dma_buf_get_sgt_ops(attach);
struct dma_buf_sgt_mapping *mapping;
- struct sg_table *sg_table;
signed long ret;
- might_sleep();
-
- if (WARN_ON(!attach || !attach->dmabuf))
- return ERR_PTR(-EINVAL);
-
- sgt_exp_ops = dma_buf_get_sgt_ops(attach);
if (WARN_ON(!sgt_exp_ops))
return ERR_PTR(-EINVAL);
- dma_resv_assert_held(attach->dmabuf->resv);
-
if (dma_buf_pin_on_map(attach)) {
ret = attach->dmabuf->ops->pin(attach);
/*
@@ -1264,11 +1252,12 @@ struct sg_table *dma_buf_map_sgt(struct dma_buf_attachment *attach,
mapping = sgt_exp_ops->map_dma_buf(attach, direction);
if (!mapping)
mapping = ERR_PTR(-ENOMEM);
- if (IS_ERR(mapping)) {
- sg_table = ERR_CAST(mapping);
+ if (IS_ERR(mapping))
goto error_unpin;
- }
- mapping->base.match = dma_buf_attach_map_type(attach);
+
+ /* A mapping handed out again must have been made under the same entry */
+ WARN_ON_ONCE(mapping->base.match && mapping->base.match != match);
+ mapping->base.match = match;
/*
* Importers with static attachments don't wait for fences.
@@ -1280,11 +1269,6 @@ struct sg_table *dma_buf_map_sgt(struct dma_buf_attachment *attach,
if (ret < 0)
goto error_unmap;
}
- sg_table = dma_buf_wrap_sg_table(mapping);
- if (IS_ERR(sg_table)) {
- ret = PTR_ERR(sg_table);
- goto error_unmap;
- }
if (IS_ENABLED(CONFIG_DMA_API_DEBUG)) {
struct scatterlist *sg;
@@ -1302,16 +1286,93 @@ struct sg_table *dma_buf_map_sgt(struct dma_buf_attachment *attach,
}
}
}
- return sg_table;
+ return mapping;
error_unmap:
sgt_exp_ops->unmap_dma_buf(attach, mapping, direction);
- sg_table = ERR_PTR(ret);
+ mapping = ERR_PTR(ret);
error_unpin:
if (dma_buf_pin_on_map(attach))
attach->dmabuf->ops->unpin(attach);
+ return mapping;
+}
+
+/* Tears @mapping down through the entry it was made with */
+static void __dma_buf_unmap_sgt(struct dma_buf_attachment *attach,
+ struct dma_buf_sgt_mapping *mapping,
+ enum dma_data_direction direction)
+{
+ const struct dma_buf_mapping_sgt_exp_ops *sgt_exp_ops;
+
+ if (WARN_ON(dma_buf_mapping_type_of(&mapping->base) !=
+ &dma_buf_mapping_sgt_type))
+ return;
+ sgt_exp_ops = container_of(mapping->base.match->exp_ops,
+ struct dma_buf_mapping_sgt_exp_ops, ops);
+
+ sgt_exp_ops->unmap_dma_buf(attach, mapping, direction);
+
+ if (dma_buf_pin_on_map(attach))
+ attach->dmabuf->ops->unpin(attach);
+}
+
+/**
+ * dma_buf_map_sgt - Returns the scatterlist table of the attachment;
+ * mapped into _device_ address space. Is a wrapper for map_dma_buf() of the
+ * dma_buf_ops.
+ * @attach: [in] attachment whose scatterlist is to be returned
+ * @direction: [in] direction of DMA transfer
+ *
+ * Returns sg_table containing the scatterlist to be returned; returns ERR_PTR
+ * on error. May return -EINTR if it is interrupted by a signal.
+ *
+ * On success, the DMA addresses and lengths in the returned scatterlist are
+ * PAGE_SIZE aligned.
+ *
+ * A mapping must be unmapped by using dma_buf_unmap_sgt(). Note that
+ * the underlying backing storage is pinned for as long as a mapping exists,
+ * therefore users/importers should not hold onto a mapping for undue amounts of
+ * time.
+ *
+ * Important: Dynamic importers must wait for the exclusive fence of the struct
+ * dma_resv attached to the DMA-BUF first.
+ */
+struct sg_table *dma_buf_map_sgt(struct dma_buf_attachment *attach,
+ enum dma_data_direction direction)
+{
+ struct dma_buf_sgt_mapping *mapping;
+ struct sg_table *sg_table;
+ bool selected;
+ int ret;
+
+ might_sleep();
+
+ if (WARN_ON(!attach || !attach->dmabuf))
+ return ERR_PTR(-EINVAL);
+
+ dma_resv_assert_held(attach->dmabuf->resv);
+
+ selected = attach->selected;
+ ret = dma_buf_mapping_select(attach);
+ if (ret)
+ return ERR_PTR(ret);
+
+ mapping = __dma_buf_map_sgt(attach, direction);
+ if (IS_ERR(mapping)) {
+ sg_table = ERR_CAST(mapping);
+ } else {
+ sg_table = dma_buf_wrap_sg_table(mapping);
+ if (IS_ERR(sg_table))
+ __dma_buf_unmap_sgt(attach, mapping, direction);
+ }
+
+ if (IS_ERR(sg_table))
+ dma_buf_mapping_unselect(attach, selected);
+ else
+ dma_buf_mapping_commit(attach);
+
return sg_table;
}
EXPORT_SYMBOL_NS_GPL(dma_buf_map_sgt, "DMA_BUF");
@@ -1358,7 +1419,6 @@ void dma_buf_unmap_sgt(struct dma_buf_attachment *attach,
struct sg_table *sg_table,
enum dma_data_direction direction)
{
- const struct dma_buf_mapping_sgt_exp_ops *sgt_exp_ops;
struct dma_buf_sgt_mapping *mapping;
might_sleep();
@@ -1369,15 +1429,8 @@ void dma_buf_unmap_sgt(struct dma_buf_attachment *attach,
dma_resv_assert_held(attach->dmabuf->resv);
mapping = dma_buf_unwrap_sg_table(sg_table);
- if (WARN_ON(dma_buf_mapping_type_of(&mapping->base) !=
- &dma_buf_mapping_sgt_type))
- return;
- sgt_exp_ops = container_of(mapping->base.match->exp_ops,
- struct dma_buf_mapping_sgt_exp_ops, ops);
- sgt_exp_ops->unmap_dma_buf(attach, mapping, direction);
- if (dma_buf_pin_on_map(attach))
- attach->dmabuf->ops->unpin(attach);
+ __dma_buf_unmap_sgt(attach, mapping, direction);
}
EXPORT_SYMBOL_NS_GPL(dma_buf_unmap_sgt, "DMA_BUF");
@@ -1460,6 +1513,10 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_attach_revocable, "DMA_BUF");
*
* Importers are free to request a new mapping in parallel as this function
* returns.
+ *
+ * This also allows an attachment's mapping type to change as the core keeps
+ * the type chosen by &dma_buf_ops.select_mapping until the attachment has been
+ * invalidated here to avoid buffer ping-pong.
*/
void dma_buf_invalidate_mappings(struct dma_buf *dmabuf)
{
@@ -1467,10 +1524,14 @@ void dma_buf_invalidate_mappings(struct dma_buf *dmabuf)
dma_resv_assert_held(dmabuf->resv);
- list_for_each_entry(attach, &dmabuf->attachments, node)
- if (attach->importer_ops &&
- attach->importer_ops->invalidate_mappings)
- attach->importer_ops->invalidate_mappings(attach);
+ list_for_each_entry(attach, &dmabuf->attachments, node) {
+ if (!attach->importer_ops ||
+ !attach->importer_ops->invalidate_mappings)
+ continue;
+
+ attach->selected = false;
+ attach->importer_ops->invalidate_mappings(attach);
+ }
}
EXPORT_SYMBOL_NS_GPL(dma_buf_invalidate_mappings, "DMA_BUF");
diff --git a/include/linux/dma-buf-mapping.h b/include/linux/dma-buf-mapping.h
index 850a76ffba14..0a1c2934a932 100644
--- a/include/linux/dma-buf-mapping.h
+++ b/include/linux/dma-buf-mapping.h
@@ -86,7 +86,9 @@ struct dma_buf_mapping_type {
/**
* struct dma_buf_mapping - header of a mapping made through an attachment
- * @match: The match set entry the mapping was made with
+ * @match: The entry of &dma_buf_attachment.matches the mapping was made with.
+ * The mapping is torn down through it, whatever the attachment has
+ * selected by then.
*
* A mapping is an object allocated by whoever produces it, the exporter for
* the SGT type, embedding this header. The core fills the header in once the
@@ -125,13 +127,12 @@ int dma_buf_match_mapping(struct dma_buf_match_args *args,
* dma_buf_attach_map_type - The match this attachment is mapped with
* @attach: the attachment
*
- * Returns: the entry of @attach->matches in force for the attachment: the
- * exporter's default, which is the first entry.
+ * Returns: the entry of @attach->matches the attachment is mapped with.
*/
static inline const struct dma_buf_mapping_match *
dma_buf_attach_map_type(const struct dma_buf_attachment *attach)
{
- return &attach->matches[0];
+ return &attach->matches[attach->selected_idx];
}
/*
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index b1d1a239fa27..c60d9f96ec36 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -254,6 +254,30 @@ struct dma_buf_ops {
*/
int (*match_mapping)(struct dma_buf_match_args *args);
+ /**
+ * @select_mapping:
+ *
+ * Called before the type's map callback with the dma_resv lock held
+ * from dma_buf_pin() or the map functions to choose which entry of
+ * &dma_buf_attachment.matches maps this attachment. The exporter decides the
+ * buffer's final placement here taking all live mappings and pinned attachments
+ * into account.
+ *
+ * The core records the choice and does not ask again until the exporter
+ * has delivered &dma_buf_attach_ops.invalidate_mappings to this
+ * attachment. The exporter must therefore keep the recorded type
+ * servable - moving the buffer somewhere the selected type cannot be
+ * served from requires invalidating first. Attachments that cannot
+ * be invalidated keep their first choice for life.
+ *
+ * Optional. Without it the first entry of the match set is used.
+ *
+ * Returns: the index into &dma_buf_attachment.matches to use, or a
+ * negative errno. -EBUSY means the attachment cannot be served without
+ * disturbing a mapping that cannot be invalidated.
+ */
+ int (*select_mapping)(struct dma_buf_attachment *attach);
+
/**
* @single_exporter_match:
*
@@ -482,6 +506,15 @@ struct dma_buf_attach_ops {
* entry is the exporter's default; dma_buf_attach_map_type()
* returns the entry the attachment is mapped with.
* @nr_matches: Number of valid entries in @matches.
+ * @selected_idx: Index into @matches of the entry the attachment is mapped
+ * with, chosen by &dma_buf_ops.select_mapping at the first pin
+ * or map and kept, enforced by the core, until
+ * &dma_buf_attach_ops.invalidate_mappings is delivered to this
+ * attachment. Zero, the exporter's default, before the first
+ * selection.
+ * @selected: True while @selected_idx is in force, i.e. the next pin or map
+ * must not select again; cleared by dma_buf_invalidate_mappings(),
+ * or when the pin or map that made the selection fails.
*
* This structure holds the attachment information between the dma_buf buffer
* and its user device(s). The list contains one attachment struct per device
@@ -501,6 +534,8 @@ struct dma_buf_attachment {
void *priv;
struct dma_buf_mapping_match matches[DMA_BUF_MAX_MATCHES];
unsigned int nr_matches;
+ unsigned int selected_idx;
+ bool selected;
};
/**
--
2.54.0
next prev parent reply other threads:[~2026-11-20 5:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 5:55 [PATCH v3 00/24] DMA-buf mapping types Alistair Popple
2026-11-20 5:55 ` [PATCH v3 01/24] treewide: Rename dma_buf_(un)map_attachment() to dma_buf_(un)map_sgt() Alistair Popple
2026-11-20 5:55 ` [PATCH v3 02/24] dma-buf: Introduce DMA-buf mapping types Alistair Popple
2026-11-20 5:55 ` [PATCH v3 03/24] dma-buf: Add the SGT DMA mapping type Alistair Popple
2026-11-20 5:55 ` [PATCH v3 04/24] dma-buf: Negotiate the mapping type in dma_buf_dynamic_attach() Alistair Popple
2026-11-20 5:55 ` [PATCH v3 05/24] dma-buf: Route SGT related actions through the attachment's mapping type Alistair Popple
2026-11-20 5:55 ` [PATCH v3 06/24] dma-buf: Allow single exporter drivers to avoid the match_mapping function Alistair Popple
2026-11-20 5:55 ` [PATCH v3 07/24] dma-buf: Convert exporters allocating a table per map to the SGT mapping type Alistair Popple
2026-11-20 5:55 ` [PATCH v3 08/24] iommufd/selftest: Convert the test exporter " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 09/24] dma-buf: Convert exporters keeping a table per attachment " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 10/24] drm: Convert drm_gem_map_dma_buf() and its users " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 11/24] drm/xe/dma-buf: Use " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 12/24] drm/amdgpu: " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 13/24] udmabuf: Convert to " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 14/24] drm/omapdrm: " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 15/24] accel/ivpu: Convert the userptr exporter " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 16/24] drm/vmwgfx: Use match_mapping instead of dummy calls Alistair Popple
2026-11-20 5:55 ` [PATCH v3 17/24] dma-buf: Convert dma_buf_phys_vec_to_sgt() and its users to the SGT mapping type Alistair Popple
2026-11-20 5:55 ` [PATCH v3 18/24] iio: buffer: convert to use " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 19/24] functionfs: " Alistair Popple
2026-11-20 5:55 ` [PATCH v3 20/24] dma-buf: Remove unused SGT stuff from the common structures Alistair Popple
2026-11-20 5:55 ` [PATCH v3 21/24] dma-buf: Add kunit tests for mapping type Alistair Popple
2026-11-20 5:56 ` Alistair Popple [this message]
2026-11-20 5:56 ` [PATCH v3 23/24] dma-buf: Add dma_buf_mapping_map() returning a type-tagged mapping and implement it for sgt Alistair Popple
2026-11-20 5:56 ` [PATCH v3 24/24] dma-buf: Add kunit tests for mapping type selection Alistair Popple
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261120-dma_mapping_type_v4-v3-22-c0183a409bdf@nvidia.com \
--to=apopple@nvidia.com \
--cc=aik@amd.com \
--cc=alexander.deucher@amd.com \
--cc=almasrymina@google.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=axboe@kernel.dk \
--cc=baolu.lu@linux.intel.com \
--cc=chaitanyak@nvidia.com \
--cc=christian.koenig@amd.com \
--cc=davem@davemloft.net \
--cc=dongwon.kim@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=edumazet@kernel.org \
--cc=felix.kuehling@amd.com \
--cc=hch@lst.de \
--cc=horms@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=kbusch@kernel.org \
--cc=kevin.tian@intel.com \
--cc=kmehltretter@gmail.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matthew.brost@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sagi@grimberg.me \
--cc=simona.vetter@ffwll.ch \
--cc=sumit.semwal@linaro.org \
--cc=thomas.hellstrom@linux.intel.com \
--cc=treding@nvidia.com \
--cc=vivek.kasireddy@intel.com \
--cc=yilun.xu@linux.intel.com \
--cc=zhipingz@meta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox