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

Commit 78d6e9c5 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: icp: Reduce delay between subsequent HFI polls" into dev/msm-4.9-camx

parents 05187b95 c6d52772
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -42,6 +42,9 @@

#define HFI_MAX_POLL_TRY 5

#define HFI_MAX_PC_POLL_TRY 50
#define HFI_POLL_TRY_SLEEP 20

static struct hfi_info *g_hfi;
unsigned int g_icp_mmu_hdl;
static DEFINE_MUTEX(hfi_cmd_q_mutex);
@@ -513,8 +516,8 @@ void cam_hfi_disable_cpu(void __iomem *icp_base)
	uint32_t val;
	uint32_t try = 0;

	while (try < HFI_MAX_POLL_TRY) {
		data = cam_io_r(icp_base + HFI_REG_A5_CSR_A5_STATUS);
	while (try < HFI_MAX_PC_POLL_TRY) {
		data = cam_io_r_mb(icp_base + HFI_REG_A5_CSR_A5_STATUS);
		CAM_DBG(CAM_HFI, "wfi status = %x\n", (int)data);

		if (data & ICP_CSR_A5_STATUS_WFI)
@@ -523,7 +526,7 @@ void cam_hfi_disable_cpu(void __iomem *icp_base)
		 * and Host can the proceed. No interrupt is expected from FW
		 * at this time.
		 */
		msleep(100);
		msleep_interruptible(HFI_POLL_TRY_SLEEP);
		try++;
	}