Video MiniPort Driver
The display driver is divided into display driver and Video MiniPort driver (hereinafter simply referred to as Display and MinIPort), and the level is shown in the figure above. Each Video MiniPort provides hardware level support for Display, and Display can send a request to the miniPort below through the ENGDEVICEICONTROL function provided by Graphics Engine. DISPLAY and MinIPort can operate the graphics hardware directly, and they are only divided into labor. Typically processes those with high real-time requirements, such as drawing lines, bitmap copies such as applications. MiniPort processes those operations that do not often happen or completely. It is completely real-time indicating that these operations will not be interrupted or other processes. The DISPLAY cannot handle the device interrupt, and it also requires MiniPort to map registers (memory and control registers on the graphics card to the DISPLAY virtual address space. In addition to DriveREntry, MiniPort should also implement other interface functions. These functions are divided into: must be implemented, in some prerequisites must be implemented, and the selection implementation, the following is a brief description of these functions. Must realize the function: l Driverence: Initialize Video MiniPort Driver. l HWVIDFindAdapter: Get the address range of the device access. If there is a need to detect the device type. l hwvidgetpowerstate: The query device supports the requested power status.
l HWVIDGETVIDEOCHILDESCRIPTOR: Enumerates submounts on this graphics card, such as television receivers, and more.
l HWVIDIntInitialize: Initialization equipment.
l HWVIDSETPOWERSTATE: Sets the power status for the specified device.
l hwvidstartio: Handle specific VRP.
A function that must be implemented in some prerequisites (whether these functions depend on the characteristics of the graphics card and the design of the driver):
l HWVIDInterrupt: If the graphics card generates an interrupt, you should implement this function to process the interrupt.
l HWVIDRESETHW: Reset the graphics to character mode.
l HWVIDSYNCHRONIZEEXECUTIONCALLBACK: Used to synchronize access shared data, similar to the critical regions under Win32, avoid being robbed by the interrupt handler. This function needs to be implemented if other functions in MiniPort need to share device status with the HWVIDInterRupt function.
Select the function of the implementation:
l HWVIDLEGACYRESOURES: Returns a list of resources that are not given in the PCI configuration space of the device.
l HWVIDQueryDeviceCallback and hwvidquerynamedValueCallback: Processing configuration information stored in the registry.
l HwvidQueryInterface: Returns the function of the MiniPort implementation so that other drivers accesses the sub-devices on the graphics. l hwvidtimer: After the timer is started, the system will call this function every second every second. l Svgahwioportxx: On the X86 machine, the DOS full-screen program can access I / O Port through them.