class DdiAuxChannel

Defined at line 48 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.h

Helper for accessing the DP AUX channel via the DDI registers.

This class is focused on DDI register management. It has as little knowledge

of the AUX channel protocol as needed to avoid unnecessary copying of the

message data.

Public Members

static const int32_t kMaxCommand
static const int32_t kMaxAddress
static const int8_t kMaxOpSize

Public Methods

void DdiAuxChannel (fdf::MmioBuffer * mmio_buffer, DdiId ddi_id, uint16_t device_id)

`mmio_buffer` must outlive this instance.

Defined at line 26 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.cc

zx::result<ReplyInfo> DoTransaction (const Request & request, cpp20::span<uint8_t> reply_data_buffer)

Performs an AUX transaction, exchanging one request and one reply message.

`reply_data` points to a buffer populated with the data payload of the

reply message. If the buffer is smaller than the reply payload, only the

first `reply_data.size()` bytes of the payload are copied.

The returned zx::result reflects whether the DDI considers this transaction

successful. If that's the case, the `ReplyInfo` structure has the reply

command byte (which could indicate a NACK or a DEFER), and the size of the

reply payload.

Defined at line 64 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.cc

void SetUseThunderbolt (bool use_thunderbolt)

Directs AUX transactions to/away from the Thunderbolt controller.

This method most only be called on Type C DDIs, to switch between

Thunderbolt connections and Type C (Alt Modes) connections.

This method must not be called while a transaction is in progress.

Defined at line 74 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.cc

DdiAuxChannelConfig Config ()

Reads the configuration in the cached control register.

Defined at line 86 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.cc

void DdiAuxChannel (const DdiAuxChannel & )

No copying.

Defined at line 96 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.h

DdiAuxChannel & operator= (const DdiAuxChannel & )

Defined at line 97 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.h

void DdiAuxChannel (DdiAuxChannel && )

Moving is allowed to facilitate storing in containers.

Defined at line 100 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.h

DdiAuxChannel & operator= (DdiAuxChannel && )

Defined at line 101 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.h

void Log ()

Outputs the current configuration as TRACE entries in the kernel log.

Defined at line 123 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.cc

void WriteRequestForTesting (const Request & request)

Stores an AUX channel request in the DDI's data buffer.

This is a helper for DoTransaction(). It is only exposed for unit tests.

After a request is stored in the DDI data buffer using this method,

Transact() should be used to transmit the request to the AUX channel.

Defined at line 132 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.cc

zx::result<> TransactForTesting ()

Performs an AUX channel transaction, using a populated DDI data buffer.

This is a helper for DoTransaction(). It is only exposed for unit tests.

WriteRequest() must be called before this method.

Returns a status that reflects whether the DDI considers the transaction

successful. If this method reports success, ReadReply() can be called to

retrieve the transaction reply. DDI-level success isn't conditioned on the

reply command, so NACKed and DEFERred transaction will still be considered

successful.

Defined at line 223 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.cc

ReplyInfo ReadReplyForTesting (cpp20::span<uint8_t> data_buffer)

Reads an AUX channel response from the DDI's data buffer.

Defined at line 281 of file ../../src/graphics/display/drivers/intel-display/ddi-aux-channel.cc

Records