PowerVR DMA driver
More...
|
file | pvr_dma.h |
| API for utilizing the DMA with the PVR for rendering.
|
|
|
int | pvr_dma_transfer (const void *src, uintptr_t dest, size_t count, pvr_dma_type_t type, bool block, pvr_dma_callback_t callback, void *cbdata) |
| Perform a DMA transfer to the PVR RAM over 64-bit TA bus.
|
|
int | pvr_txr_load_dma (const void *src, pvr_ptr_t dest, size_t count, bool block, pvr_dma_callback_t callback, void *cbdata) |
| Load a texture using TA DMA.
|
|
int | pvr_dma_load_ta (const void *src, size_t count, bool block, pvr_dma_callback_t callback, void *cbdata) |
| Load vertex data to the TA using TA DMA.
|
|
int | pvr_dma_yuv_conv (const void *src, size_t count, bool block, pvr_dma_callback_t callback, void *cbdata) |
| Load yuv data to the YUV converter using TA DMA.
|
|
bool | pvr_dma_ready (void) |
| Is PVR DMA is inactive?
|
|
void | pvr_dma_init (void) |
| Initialize TA/PVR DMA.
|
|
void | pvr_dma_shutdown (void) |
| Shut down TA/PVR DMA.
|
|
PowerVR DMA driver
◆ pvr_dma_callback_t
typedef void(* pvr_dma_callback_t) (void *data) |
PVR DMA interrupt callback type.
Functions that act as callbacks when DMA completes should be of this type. These functions will be called inside an interrupt context, so don't try to use anything that might stall.
- Parameters
-
◆ pvr_dma_type_t
Transfer modes with TA/PVR DMA and Store Queues.
Enumerator |
---|
PVR_DMA_VRAM64 | Transfer to VRAM using TA bus.
|
PVR_DMA_VRAM32 | Transfer to VRAM using TA bus.
|
PVR_DMA_TA | Transfer to the tile accelerator.
|
PVR_DMA_YUV | Transfer to the YUV converter (TA)
|
PVR_DMA_VRAM32_SB | Transfer to/from VRAM using PVR i/f.
|
PVR_DMA_VRAM64_SB | Transfer to/from VRAM using PVR i/f.
|
◆ pvr_dma_init()
void pvr_dma_init |
( |
void | | ) |
|
◆ pvr_dma_load_ta()
int pvr_dma_load_ta |
( |
const void * | src, |
|
|
size_t | count, |
|
|
bool | block, |
|
|
pvr_dma_callback_t | callback, |
|
|
void * | cbdata ) |
Load vertex data to the TA using TA DMA.
This is essentially a convenience wrapper for pvr_dma_transfer(), so all notes that apply to it also apply here.
- Parameters
-
src | Where to copy from. Must be 32-byte aligned. |
count | The number of bytes to copy. Must be a multiple of 32. |
block | True if you want the function to block until the DMA completes. |
callback | A function to call upon completion of the DMA. |
cbdata | Data to pass to the callback function. |
- Return values
-
0 | On success. |
-1 | On failure. Sets errno as appropriate. |
- Error Conditions:
- EINPROGRESS - DMA already in progress
EFAULT - dest is not 32-byte aligned
EIO - I/O error
◆ pvr_dma_ready()
bool pvr_dma_ready |
( |
void | | ) |
|
Is PVR DMA is inactive?
- Returns
- True if there is no PVR DMA active, thus a DMA can begin or false if there is an active DMA.
◆ pvr_dma_shutdown()
void pvr_dma_shutdown |
( |
void | | ) |
|
◆ pvr_dma_transfer()
Perform a DMA transfer to the PVR RAM over 64-bit TA bus.
This function copies a block of data to the PVR or its memory via DMA. There are all kinds of constraints that must be fulfilled to actually do this, so make sure to read all the fine print with the parameter list.
If a callback is specified, it will be called in an interrupt context, so keep that in mind in writing the callback.
- Parameters
-
src | Where to copy from. Must be 32-byte aligned. |
dest | Where to copy to. Must be 32-byte aligned. |
count | The number of bytes to copy. Must be a multiple of 32. |
type | The type of DMA transfer to do (see list of modes). |
block | True if you want the function to block until the DMA completes. |
callback | A function to call upon completion of the DMA. |
cbdata | Data to pass to the callback function. |
- Return values
-
0 | On success. |
-1 | On failure. Sets errno as appropriate. |
- Error Conditions:
- EINPROGRESS - DMA already in progress
EFAULT - dest is not 32-byte aligned
EIO - I/O error
◆ pvr_dma_yuv_conv()
int pvr_dma_yuv_conv |
( |
const void * | src, |
|
|
size_t | count, |
|
|
bool | block, |
|
|
pvr_dma_callback_t | callback, |
|
|
void * | cbdata ) |
Load yuv data to the YUV converter using TA DMA.
This is essentially a convenience wrapper for pvr_dma_transfer(), so all notes that apply to it also apply here.
- Parameters
-
src | Where to copy from. Must be 32-byte aligned. |
count | The number of bytes to copy. Must be a multiple of 32. |
block | True if you want the function to block until the DMA completes. |
callback | A function to call upon completion of the DMA. |
cbdata | Data to pass to the callback function. |
- Return values
-
0 | On success. |
-1 | On failure. Sets errno as appropriate. |
- Error Conditions:
- EINPROGRESS - DMA already in progress
EFAULT - dest is not 32-byte aligned
EIO - I/O error
◆ pvr_txr_load_dma()
Load a texture using TA DMA.
This is essentially a convenience wrapper for pvr_dma_transfer(), so all notes that apply to it also apply here.
- Parameters
-
src | Where to copy from. Must be 32-byte aligned. |
dest | Where to copy to. Must be 32-byte aligned. |
count | The number of bytes to copy. Must be a multiple of 32. |
block | True if you want the function to block until the DMA completes. |
callback | A function to call upon completion of the DMA. |
cbdata | Data to pass to the callback function. |
- Return values
-
0 | On success. |
-1 | On failure. Sets errno as appropriate. |
- Error Conditions:
- EINPROGRESS - DMA already in progress
EFAULT - dest is not 32-byte aligned
EIO - I/O error