vg_lite_map
function
Description:
This function is used to map the memory appropriately for a particular buffer. For some operating systems, it is used to get proper translation to the physical or logical address of the buffer needed by the GPU.
To use a frame buffer directly as a target buffer:
Wrap a vg_lite_buffer_t structure around the buffer
Call the kernel to map the supplied logical or physical address into hardware accessible memory
For example, if you know the logical address of the frame buffer, set the memory
field of the vg_lite_buffer_t structure with that address and call this function. If you know the physical address, set the memory
field to NULL and program the address
field with the physical address.
Syntax:
vg_lite_error_t vg_lite_map (
vg_lite_buffer_t *buffer,
vg_lite_map_flag_t flag,
int32_t fd
);
Parameters:
Name |
Description |
---|---|
|
Pointer to a buffer structure that was filled in by calling the vg_lite_allocate() function |
|
Enumerate the |
|
File descriptor for |
Returns:
Returns VG_LITE_SUCCESS
if the function is successful. See vg_lite_error_t enum for other return codes.
Parent topic:Pixel buffer functions