To find out what the frame buffer controller can do with its sync lines, the user of the GetSync routine passes a value of 0xFF in the csMode flag. The driver zeroes out those bits that represent a feature that is not supported by the frame buffer controller. The available bit values are those for the csMode parameter of VDSyncInfoRec.
For example, a driver that is capable of controlling the horizontal, vertical, and composite syncs, and can enable sync on red, would return a value of 0x27:
csMode = 0x0 |
( 1 << kDisableHorizontalSyncBit) |
( 1 << kDisableVerticalSyncBit) |
( 1 << kDisableCompositeSyncBit) |
( 1 << kEnableSyncOnRed)
An additional bit is defined to represent those frame buffers that are not capable of controlling the individual syncs separately but can control them as a group:
enum {
kNoSeparateSyncControlBit = 6
}
A driver that cannot control the syncs separately sets this bit to tell the client that the horizontal, vertical, and composite syncs are not independently controllable and can only be controlled as a group. Using the previous example, the driver reports a csMode of 0x47:
csMode = 0x0 |
( 1 << kDisableHorizontalSyncBit) |
( 1 << kDisableVerticalSyncBit) |
( 1 << kDisableCompositeSyncBit) |
( 1 << kEnableSyncOnRed) |
( 1 << kNoSeparateSyncControlBit)