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

Commit 81851c7d authored by Hariram Purushothaman's avatar Hariram Purushothaman Committed by Harsh Shah
Browse files

msm: camera: HW CDM reset failure workaround



Sometimes HW CDM triggers irq with invalid status for
HW reset command, so ignore reset failure and proceed further
as a workaround.

CRs-Fixed: 2062256
Change-Id: I96ff77efb0347a0a29f782cb42474b1e26542530
Signed-off-by: default avatarHariram Purushothaman <hariramp@codeaurora.org>
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent 68dfac8e
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -693,6 +693,18 @@ int cam_hw_cdm_init(void *hw_priv,
	CDM_CDBG("Waiting for CDM HW resetdone\n");
	time_left = wait_for_completion_timeout(&cdm_core->reset_complete,
		msecs_to_jiffies(CAM_CDM_HW_RESET_TIMEOUT));

	/*
	 * Check for HW error and recover as a workaround
	 * Sometimes CDM HW triggers irq with invalid status for
	 * HW reset command, so ignore reset failure and proceed further
	 * as a workaround.
	 */
	if (time_left <= 0) {
		pr_err("CDM HW reset Wait failed time_left=%ld\n", time_left);
		time_left = 1;
	}

	if (time_left <= 0) {
		pr_err("CDM HW reset Wait failed rc=%d\n", rc);
		goto disable_return;