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

Commit 4ae94979 authored by Depeng Shao's avatar Depeng Shao Committed by Ziyu Jian
Browse files

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: default avatarDepeng Shao <depengs@codeaurora.org>
parent 9546e838
Loading
Loading
Loading
Loading
+20 −14
Original line number Diff line number Diff line
@@ -1495,6 +1495,7 @@ 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) {
		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++;
@@ -1509,6 +1510,11 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link,
				__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;