Accessing the Frame Buffer and Hardware Registers

There are several ways to reduce display driver size. For example, you can implement only those functions that the display driver can perform faster than GDI, and then specify GDI to perform all other operations. GDI often performs a substantial amount of the drawing to linear frame buffers to reduce the size of the driver. GDI cannot access banked memory directly; therefore, when the frame buffer is not linearly addressable, the display driver must divide the frame buffer into a series of banks and provide a means for GDI to perform its draw operations to the appropriate bank. See Supporting Banked Frame Buffers for details.

The display driver has direct access to I/O-mapped and memory-mapped video registers. This access allows a display driver to achieve high performance. For example, the driver might need to access video hardware registers to send line-drawing commands at high throughput.

Similarly, for graphics cards, such as the S3, many of the innermost loops in the graphics engine code require reads and writes of several video controller ports (for example, text output in graphics mode, bit block transfers, and line drawing). Rather than requiring the display driver to send an IOCTL to the miniport driver for each request, the display driver is permitted to access the video hardware directly.