diff options
author | Jianxin Xiong <jianxin.xiong@intel.com> | 2020-10-14 19:16:01 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-10-16 00:15:43 +0300 |
commit | ac80cd17a615e472e3dcff0a5446a58540e64e6d (patch) | |
tree | 44d8ef5a2d724ef5e835c3344717d21a36265a49 /include/linux/dma-buf.h | |
parent | 73b62cdb93b68d7e2c1d373c6a411bc00c53e702 (diff) | |
download | linux-ac80cd17a615e472e3dcff0a5446a58540e64e6d.tar.xz |
dma-buf: Clarify that dma-buf sg lists are page aligned
The dma-buf API have been used under the assumption that the sg lists
returned from dma_buf_map_attachment() are fully page aligned. Lots of
stuff can break otherwise all over the place. Clarify this in the
documentation and add a check when DMA API debug is enabled.
Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1602692161-107096-1-git-send-email-jianxin.xiong@intel.com
Diffstat (limited to 'include/linux/dma-buf.h')
-rw-r--r-- | include/linux/dma-buf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index cf77cc15f4ba..03875eaed51a 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -146,7 +146,8 @@ struct dma_buf_ops { * * A &sg_table scatter list of or the backing storage of the DMA buffer, * already mapped into the device address space of the &device attached - * with the provided &dma_buf_attachment. + * with the provided &dma_buf_attachment. The addresses and lengths in + * the scatter list are PAGE_SIZE aligned. * * On failure, returns a negative error value wrapped into a pointer. * May also return -EINTR when a signal was received while being |