diff options
author | Dmitry Osipenko | 2022-10-17 20:22:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-09-23 11:11:08 +0200 |
commit | b4539ff7a48d898bfb9c97c54bee8fd568db9d8b (patch) | |
tree | aa51e3cd3f5d6bf1c95cde04b21bde489f33fea6 /include/linux | |
parent | 6ca28642dd9adfd0f7a1ad2eae29763377f2c6fe (diff) |
dma-buf: Add unlocked variant of attachment-mapping functions
[ Upstream commit 19d6634d8789573a9212ce78dbb4348ffd4f7f78 ]
Add unlocked variant of dma_buf_map/unmap_attachment() that will
be used by drivers that don't take the reservation lock explicitly.
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221017172229.42269-3-dmitry.osipenko@collabora.com
Stable-dep-of: a2cb9cd6a394 ("misc: fastrpc: Fix incorrect DMA mapping unmap request")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dma-buf.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 71731796c8c3..9c31f1f430d8 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -627,6 +627,12 @@ int dma_buf_begin_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction dir); int dma_buf_end_cpu_access(struct dma_buf *dma_buf, enum dma_data_direction dir); +struct sg_table * +dma_buf_map_attachment_unlocked(struct dma_buf_attachment *attach, + enum dma_data_direction direction); +void dma_buf_unmap_attachment_unlocked(struct dma_buf_attachment *attach, + struct sg_table *sg_table, + enum dma_data_direction direction); int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long); |