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

Commit 02da7c1d authored by Sandeep Panda's avatar Sandeep Panda
Browse files

msm: mdss: hdmi: Fix HDCP ddc clean up wait time



With existing implementation the check for ddc hardware
not ready always fails because of incorrect logic and
driver always waits for 2 seconds even if there is no
pending hardware ddc transaction. Fix this by waiting
only for the time ddc transactions are underway.

Change-Id: Ic8396200d5d078d604ba3b4414d41644b455c103
Signed-off-by: default avatarSandeep Panda <spanda@codeaurora.org>
parent bff9ba42
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -186,11 +186,11 @@ static void hdmi_hdcp_hw_ddc_clean(struct hdmi_hdcp_ctrl *hdcp_ctrl)
		do {
			hdcp_ddc_status = DSS_REG_R(io, HDMI_HDCP_DDC_STATUS);
			ddc_hw_status = DSS_REG_R(io, HDMI_DDC_HW_STATUS);
			ddc_xfer_done = (hdcp_ddc_status & BIT(10)) ;
			ddc_xfer_req = (hdcp_ddc_status & BIT(4)) ;
			ddc_hw_done = (ddc_hw_status & BIT(3)) ;
			ddc_hw_not_ready = ((ddc_xfer_done != 1) ||
			(ddc_xfer_req != 0) || (ddc_hw_done != 1));
			ddc_xfer_done = hdcp_ddc_status & BIT(10);
			ddc_xfer_req = hdcp_ddc_status & BIT(4);
			ddc_hw_done = ddc_hw_status & BIT(3);
			ddc_hw_not_ready = !ddc_xfer_done ||
				ddc_xfer_req || !ddc_hw_done;

			DEV_DBG("%s: %s: timeout count(%d):ddc hw%sready\n",
				__func__, HDCP_STATE_NAME, timeout_count,