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

Commit 4234aed7 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: reqmgr: Get the index difference properly"

parents ed1f3e86 95912dd2
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -714,6 +714,7 @@ static int __cam_req_mgr_check_sync_for_mslave(
	struct cam_req_mgr_slot      *sync_slot = NULL;
	int sync_slot_idx = 0, prev_idx, next_idx, rd_idx, sync_rd_idx, rc = 0;
	int64_t req_id = 0, sync_req_id = 0;
	int32_t sync_num_slots = 0;

	if (!link->sync_link) {
		CAM_ERR(CAM_CRM, "Sync link null");
@@ -722,6 +723,7 @@ static int __cam_req_mgr_check_sync_for_mslave(

	sync_link = link->sync_link;
	req_id = slot->req_id;
	sync_num_slots = sync_link->req.in_q->num_slots;
	sync_rd_idx = sync_link->req.in_q->rd_idx;

	CAM_DBG(CAM_CRM,
@@ -799,7 +801,8 @@ static int __cam_req_mgr_check_sync_for_mslave(

			if ((sync_link->req.in_q->slot[sync_slot_idx].status !=
				CRM_SLOT_STATUS_REQ_APPLIED) &&
				((sync_slot_idx - rd_idx) >= 1) &&
				(((sync_slot_idx - rd_idx + sync_num_slots) %
				sync_num_slots) >= 1) &&
				(sync_link->req.in_q->slot[rd_idx].status !=
				CRM_SLOT_STATUS_REQ_APPLIED)) {
				CAM_DBG(CAM_CRM,
@@ -865,7 +868,8 @@ static int __cam_req_mgr_check_sync_for_mslave(

			if ((sync_link->req.in_q->slot[sync_slot_idx].status !=
				CRM_SLOT_STATUS_REQ_APPLIED) &&
				((sync_slot_idx - rd_idx) >= 1) &&
				(((sync_slot_idx - rd_idx + sync_num_slots) %
				sync_num_slots) >= 1) &&
				(sync_link->req.in_q->slot[rd_idx].status !=
				CRM_SLOT_STATUS_REQ_APPLIED)) {
				CAM_DBG(CAM_CRM,
@@ -922,6 +926,7 @@ static int __cam_req_mgr_check_sync_req_is_ready(
	struct cam_req_mgr_core_link *sync_link = NULL;
	int64_t req_id = 0;
	int sync_slot_idx = 0, sync_rd_idx = 0, rc = 0;
	int32_t sync_num_slots = 0;

	if (!link->sync_link) {
		CAM_ERR(CAM_CRM, "Sync link null");
@@ -930,6 +935,7 @@ static int __cam_req_mgr_check_sync_req_is_ready(

	sync_link = link->sync_link;
	req_id = slot->req_id;
	sync_num_slots = sync_link->req.in_q->num_slots;

	CAM_DBG(CAM_REQ,
		"link_hdl %x req %lld frame_skip_flag %d ",
@@ -974,7 +980,8 @@ static int __cam_req_mgr_check_sync_req_is_ready(
	sync_rd_idx = sync_link->req.in_q->rd_idx;
	if ((sync_link->req.in_q->slot[sync_slot_idx].status !=
		CRM_SLOT_STATUS_REQ_APPLIED) &&
		((sync_slot_idx - sync_rd_idx) >= 1) &&
		(((sync_slot_idx - sync_rd_idx + sync_num_slots) %
		sync_num_slots) >= 1) &&
		(sync_link->req.in_q->slot[sync_rd_idx].status !=
		CRM_SLOT_STATUS_REQ_APPLIED)) {
		CAM_DBG(CAM_CRM,