|
@@ -1234,6 +1234,7 @@ static void cam_hw_cdm_work(struct work_struct *work)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ mutex_lock(&cdm_hw->hw_mutex);
|
|
|
mutex_lock(&core->bl_fifo[fifo_idx].fifo_lock);
|
|
|
|
|
|
if (atomic_read(&core->bl_fifo[fifo_idx].work_record))
|
|
@@ -1247,6 +1248,7 @@ static void cam_hw_cdm_work(struct work_struct *work)
|
|
|
core->arbitration);
|
|
|
mutex_unlock(&core->bl_fifo[fifo_idx]
|
|
|
.fifo_lock);
|
|
|
+ mutex_unlock(&cdm_hw->hw_mutex);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -1285,6 +1287,7 @@ static void cam_hw_cdm_work(struct work_struct *work)
|
|
|
}
|
|
|
mutex_unlock(&core->bl_fifo[payload->fifo_idx]
|
|
|
.fifo_lock);
|
|
|
+ mutex_unlock(&cdm_hw->hw_mutex);
|
|
|
}
|
|
|
|
|
|
if (payload->irq_status &
|
|
@@ -1398,9 +1401,9 @@ handle_cdm_pf:
|
|
|
cdm_hw->soc_info.index);
|
|
|
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);
|
|
|
cam_cdm_notify_clients(cdm_hw, CAM_CDM_CB_STATUS_PAGEFAULT,
|
|
|
(void *)pf_info->iova);
|
|
|
+ mutex_unlock(&cdm_hw->hw_mutex);
|
|
|
clear_bit(CAM_CDM_ERROR_HW_STATUS, &core->cdm_status);
|
|
|
} else {
|
|
|
CAM_ERR(CAM_CDM, "Invalid token");
|
|
@@ -1805,9 +1808,11 @@ int cam_hw_cdm_handle_error_info(
|
|
|
|
|
|
if (node != NULL) {
|
|
|
if (node->request_type == CAM_HW_CDM_BL_CB_CLIENT) {
|
|
|
+ mutex_lock(&cdm_hw->hw_mutex);
|
|
|
cam_cdm_notify_clients(cdm_hw,
|
|
|
CAM_CDM_CB_STATUS_HW_ERROR,
|
|
|
(void *)node);
|
|
|
+ mutex_unlock(&cdm_hw->hw_mutex);
|
|
|
} else if (node->request_type == CAM_HW_CDM_BL_CB_INTERNAL) {
|
|
|
CAM_ERR(CAM_CDM, "Invalid node=%pK %d", node,
|
|
|
node->request_type);
|