Mac OS is able to replace the ROM-based PCI graphics driver. You can use this feature to fix a bug or add additional functionality that was not found in the ROM-based driver. This section details several guidelines for replacing the driver. Prerequisite information is contained in Driver Replacement.
Note
Replacing a graphics driver may disrupt the user's experience if the screen flashes or is redrawn. The following discussion suggests ways to prevent or control this.
Starting with version 1.1 of the System Enabler, Mac OS issues a kSupersededCommand to the outgoing driver and a kReplaceCommand to the new driver. Note that a driver that gets the kSupersededCommand will not get a kFinalizeCommand. Similarly, the driver getting the kReplaceCommand will not get the kInitializeCommand.
To implement these new calls, the ROM-based driver must support the kSuperseded command. In the call's implementation, the driver must place in the Name Registry any information that will be needed by the new driver. It should not reset the video hardware (for example, by turning the video sync signals off).
A kCloseCommand will always be issued before kFinalizeCommand or kSupersedeCommand. When this command is received, the driver should turn off all interrupts and remove all VSL services. When responding to kFinalizeCommand and kSupersededCommand, it should remove the interrupt services.
The new driver needs to support the kReplaceCommand. After reading the state information from the Name Registry (which the old driver put there), it must make sure that all the current information is correctly initialized in the hardware. When responding to the kReplaceCommand it should not reprogram the hardware, because this might make the display flash.
The kReplaceCommand routine can ask Mac OS to redraw the screen by creating a property named needFullInit in the device node of the Name Registry. On finding that property, the Mac OS will redraw the screen and then delete the property. Redrawing the screen might be required if the new driver needed to change a parameter in the hardware (such as rowBytes ) that is reflected in the OS data structures.