Export (0) Print
Expand All
Expand Minimize

I2C Bus and Child Devices of the Display Adapter

Display adapters typically communicate with child devices over the I²C bus. For example, a monitor is a child device of the display adapter, and the display adapter can read a monitor's capability information over the I2C bus, which is built into all standard monitor cables.

The I²C bus has only two wires: the serial clock line and the serial data line. Data is read from and written to the lines one bit at a time. Reading and writing data bits to the I²C lines on the display adapter is hardware dependent, so the vendor-supplied video miniport driver must provide the functions that instruct the display adapter to read and write the individual bits.

The following functions, implemented by the video miniport driver, read and write individual data bits to the I²C serial clock and data lines:

ReadClockLine

WriteClockLine

ReadDataLine

WriteDataLine

The I²C specification defines a protocol for initiating I²C communication, reading and writing bytes over the I²C data line and terminating I²C communication. The system-supplied video port driver provides the following functions that implement that protocol.

I2CStart

I2CRead

I2CWrite

I2CStop

Each of the functions (implemented by the video port driver) in the preceding list requires assistance from the video miniport driver. For example, the I2CRead function reads a sequence of bytes over the I²C data line, but reading each byte requires reading eight individual bits, a task that only the video miniport driver can do. The I2CRead function can obtain assistance from the video miniport driver because it receives pointers (in an I2CCallbacks structure) to the four I²C functions implemented by the video miniport driver (ReadClockLine, WriteClockLine, ReadDataLine, and WriteDataLine). Similarly, I2CStart, I2CRead, and I2CWrite each receive an I2CCallbacks structure that contains pointers to all four of the video miniport driver's I²C functions.

The HwVidGetChildDescriptor function, implemented by the video miniport driver, is responsible for reading the Enhanced Display Identification Data (EDID) structure from a particular monitor and returning the EDID to the video port driver. HwVidGetChildDescriptor can get assistance from the video port driver by calling VideoPortDDCMonitorHelper, which uses the I²C bus to read a monitor's EDID according to the Display Data Channel (DDC) standard. However, when VideoPortDDCMonitorHelper needs to read and write individual bits to the I²C clock and data lines, it must call back into the video miniport driver for assistance. Therefore, HwVidChildDescriptor passes an I2CCallbacks structure (which contains pointers to ReadClockLine, WriteClockLine, ReadDataLine, and WriteDataLine) to VideoPortDDCMonitorHelper.

For more information about the I²C functions implemented by the video miniport driver and video port driver, see the following topics:

I2C Functions

I2C Functions Implemented by the Video Port Driver

For an overview of all video miniport driver functions and how those functions are registered, see Video Miniport Driver Functions.

For details on the I²C bus, see the I²C Bus Specification published by Philips Semiconductors.

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft