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

Commit da658422 authored by Govinda Rajulu Chenna's avatar Govinda Rajulu Chenna
Browse files

drm/msm/dp: fix reading of edid extension blocks



EDID extension block reads are failing due to the reset of
offset variable at incorrect state. This change removes the
offset variable reset to use the correct offset value in
reading the EDID extension blocks.

CRs-Fixed: 2256731
Change-Id: I90b599520aa0562e12157193505181ea2573bca1
Signed-off-by: default avatarGovinda Rajulu Chenna <gchenna@codeaurora.org>
parent 951f1eab
Loading
Loading
Loading
Loading
+1 −10
Original line number Original line Diff line number Diff line
@@ -371,11 +371,8 @@ static void dp_aux_transfer_helper(struct dp_aux_private *aux,
	bool i2c_read = input_msg->request &
	bool i2c_read = input_msg->request &
		(DP_AUX_I2C_READ & DP_AUX_NATIVE_READ);
		(DP_AUX_I2C_READ & DP_AUX_NATIVE_READ);


	if (!i2c_mot || !i2c_read || (input_msg->size == 0)) {
	if (!i2c_mot || !i2c_read || (input_msg->size == 0))
		/* reset the offset for all other transaction types */
		aux->offset = 0;
		return;
		return;
	}


	/*
	/*
	 * Sending the segment value and EDID offset will be performed
	 * Sending the segment value and EDID offset will be performed
@@ -498,12 +495,6 @@ static ssize_t dp_aux_transfer_debug(struct drm_dp_aux *drm_aux,
		goto address_error;
		goto address_error;
	}
	}


	if ((msg->size + aux->offset) > SZ_256) {
		pr_err("invalid edid access: offset=0x%x, size=0x%x\n",
				aux->offset, msg->size);
		goto address_error;
	}

	if (aux->native) {
	if (aux->native) {
		if (aux->read) {
		if (aux->read) {
			aux->dp_aux.reg = msg->address;
			aux->dp_aux.reg = msg->address;