XFree86 X server ``New Design'' (DRAFT) : Optional Driver Functions
Previous: Control Flow in the Server and Mandatory Driver Functions
Next: Recommended driver functions

6. Optional Driver Functions

The functions outlined here can be called from the XFree86 common layer, but their presence is optional.

6.1. Mode Validation

When a mode validation helper supplied by the XFree86-common layer is being used, it can be useful to provide a function to check for hw specific mode constraints:

ModeStatus ChipValidMode(int index, DisplayModePtr mode,
          Bool verbose, int flags)

Check the passed mode for hw-specific constraints, and return the appropriate status value.

6.2. Free screen data

When a screen is deleted prior to the completion of the ScreenInit phase the ChipFreeScreen() function is called when defined.

void ChipFreeScreen(int scrnindex, int flags)

Free any driver-allocated data that may have been allocated up to and including an unsuccessful ChipScreenInit() call. This would predominantly be data allocated by ChipPreInit() that persists across server generations. It would include the driverPrivate, and any ``privates'' entries that modules may have allocated.


XFree86 X server ``New Design'' (DRAFT) : Optional Driver Functions
Previous: Control Flow in the Server and Mandatory Driver Functions
Next: Recommended driver functions