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

Commit 8227bcc5 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.14-camx

parents f87ce26e 6ead1c88
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -42,6 +42,9 @@


#define HFI_MAX_POLL_TRY 5
#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;
static struct hfi_info *g_hfi;
unsigned int g_icp_mmu_hdl;
unsigned int g_icp_mmu_hdl;
static DEFINE_MUTEX(hfi_cmd_q_mutex);
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 val;
	uint32_t try = 0;
	uint32_t try = 0;


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


		if (data & ICP_CSR_A5_STATUS_WFI)
		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
		 * and Host can the proceed. No interrupt is expected from FW
		 * at this time.
		 * at this time.
		 */
		 */
		msleep(100);
		msleep_interruptible(HFI_POLL_TRY_SLEEP);
		try++;
		try++;
	}
	}