2.4.1.1  Video Adapter Configurations and Driver Layers

Figure 2.5 illustrates a representative hardware configuration for the video device shown previously in Figure 2.1.

Figure 2.5    Video Hardware Configuration

Figure 2.6 illustrates the corresponding layered drivers for I/O operations on the video device shown in Figure 2.5.

Figure 2.6    Video Driver Layers

Applications and other subsystems request video operations by calling the system-supplied Win32 GDI routines in the Win32 subsystem. The Win32 GDI interface is device-independent, insulating applications from the differences between various video devices.

The Win32 subsystem routes graphics requests to the system-supplied graphics engine (GDI) through the NT system services. GDI processes requests in conjunction with hardware-specific display drivers, communicating through the DDI interface. The display driver has the primary responsibility for determining how applications write to the display screen. The display driver must have a companion video miniport driver. The display driver translates device-independent graphics commands from GDI into commands the video hardware needs to draw graphics on the screen. Graphics hardware vendors supply a display driver and a video miniport driver to support their video adapter.

For more information about requirements for NT display drivers and video miniport drivers, see the Graphics Driver Design Guide.

The system-supplied NT video port driver, implemented as a dynamic-link library, exports a set of support routines for use by one or more adapter-specific video miniport drivers. The port driver’s VideoPortXxx routines manage all OS-dependent operations on behalf of miniport drivers. Video miniport drivers that call only the VideoPortXxx routines can be portable to other Microsoft operating systems that provide a video port driver.

For more information about the VideoPortXxx, see the Graphics Driver Reference.

Each NT video miniport driver is responsible for supporting certain device I/O control operations that the corresponding display driver need not handle. The I/O Manager sends IRPs to the NT video port driver for these device I/O control requests. The NT video port driver handles access checking, memory mapping, and synchronization when it passes I/O requests on to each miniport driver as system-defined video request packets (VRPs).

A Windows NT video adapter is an exclusive device: its miniport driver is dedicated to supporting a single kernel-mode display driver. For performance reasons, the NT video port driver gives the display driver a privileged handle with special access rights for the video device and calls the adapter-specific miniport driver to map device memory so its corresponding display driver can access the video frame buffer directly and, in some Windows NT platforms, the adapter registers as well. Other display drivers must “go through” the owning display driver.