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

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

Merge "msm: camera: Add skip for partial lit avoidance" into dev/msm-4.9-camx

parents fd070a90 a4d7dfd6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1507,6 +1507,7 @@ static int __cam_isp_ctx_config_dev_in_top_state(
		add_req.link_hdl = ctx->link_hdl;
		add_req.dev_hdl  = ctx->dev_hdl;
		add_req.req_id   = req->request_id;
		add_req.skip_before_applying = 0;
		rc = ctx->ctx_crm_intf->add_req(&add_req);
		if (rc) {
			CAM_ERR(CAM_ISP, "Error: Adding request id=%llu",
+14 −0
Original line number Diff line number Diff line
@@ -180,6 +180,15 @@ static int __cam_req_mgr_traverse(struct cam_req_mgr_traverse *traverse_data)
		tbl->pd, curr_idx, tbl->slot[curr_idx].state,
		tbl->skip_traverse, traverse_data->in_q->slot[curr_idx].status);

	if (tbl->inject_delay > 0) {
		CAM_DBG(CAM_CRM, "Injecting Delay of one frame");
		apply_data[tbl->pd].req_id = -1;
		tbl->inject_delay--;
		/* This pd table is not ready to proceed with asked idx */
		SET_FAILURE_BIT(traverse_data->result, tbl->pd);
		return -EAGAIN;
	}

	/* Check if req is ready or in skip mode or pd tbl is in skip mode */
	if (tbl->slot[curr_idx].state == CRM_REQ_STATE_READY ||
		traverse_data->in_q->slot[curr_idx].skip_idx == 1 ||
@@ -1210,6 +1219,10 @@ int cam_req_mgr_process_add_req(void *priv, void *data)
		mutex_unlock(&link->req.lock);
		goto end;
	}

	if (add_req->skip_before_applying > tbl->inject_delay)
		tbl->inject_delay = add_req->skip_before_applying;

	slot = &tbl->slot[idx];
	if (slot->state != CRM_REQ_STATE_PENDING &&
		slot->state != CRM_REQ_STATE_EMPTY) {
@@ -1452,6 +1465,7 @@ static int cam_req_mgr_cb_add_req(struct cam_req_mgr_add_request *add_req)
	dev_req->req_id = add_req->req_id;
	dev_req->link_hdl = add_req->link_hdl;
	dev_req->dev_hdl = add_req->dev_hdl;
	dev_req->skip_before_applying = add_req->skip_before_applying;
	task->process_cb = &cam_req_mgr_process_add_req;
	rc = cam_req_mgr_workq_enqueue_task(task, link, CRM_TASK_PRIORITY_0);
	CAM_DBG(CAM_CRM, "X: dev %x dev req %lld",
+2 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ struct cam_req_mgr_tbl_slot {
 * @pd_delta      : differnce between this table's pipeline delay and next
 * @num_slots     : number of request slots present in the table
 * @slot          : array of slots tracking requests availability at devices
 * @inject_delay  : insert extra bubbling for flash type of use cases
 */
struct cam_req_mgr_req_tbl {
	int32_t                     id;
@@ -184,6 +185,7 @@ struct cam_req_mgr_req_tbl {
	int32_t                     pd_delta;
	int32_t                     num_slots;
	struct cam_req_mgr_tbl_slot slot[MAX_REQ_SLOTS];
	uint32_t                    inject_delay;
};

/**
+2 −6
Original line number Diff line number Diff line
@@ -15,13 +15,9 @@
#define CRM_TRACE_ENABLE 0
#define CRM_DEBUG_MUTEX 0

#define SET_SUCCESS_BIT(ret, pd)	{\
	(ret) |= (1 << (pd));	\
	}
#define SET_SUCCESS_BIT(ret, pd)  (ret |= (1 << (pd)))

#define SET_FAILURE_BIT(ret, pd)	{\
	(ret) &= (0 << (pd));	\
	}
#define SET_FAILURE_BIT(ret, pd)  (ret &= (~(1 << (pd))))

#define CRM_GET_REQ_ID(in_q, idx) in_q->slot[idx].req_id

+7 −4
Original line number Diff line number Diff line
@@ -219,12 +219,15 @@ struct cam_req_mgr_error_notify {
 * @link_hdl             : link identifier
 * @dev_hdl              : device handle which has sent this req id
 * @req_id               : req id which device is ready to process
 *
 * @skip_before_applying : before applying req mgr introduce bubble
 *                         by not sending request to device/s.
 *                         ex: IFE and Flash
 */
struct cam_req_mgr_add_request {
	int32_t  link_hdl;
	int32_t  dev_hdl;
	uint64_t req_id;
	uint32_t skip_before_applying;
};


Loading