From 0b798d0f8cb984e199f0c153b9dc9bdc6c57522b Mon Sep 17 00:00:00 2001 From: Depeng Shao Date: Fri, 19 Mar 2021 11:05:29 +0800 Subject: [PATCH] msm: camera: reqmgr: Reset the status for next req if bubble If req#N in slot idx, and this req meets bubble issue, then the req#(N+1) in slot (idx+1) may also be applied, and its status is APPLIED. If req#(N+1) applies failed after finishing bubble recovery due to some reasons, but we still can move to next slot since the status of slot (idx+1) is already APPLIED. This change resets the status of slot (idx+1) to ADDED if it is APPLIED during processing error. CRs-Fixed: 2902809 Change-Id: I32f318569ad8f24fdf0f324603f4ea0036867e98 Signed-off-by: Depeng Shao --- drivers/cam_req_mgr/cam_req_mgr_core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/cam_req_mgr/cam_req_mgr_core.c b/drivers/cam_req_mgr/cam_req_mgr_core.c index 27c6e22b594b..36a105be5a1d 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_core.c +++ b/drivers/cam_req_mgr/cam_req_mgr_core.c @@ -2747,6 +2747,14 @@ int cam_req_mgr_process_error(void *priv, void *data) in_q->rd_idx = idx; in_q->slot[idx].status = CRM_SLOT_STATUS_REQ_ADDED; + /* The next req may also be applied */ + idx = in_q->rd_idx; + __cam_req_mgr_inc_idx(&idx, 1, + link->req.l_tbl->num_slots); + + if (in_q->slot[idx].status == CRM_SLOT_STATUS_REQ_APPLIED) + in_q->slot[idx].status = CRM_SLOT_STATUS_REQ_ADDED; + spin_lock_bh(&link->link_state_spin_lock); link->state = CAM_CRM_LINK_STATE_ERR; spin_unlock_bh(&link->link_state_spin_lock);