DisplayPort

From OSDev.wiki
Revision as of 17:24, 17 June 2022 by osdev>Demindiro (Add category)
Jump to navigation Jump to search
This page is a work in progress.
This page may thus be incomplete. Its content may be changed in the near future.

DisplayPort is a protocol (link) and bus (physical) standard for transporting video, audio and other data from a "source" device to a "sink" device.

Link Layer

The link layer consists of a Main Link, which is used for transporting video and audio, and an Auxiliary Channel (AUX CH) which is used for configuration & retrieving information such as the EDID.

Auxiliary Channel

The AUX CH is a packet-based protocol that can transport both I²C and Native AUX CH packets. The source initiates a request and the sink always sends a response within a timeout. A packet is at most 16 (20?) bytes large.

Each packet starts with a single byte header. Bit 7 indicates whether the packet is an I²C packet or Native AUX CH packet.

Native AUX CH

Request header format
Bit(s) Description
7 0 (Native AUX CH transaction)
6:4 Request type (000 = write, 001 = read)
3:0 Padding (must be all zeroes)
Reply header format
Bit(s) Description
7:6 Must be zero / ignored
5:4 Native AUX CH reply (00 = ACK, 01 = NACK, 10 = defer)
3:0 Padding (must be all zeroes)

I²C

A I²C transaction is initiated by sending an initial packet with the address. After receiving an ACK data can be read or written. The source must always specify the address and the amount of data to be sent or read by adding a byte that denotes the length minus 1.

The last packet must have MOT = 0. All other packets must have MOT = 1.

For example, an I²C transaction to retrieve the EDID may go as follows (> denotes source to sink, < denotes sink to source):

> 0b0_1_00_0000, 0, 0x50 (I2C, MOT = 1, write, address 0x50)
< 0b00_00_0000 (AUX_ACK, I2C_ACK)
> 0b0_1_00_0000, 0, 0x50, 0, 0 (I2C, MOT = 1, write, address 0x50, length 1, data 0)
< 0b00_00_0000 (AUX_ACK, I2C_ACK)
> 0b0_1_01_0000, 0, 0x50 (I2C, MOT = 1, read, address 0x50)
< 0b00_00_0000 (AUX_ACK, I2C_ACK)
loop 128 times:
> 0b0_1_01_0000, 0, 0x50, 0 (I2C, MOT = 1, read, address 0x50, length 1)
< 0b00_00_0000, x (AUX_ACK, I2C_ACK, data x)
repeat loop
> 0b0_0_01_0000, 0, 0x50 (I2C, MOT = 0, read, address 0x50)
< 0b00_00_0000 (AUX_ACK, I2C_ACK)
Request header format
Bit(s) Description
7 1 (I²C transaction)
6 Middle-of-transaction bit.
5:4 Request type (00 = write, 01 = read, 10 = write status_request)
3:0 Padding (must be all zeroes)


Reply header format
Bit(s) Description
7:6 I²C-over-AUX reply (00 = ACK, 01 = NACK, 10 = defer)
5:4 Native AUX CH reply (00 = ACK, 01 = NACK, 10 = defer)
3:0 Padding (must be all zeroes)

See also