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

Commit e6222ba1 authored by Tejas Prajapati's avatar Tejas Prajapati
Browse files

msm: camera: reqmgr: Skip reset if no request from UMD



In case of slot is marked as skip idx it will
apply the request and try to reset a previous slot
which might have the request for which we have got a
bubble. To make sure this does not happen, reset a
slot only when the request is valid request and
not the last applied request.

Change-Id: I03a542baffcd332e030d352df5ce19f4dbcc0dd6
Signed-off-by: default avatarTejas Prajapati <tpraja@codeaurora.org>
parent ba9d1bf9
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -351,7 +351,8 @@ static void __cam_req_mgr_reset_req_slot(struct cam_req_mgr_core_link *link,
	CAM_DBG(CAM_CRM, "RESET: idx: %d: slot->status %d", idx, slot->status);

	/* Check if CSL has already pushed new request*/
	if (slot->status == CRM_SLOT_STATUS_REQ_ADDED)
	if (slot->status == CRM_SLOT_STATUS_REQ_ADDED ||
		in_q->last_applied_idx == idx)
		return;

	/* Reset input queue slot */
@@ -512,9 +513,11 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link,
			}
			if (link->req.apply_data[pd].skip_idx ||
				link->req.apply_data[pd].req_id < 0) {
				CAM_DBG(CAM_CRM, "skip %d req_id %lld",
				CAM_DBG(CAM_CRM,
					"skip %d req_id %lld pd %d dev_name %s",
					link->req.apply_data[pd].skip_idx,
					link->req.apply_data[pd].req_id);
					link->req.apply_data[pd].req_id,
					pd, dev->dev_info.name);
				continue;
			}
			if (!(dev->dev_info.trigger & trigger))
@@ -1122,6 +1125,8 @@ 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) &&
+2 −0
Original line number Diff line number Diff line
@@ -233,12 +233,14 @@ struct cam_req_mgr_slot {
 * @slot        : request slot holding incoming request id and bubble info.
 * @rd_idx      : indicates slot index currently in process.
 * @wr_idx      : indicates slot index to hold new upcoming req.
 * @last_applied_idx : indicates slot index last applied successfully.
 */
struct cam_req_mgr_req_queue {
	int32_t                     num_slots;
	struct cam_req_mgr_slot     slot[MAX_REQ_SLOTS];
	int32_t                     rd_idx;
	int32_t                     wr_idx;
	int32_t                     last_applied_idx;
};

/**