Overview
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
22
4.5.2 Synchronization
The Synchronization API provides mechanisms to synchronize the processing blocks. This is done through sync
objects. A sync object describes a sync condition, (e.g., a certain image buffer operation that has to be completed).
Sync objects are managed through the Synchronization API, which provides functions to reset sync objects and to
wait for a sync condition to become true. Setting a sync condition (in a sync object) is done by the component that
owns the sync type. For example, the Display API provides a function to write the sync condition "Surface to be
displayed is actually shown on the screen" to a sync object. Waiting for a sync condition can be done by an
application (as described above), which is called a "client wait", but also in a graphics processing pipeline
withoutintervention by the application. This is called a "server wait". Server waits are implemented by the component
that owns the graphics processing pipeline. For example, the Pixel Engine API provides a function to submit a sync
condition to the Pixel Engine command queue (queue to hold the submitted PixEng operations). PixEng operations
submitted after the sync, will only be executed after the sync condition becomes true.
Following are a few examples to illustrate the use of sync objects:
An application renders 2D graphics onto the screen using double-buffering. It can use sync objects to make
sure a pixel buffer has already been displayed, (i.e., is free to render a new 2D graphics into it).
The following processing unit events can be used to generate a sync condition:
Display Controller VSync (new frame started): see mmlGdcDispSyncVSync()
Window mmlGdcDispWinCommit() is executed: see mmlGdcDispWinSync()
Previously committed PixEng operations are finished: see mmlGdcPeSync()
The following possibilities for sync server waits exist within the 2D Graphics Driver:
The Window mmlGdcDispWinCommit() may wait for a sync condition: see mmlGdcDispWinWaitSync()
The Pixel Engine command queue can wait for a sync condition: see mmlGdcPeWaitSync()
The CPU can check a sync condition:
Check sync condition: see mmlGdcSyncWait()