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

Commit e072c789 authored by Venkata Prahlad Valluru's avatar Venkata Prahlad Valluru Committed by Ramendra Kumar
Browse files

msm: mdss: hdmi: don't reset CEC while triggering message send



Toggling CEC_ENABLE bit will disrupt cec rx engine and might
lead to corruption in received messages. Do CEC reset on CEC_ERROR.

Change-Id: If6bb085f249fa3e46c9d3f8d8fb01f24ca02c893
Signed-off-by: default avatarVenkata Prahlad Valluru <vvalluru@codeaurora.org>
parent 74384218
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
/* Copyright (c) 2010-2017, 2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2017, 2020 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -90,10 +90,6 @@ static int hdmi_cec_msg_send(void *data, struct cec_msg *msg)
	if (msg->retransmit > 0 && msg->retransmit < RETRANSMIT_MAX_NUM)
		frame_retransmit = msg->retransmit;

	/* toggle cec in order to flush out bad hw state, if any */
	DSS_REG_W(io, HDMI_CEC_CTRL, 0);
	DSS_REG_W(io, HDMI_CEC_CTRL, BIT(0));

	frame_retransmit = (frame_retransmit & 0xF) << 4;
	DSS_REG_W(io, HDMI_CEC_RETRANSMIT, BIT(0) | frame_retransmit);

@@ -360,6 +356,9 @@ int hdmi_cec_isr(void *input)
	if ((cec_intr & BIT(2)) && (cec_intr & BIT(3))) {
		DEV_DBG("%s: CEC_IRQ_FRAME_ERROR\n", __func__);
		DSS_REG_W(io, HDMI_CEC_INT, cec_intr | BIT(2));
		/* toggle cec in order to flush out bad hw state, if any */
		DSS_REG_W(io, HDMI_CEC_CTRL, 0);
		DSS_REG_W(io, HDMI_CEC_CTRL, BIT(0));

		spin_lock_irqsave(&cec_ctrl->lock, flags);
		cec_ctrl->cec_msg_wr_status |= CEC_STATUS_WR_ERROR;