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

Commit 2332d9cd authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: reqmgr: Add frame drop log message" into dev/msm-4.9-camx

parents 07fa9555 cad53e48
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ static int __cam_req_mgr_traverse(struct cam_req_mgr_traverse *traverse_data)
					traverse_data->in_q, curr_idx);
				apply_data[tbl->pd].idx = curr_idx;

				CAM_DBG(CAM_CRM, "req_id: %d with pd of %d",
				CAM_DBG(CAM_CRM, "req_id: %lld with pd of %d",
				apply_data[tbl->pd].req_id,
				apply_data[tbl->pd].pd);
				/*
@@ -248,6 +248,11 @@ static int __cam_req_mgr_traverse(struct cam_req_mgr_traverse *traverse_data)
		}
	} else {
		/* This pd table is not ready to proceed with asked idx */
		CAM_INFO(CAM_CRM,
			"Skip Frame: req: %lld not ready pd: %d open_req count: %d",
			CRM_GET_REQ_ID(traverse_data->in_q, curr_idx),
			tbl->pd,
			traverse_data->open_req_cnt);
		SET_FAILURE_BIT(traverse_data->result, tbl->pd);
		return -EAGAIN;
	}
@@ -450,6 +455,9 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link,
				rc = dev->ops->apply_req(&apply_req);
				if (rc < 0)
					break;

				if (pd == link->max_delay)
					link->open_req_cnt--;
			}
		}
	}
@@ -509,6 +517,7 @@ static int __cam_req_mgr_check_link_is_ready(struct cam_req_mgr_core_link *link,
	traverse_data.result = 0;
	traverse_data.validate_only = validate_only;
	traverse_data.self_link = self_link;
	traverse_data.open_req_cnt = link->open_req_cnt;
	/*
	 *  Traverse through all pd tables, if result is success,
	 *  apply the settings
@@ -1513,6 +1522,7 @@ int cam_req_mgr_process_sched_req(void *priv, void *data)
	slot->sync_mode = sched_req->sync_mode;
	slot->skip_idx = 0;
	slot->recover = sched_req->bubble_enable;
	link->open_req_cnt++;
	__cam_req_mgr_inc_idx(&in_q->wr_idx, 1, in_q->num_slots);
	mutex_unlock(&link->req.lock);

+5 −0
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ enum cam_req_mgr_link_state {
 * @validate_only : Whether to validate only and/or update settings
 * @self_link     : To indicate whether the check is for the given link or the
 *                  other sync link
 * @open_req_cnt  : Count of open requests yet to be serviced in the kernel.
 */
struct cam_req_mgr_traverse {
	int32_t                       idx;
@@ -143,6 +144,7 @@ struct cam_req_mgr_traverse {
	struct cam_req_mgr_req_queue *in_q;
	bool                          validate_only;
	bool                          self_link;
	int32_t                      open_req_cnt;
};

/**
@@ -301,6 +303,8 @@ struct cam_req_mgr_connected_device {
 * @sync_link_sof_skip   : flag determines if a pkt is not available for a given
 *                         frame in a particular link skip corresponding
 *                         frame in sync link as well.
 * @open_req_cnt         : Counter to keep track of open requests that are yet
 *                         to be serviced in the kernel.
 *
 */
struct cam_req_mgr_core_link {
@@ -324,6 +328,7 @@ struct cam_req_mgr_core_link {
	int64_t                              sync_self_ref;
	bool                                 frame_skip_flag;
	bool                                 sync_link_sof_skip;
	int32_t                              open_req_cnt;
};

/**