mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
msm: camera: reqmgr: Workqueue congestion handling
When workqueue is congested, CRM may apply same request to device which will trigger recovery due to apply fails. This change prevent CRM triggering recovery if the current idx is same with last applied idx. CRs-Fixed: 2761601 Change-Id: I6ccf44f050a18e8a2a35916f61513ad852e7bdee Signed-off-by: Depeng Shao <depengs@codeaurora.org>
This commit is contained in:
parent
eedefac65c
commit
3de038d4a6
1 changed files with 17 additions and 11 deletions
|
|
@ -1694,18 +1694,24 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link,
|
|||
|
||||
rc = __cam_req_mgr_send_req(link, link->req.in_q, trigger, &dev);
|
||||
if (rc < 0) {
|
||||
/* Apply req failed retry at next sof */
|
||||
slot->status = CRM_SLOT_STATUS_REQ_PENDING;
|
||||
if (in_q->last_applied_idx < in_q->rd_idx) {
|
||||
/* Apply req failed retry at next sof */
|
||||
slot->status = CRM_SLOT_STATUS_REQ_PENDING;
|
||||
|
||||
link->retry_cnt++;
|
||||
if (link->retry_cnt == MAXIMUM_RETRY_ATTEMPTS) {
|
||||
CAM_DBG(CAM_CRM,
|
||||
"Max retry attempts reached on link[0x%x] for req [%lld]",
|
||||
link->link_hdl,
|
||||
in_q->slot[in_q->rd_idx].req_id);
|
||||
__cam_req_mgr_notify_error_on_link(link, dev);
|
||||
link->retry_cnt = 0;
|
||||
}
|
||||
link->retry_cnt++;
|
||||
if (link->retry_cnt == MAXIMUM_RETRY_ATTEMPTS) {
|
||||
CAM_DBG(CAM_CRM,
|
||||
"Max retry attempts reached on link[0x%x] for req [%lld]",
|
||||
link->link_hdl,
|
||||
in_q->slot[in_q->rd_idx].req_id);
|
||||
__cam_req_mgr_notify_error_on_link(link, dev);
|
||||
link->retry_cnt = 0;
|
||||
}
|
||||
} else
|
||||
CAM_WARN(CAM_CRM,
|
||||
"workqueue congestion, last applied idx:%d rd idx:%d",
|
||||
in_q->last_applied_idx,
|
||||
in_q->rd_idx);
|
||||
} else {
|
||||
if (link->retry_cnt)
|
||||
link->retry_cnt = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue