---
name: "dma_buf_begin_cpu_access"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/dma_buf_begin_cpu_access"
---

# dma\_buf\_begin\_cpu\_access(9)

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.

## NAME

dma\_buf\_begin\_cpu\_access - 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.

## SYNOPSIS

**int dma\_buf\_begin\_cpu\_access(struct dma\_buf \*** *dmabuf***, size\_t** *start***, size\_t** *len***, enum dma\_data\_direction** *direction***);**

## ARGUMENTS

*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.

## DESCRIPTION

Can return negative error values, returns 0 on success.

## COPYRIGHT
