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

Commit 212fe57e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: HW CDM reset failure workaround"

parents a611d3cf 81851c7d
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;