Support code for the DPMS extension is included in the XFree86 common layer. This code provides an interface between the main extension code, and a means for drivers to initialise DPMS when they support it. One function is available to drivers to do this initialisation, and it is always available, even when the DPMS extension is not supported by the core server (in which case it returns a failure result).
Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
This function registers a driver's DPMS level programming function
set. It also checks
pScrn->optionsfor the "dpms" option, and when present marks DPMS as being enabled for that screen. The
setfunction is called whenever the DPMS level changes, and is used to program the requested level.
flagsis currently not used, and should be
0. If the initialisation fails for any reason, including when there is no DPMS support in the core server, the function returns
Drivers that implement DPMS support must provide the following function, that gets called when the DPMS level is changed:
void ChipDPMSSet(ScrnInfoPtr pScrn, int level, int flags)
Program the DPMS level specified by
level. Valid values of
DPMSModeOff. These values are defined in