Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.shareddma

PROTOCOLS

DmaNotifyCallback

Defined in fuchsia.hardware.shareddma/shareddma.fidl

Callback

Request

NameType
state DmaState

Response

NameType

SharedDma

Defined in fuchsia.hardware.shareddma/shareddma.fidl

GetBufferPosition

Returns the current position within memory where is the DMA has written to or read from.

Request

NameType
channel_id uint32

Response

NameType
position uint32

GetTransferSize

It must always be assumed that the DMA is in the process of transfering this amount of data (accounting for warp around) into or from memory, hence for: Device to memory DMAs, it is not safe to read this amount past the buffer position. Memory to device DMAs, it is not safe to write this amount before the buffer position.

Request

NameType
channel_id uint32

Response

NameType
available_size uint32

InitializeAndGetBuffer

Initializes and provides a VMO for memory source or destination. Only supports device to memory and memory to device DMAs. The provided id is opaque and HW specific. The id implicitly defines the direction of the DMA (biderectional DMAs are not supported yet). Transfer sizes and alignment are managed within the shared DMA driver.

Request

NameType
channel_id uint32
type DmaType
size uint32

Response

NameType
s zx/status
vmo handle<vmo>

SetNotifyCallback

Specifies a callback for notifications of state change.

Request

NameType
channel_id uint32
cb DmaNotifyCallback

Response

NameType
s zx/status

Start

Start DMA

Request

NameType
channel_id uint32

Stop

Stop DMA

Request

NameType
channel_id uint32

STRUCTS

ENUMS

DmaState

Type: uint32

Defined in fuchsia.hardware.shareddma/shareddma.fidl

NameValueDescription
COMPLETED 1
FAILED 2

DmaType

Type: uint32

Defined in fuchsia.hardware.shareddma/shareddma.fidl

NameValueDescription
REGULAR 1
CYCLIC 2