Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
103
11.5.5 Function Documentation
11.5.5.1 MM_ERROR mmlGdcDispCloseDisplay(MML_GDC_DISPLAY display)
Close a display and all windows opened by this display. By default this function is blocked until previous operations
of device display are completely executed. Use mmlGdcConfigSetAttribute(), set
MML_GDC_CONFIG_ATTR_DISPLAY_NOBLOCK to 1 to make it non-blocking.
Note:
The display closed by the last process switches the display controller off.
Parameters
in
display
An MML_GDC_DISPLAY returned from a previous call to mmlGdcDispOpenDisplay.
Return values
MML_OK
On success.
MML_ERR_GDC_DISP_INVALID_ARG
If an invalid argument was passed.
MML_ERR_GDC_DISP_DEV_BUSY
If the writing to the device display is denied, because
the previous commit, open,
create or destroy call is not completely executed (e.g.,
shadow load request is pending). Call again later!
11.5.5.2 MM_ERROR mmlGdcDispCLUTData(MML_GDC_DISPLAY display,
MML_GDC_DISP_CLUT_FORMAT format, const MM_S16
∗
pRed, const MM_S16
∗
pGreen, const MM_S16
∗
pBlue)
Used to configure the color lookup table(CLUT) on the display controller (e.g., for gamma correction).
The format MML_GDC_DISP_CLUT_FORMAT_33 defines 33 sample points representing the resulting color
channel intensity. Intermediate values will be interpolated by the HW. The 1st sample point corresponds to input
color code 0, 2nd one to 32, ..., last one to 1024 of the 10 bit 2D core internal processing pipeline. Although input
1024 is not possible, the last sample point is needed for interpolation of codes 993 to 1023.
An index entry of 0 stands for the minimum and 1023 for the maximum intensity. Index values outside this range will
be clamped.
Note:
Example: Let F(in) be the requested gamma formula. Input values of F(in) are in the range [0.0, 1.0]. It is allowed
that the output value is smaller than 0.0 or bigger 1.0. The value array (in this example pRed) must be calculated in
the following way:
MML_GDC_DISP_CLUT_FORMAT_33:
for
(i = 0; i <= 32; i++)
pRed[i] = (MM_S16)(0.5f + ( F(i/32.0f * 1024.0f/1023.0f) * 1023));
Please note that the given formula calculates the value for F(256/255). If F(x) is only defined for input values 0.0..1.0
then pRed[32] can be calculated as
pRed[32] = (MM_S16)(0.5f + (( 32.0f * F(1) - F(31.0f * 32.0f / 1023.0f)) * 1023.0f / 31.0f));
If one pointer of color components is NULL, then the CLUT is set to bypass.
This setting will not be active immediately. Use mmlGdcDispCommit to submit for processing. The three pointers to
array of color component must be valid till the setting is committed.