Loading drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c +23 −4 Original line number Diff line number Diff line Loading @@ -348,7 +348,8 @@ static void __cam_req_mgr_reset_req_slot(struct cam_req_mgr_core_link *link, struct cam_req_mgr_req_queue *in_q = link->req.in_q; slot = &in_q->slot[idx]; CAM_DBG(CAM_CRM, "RESET: idx: %d: slot->status %d", idx, slot->status); CAM_DBG(CAM_CRM, "RESET: last applied idx %d: idx %d: slot->status %d", in_q->last_applied_idx, idx, slot->status); /* Check if CSL has already pushed new request*/ if (slot->status == CRM_SLOT_STATUS_REQ_ADDED || Loading Loading @@ -1012,7 +1013,7 @@ static int __cam_req_mgr_check_sync_req_is_ready( static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, uint32_t trigger) { int rc = 0, idx; int rc = 0, idx, last_app_idx; int reset_step = 0; struct cam_req_mgr_slot *slot = NULL; struct cam_req_mgr_req_queue *in_q; Loading Loading @@ -1146,8 +1147,7 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, slot->req_id, link->link_hdl); idx = in_q->rd_idx; if (slot->req_id > 0) in_q->last_applied_idx = idx; reset_step = link->max_delay; if (link->sync_link) { if ((link->in_msync_mode) && Loading @@ -1155,6 +1155,25 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, reset_step = link->sync_link->max_delay; } /* This is to handle a rare scenario of scheduling * issue. If ISP sends multiple sofs due to scheduling * issue, it is required to retain last applied index * to help recover. * In this case, ISP goes into Bubble, asking to reapply * the bubbled request which has already been reset by * CRM. Below code retains the last applied request. */ if (slot->req_id > 0) { last_app_idx = in_q->last_applied_idx; in_q->last_applied_idx = idx; if (abs(last_app_idx - idx) >= reset_step + 1) __cam_req_mgr_reset_req_slot(link, last_app_idx); } __cam_req_mgr_dec_idx( &idx, reset_step + 1, in_q->num_slots); Loading Loading
drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c +23 −4 Original line number Diff line number Diff line Loading @@ -348,7 +348,8 @@ static void __cam_req_mgr_reset_req_slot(struct cam_req_mgr_core_link *link, struct cam_req_mgr_req_queue *in_q = link->req.in_q; slot = &in_q->slot[idx]; CAM_DBG(CAM_CRM, "RESET: idx: %d: slot->status %d", idx, slot->status); CAM_DBG(CAM_CRM, "RESET: last applied idx %d: idx %d: slot->status %d", in_q->last_applied_idx, idx, slot->status); /* Check if CSL has already pushed new request*/ if (slot->status == CRM_SLOT_STATUS_REQ_ADDED || Loading Loading @@ -1012,7 +1013,7 @@ static int __cam_req_mgr_check_sync_req_is_ready( static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, uint32_t trigger) { int rc = 0, idx; int rc = 0, idx, last_app_idx; int reset_step = 0; struct cam_req_mgr_slot *slot = NULL; struct cam_req_mgr_req_queue *in_q; Loading Loading @@ -1146,8 +1147,7 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, slot->req_id, link->link_hdl); idx = in_q->rd_idx; if (slot->req_id > 0) in_q->last_applied_idx = idx; reset_step = link->max_delay; if (link->sync_link) { if ((link->in_msync_mode) && Loading @@ -1155,6 +1155,25 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link, reset_step = link->sync_link->max_delay; } /* This is to handle a rare scenario of scheduling * issue. If ISP sends multiple sofs due to scheduling * issue, it is required to retain last applied index * to help recover. * In this case, ISP goes into Bubble, asking to reapply * the bubbled request which has already been reset by * CRM. Below code retains the last applied request. */ if (slot->req_id > 0) { last_app_idx = in_q->last_applied_idx; in_q->last_applied_idx = idx; if (abs(last_app_idx - idx) >= reset_step + 1) __cam_req_mgr_reset_req_slot(link, last_app_idx); } __cam_req_mgr_dec_idx( &idx, reset_step + 1, in_q->num_slots); Loading