The SaveScreen() function

How to add an (S)VGA driver to XFree86 : The Driver Itself : The SaveScreen() function
Previous: The ValidMode() function
Next: The GetMode() function

## 6.12. The SaveScreen() function

The SaveScreen() function is not needed by most chipsets. This function would only be required if the extended registers that your driver needs will be modified when a synchronous reset is performed on the SVGA chipset (your databook should tell you this). If you do NOT need this function, simply don't define it, and put `NoopDDA' in its place in the vgaVideoChipRec structure initialization (NoopDDA is a generic-use empty function).

If you DO need this function, it is fairly simple to do. It will be called twice - once before the reset, and again after. It will be passed a parameter of SS_START in the former case, and SS_FINISH in the latter. All that needs to be done is to save any registers that will be affected by the reset into static variables on the SS_START call, and then restore them on the SS_FINISH call.

How to add an (S)VGA driver to XFree86 : The Driver Itself : The SaveScreen() function
Previous: The ValidMode() function
Next: The GetMode() function