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

Commit a358e148 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram
Browse files

msm: camera: reqmgr: Allow requests to be submitted in IDLE state



Allow requests to be submitted by UMD and added by devices on
the link, irrespective of the link state.

CRs-Fixed: 2718108
Change-Id: Ie6a6f3576bc6aeb1657ee751dc72779cafec7ffe
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent c8f19704
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -2857,20 +2857,12 @@ static int cam_req_mgr_cb_add_req(struct cam_req_mgr_add_request *add_req)
	}

	CAM_DBG(CAM_REQ,
		"dev name %s dev_hdl %d dev req %lld, trigger_eof: %d",
		"dev name %s dev_hdl %d dev req %lld, trigger_eof %d link_state %d",
		__cam_req_mgr_dev_handle_to_name(add_req->dev_hdl, link),
		add_req->dev_hdl, add_req->req_id, add_req->trigger_eof);
		add_req->dev_hdl, add_req->req_id, add_req->trigger_eof,
		link->state);

	mutex_lock(&link->lock);
	spin_lock_bh(&link->link_state_spin_lock);
	if (link->state < CAM_CRM_LINK_STATE_READY) {
		CAM_WARN(CAM_CRM, "invalid link state:%d", link->state);
		rc = -EPERM;
		spin_unlock_bh(&link->link_state_spin_lock);
		goto end;
	}
	spin_unlock_bh(&link->link_state_spin_lock);

	/* Validate if req id is present in input queue */
	idx = __cam_req_mgr_find_slot_for_req(link->req.in_q, add_req->req_id);
	if (idx < 0) {