XFree86® server 4.x Design (DRAFT) : DPMS Extension
Previous: Colormap Handling
Next: DGA Extension

## 14. DPMS Extension

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->options` for the "dpms" option, and when present marks DPMS as being enabled for that screen. The `set` function is called whenever the DPMS level changes, and is used to program the requested level. `flags` is 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 `FALSE`.

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 `level` are `DPMSModeOn`, `DPMSModeStandby`, `DPMSModeSuspend`, `DPMSModeOff`. These values are defined in `"extensions/dpms.h"`.

XFree86® server 4.x Design (DRAFT) : DPMS Extension
Previous: Colormap Handling
Next: DGA Extension