Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95fc2d89 authored by Padmanabhan Komanduru's avatar Padmanabhan Komanduru
Browse files

drm/msm/dp: avoid duplicate segment/EDID address AUX transactions



The DRM upstream driver triggers sending the EDID address to the sink
at the beginning of every EDID block. After commit '729c0029'
("drm/msm/dp: avoid sending segment_address command for segment-0"),
we don't send the segment address for segment-0 and this causes sending
duplicate EDID address for block-0 and block-1 without segment-0 address
in between them. This causes EDID read failures on some TVs. Avoid
sending duplicate segment/EDID address at the beginning of each block
since the DRM upstream driver triggers the AUX transaction for that.

Change-Id: Ic731de34584850f23d74e15897bb7b174b80e5b3
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
parent 2fed71ce
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@ static void dp_aux_transfer_helper(struct dp_aux_private *aux,
	struct drm_dp_aux_msg helper_msg;
	u32 const message_size = 0x10;
	u32 const segment_address = 0x30;
	u32 const edid_block_length = 0x80;
	bool i2c_mot = input_msg->request & DP_AUX_I2C_MOT;
	bool i2c_read = input_msg->request &
		(DP_AUX_I2C_READ & DP_AUX_NATIVE_READ);
@@ -339,6 +340,15 @@ static void dp_aux_transfer_helper(struct dp_aux_private *aux,
	if (!i2c_mot || !i2c_read || (input_msg->size == 0))
		return;

	/*
	 * Sending the segment value and EDID offset will be performed
	 * from the DRM upstream EDID driver for each block. Avoid
	 * duplicate AUX transactions related to this while reading the
	 * first 16 bytes of each block.
	 */
	if (!(aux->offset % edid_block_length))
		goto end;

	aux->read = false;
	aux->cmd_busy = true;
	aux->no_send_addr = true;
@@ -371,6 +381,7 @@ static void dp_aux_transfer_helper(struct dp_aux_private *aux,
	helper_msg.buffer = &aux->offset;
	helper_msg.size = 1;
	dp_aux_cmd_fifo_tx(aux, &helper_msg);
end:
	aux->offset += message_size;

	if (aux->offset == 0x80 || aux->offset == 0x100)