![[Toc]](../../toc.gif)
![[Index]](/idx.gif)
[Cleanup]
Cleanup is used on session switches or when SetMode control is being
relinquished to a driver that may not be VIDEOPMI-driven. This function is
also used if and when a mode targeting the VGA chip is to be issued from a
resource other than the .PMI file. The virtual video driver depends on
this function during session switches when the engine is found busy and a
reset engine mechanism is needed as part of the recovery. The function
will also be used at shutdown, after the shutdown message is displayed. It
ensures that extended functionality is disabled and reset to the extent
that pure VGA compatibility and/or subsequent use of the accelerator is
allowed. For SVGA and accelerator/coprocessors that coexist with a VGA
chip, this function is used to disable the controller and enable the VGA
chip. Recommended order of disabling is:
* Reset DAC to VGA mode.
* Reset engine.
* Disable extended functionality.
* Enable VGA.
* Set clock to 25 MHz.
Here is a sample .PMI file for a Viper VLB card:
[Cleanup]
//reset DAC
r0 = 0x00000000;
r1 = 0x00000000;
ProgramDAC;
//reset clock to 60Hz, 32 KHz
r0 = 0x0045A8BC;
ProgramClock;
//enable VGA
DisableController;
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs