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

Commit f215573c authored by Gaurav Jindal's avatar Gaurav Jindal Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: crm: Reset the pd table slots during flush



As part of flush only the request slots were reset, we need
to reset the slots in each of the pd tables.

Change-Id: I8af15f6e5846ce82894a51b2839eb174666b0cf4
CRs-Fixed: 2834685
Signed-off-by: default avatarGaurav Jindal <gjindal@codeaurora.org>
parent 7045d94c
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1919,6 +1919,7 @@ int cam_req_mgr_process_flush_req(void *priv, void *data)
	struct cam_req_mgr_connected_device *device = NULL;
	struct cam_req_mgr_flush_request     flush_req;
	struct crm_task_payload             *task_data = NULL;
	struct cam_req_mgr_req_tbl          *tbl = NULL;

	if (!data || !priv) {
		CAM_ERR(CAM_CRM, "input args NULL %pK %pK", data, priv);
@@ -1948,6 +1949,18 @@ int cam_req_mgr_process_flush_req(void *priv, void *data)
			slot->sync_mode = CAM_REQ_MGR_SYNC_MODE_NO_SYNC;
			slot->skip_idx = 1;
			slot->status = CRM_SLOT_STATUS_NO_REQ;
			tbl = link->req.l_tbl;

			while (tbl != NULL) {
				CAM_DBG(CAM_CRM, "pd: %d idx: %d state: %d",
					tbl->pd, i, tbl->slot[i].state);
				 tbl->slot[i].req_ready_map = 0;
				 tbl->slot[i].dev_hdl = -1;
				 tbl->slot[i].skip_next_frame = false;
				 tbl->slot[i].state = CRM_REQ_STATE_EMPTY;
				 tbl->slot[i].is_applied = false;
				 tbl = tbl->next;
			}
		}
		in_q->wr_idx = 0;
		in_q->rd_idx = 0;