Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
78
11.2.3 Function Documentation
11.2.3.1 MM_ERROR mmlGdcSysInitializeDriver(MML_GDC_SYSINIT_INFO
∗
pDriverInitInfo)
Used to initialize the driver at startup. Applications must initialize the driver before they can call other driver
functions.
Note:
The 2D core hardware must be in default state, i.e. no registers may be altered between HW reset and the call of
mmlGdcSysInitializeDriver(). The only except exception are the LockUnlock registers, which can be used by a safety
driver to protect specific streams against non-privileged access. The registers related to these streams may also be
altered by the safety driver before mmlGdcSysInitializeDriver() is called.
Parameters
pDriverInitInfo
Can be NULL or a pointer to a MML_GDC_SYSINIT_INFO driver initialization structure.
Return values
MML_OK
Successfully initialized driver
MML_ERR_GDC_SYS_DEVICE_INVALID_PARAMETER
GfxPll parameter out of range.
MML_ERR_GDC_SYS_DEVICE_ALREADY_INITIALIZED
already initialized.
MML_ERR_GDC_SYS_DEVICE_INIT_FAILED
Initialization of the driver failed.
11.2.3.2 MM_ERROR mmlGdcSysSetInstructionBuffer(void
∗
address, MM_U32 size)
Assign internal VRAM for command queue
Note:
The command queue is required to buffer the render instructions to allow a non-blocking API handling. The required
instruction buffer size depends on the amount and complexity of the render instructions and which synchronization
instructions are used. A recommended size is 8 kByte. To get information about the instruction buffer usage an
application can use the mmlGdcConfigGetAttribute function with attribute
MML_GDC_CONFIG_ATTR_MIN_INSTRUCTION_BUFFER. The function must be called after
mmlGdcSysInitializeDriver before any render or display operations. A reconfiguration of the instruction buffer is not
possible.
Parameters
address
Start address in the VRAM. Must be 32 byte aligned.
size
Size in bytes of the buffer to assign, must be DWORD (4 Bytes) aligned, the function will return
an error otherwise. The application must ensure that the address as well as the address plus
size are within the range of the 2D core VRAM memory, the function will not do this.
Return values
MML_OK
on success, otherwise the related error code
11.2.3.3 MM_ERROR mmlGdcSysUninitializeDriver( void )
Used to shutdown the driver. Applications must uninitialize the driver after calling mmlGdcSysInitializeDriver.
Return values
MML_OK
Successfully shutdown the driver
MML_ERR_GDC_SYS_DEVICE_NOT_YET_INITIALIZED
not yet initialized.
MML_ERR_GDC_SYS_DEVICE_CLOSE_FAILED
Driver shutdown failed.