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

Commit 65455a7e authored by Rishabh Jain's avatar Rishabh Jain
Browse files

msm: camera: cdm: Check for HW state before dumping registers



In case of page fault, check for cdm hardware state before
dumping registers.

CRs-Fixed: 2614680
Change-Id: I509cdd7d53e75a39199129806a7391f0142737d8
Signed-off-by: default avatarRishabh Jain <risjai@codeaurora.org>
parent 6d2eb031
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1086,7 +1086,10 @@ static void cam_hw_cdm_iommu_fault_handler(struct iommu_domain *domain,
		mutex_lock(&cdm_hw->hw_mutex);
		for (i = 0; i < core->offsets->reg_data->num_bl_fifo; i++)
			mutex_lock(&core->bl_fifo[i].fifo_lock);
		if (cdm_hw->hw_state == CAM_HW_STATE_POWER_UP)
			cam_hw_cdm_dump_core_debug_registers(cdm_hw);
		else
			CAM_INFO(CAM_CDM, "CDM hw is power in off state");
		for (i = 0; i < core->offsets->reg_data->num_bl_fifo; i++)
			mutex_unlock(&core->bl_fifo[i].fifo_lock);
		mutex_unlock(&cdm_hw->hw_mutex);