Must be called before accessing a dma_buf from the cpu in the kernel context. calls begin_cpu_access to allow exporter-specific preparations. coherency is only guaranteed in the specified range for the specified access direction.
int dma_buf_begin_cpu_access(struct dma_buf * dmabuf, size_t start, size_t len, enum dma_data_direction direction);
dmabuf
[in] buffer to prepare cpu access for.
start
[in] start of range for cpu access.
len
[in] length of range for cpu access.
direction
[in] length of range for cpu access.
Can return negative error values, returns 0 on success.