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

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

Merge "Merge remote-tracking branch 'dev/msm-4.14-camx' into msm-4.14 11/18"

parents 0a999b0b 88eb50f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -820,7 +820,7 @@ void cam_cdm_util_dump_cmd_bufs_v2(
	}
	buf_now = dump_info->src_start;
	do {
		cmd = *dump_info->src_start;
		cmd = *buf_now;
		cmd = cmd >> CAM_CDM_COMMAND_OFFSET;

		switch (cmd) {
+27 −6
Original line number Diff line number Diff line
@@ -695,6 +695,16 @@ static int __cam_isp_ctx_handle_buf_done_in_activated_state(
			ctx_isp->substate_activated);
		__cam_isp_ctx_update_event_record(ctx_isp,
			CAM_ISP_CTX_EVENT_BUFDONE, req);
	} else if (req->request_id > ctx_isp->req_info.reported_req_id) {
		CAM_INFO_RATE_LIMIT(CAM_ISP,
			"Not moving req_id %lld to free list. rep_req %lld",
			req->request_id, ctx_isp->req_info.reported_req_id);
		__cam_isp_ctx_update_state_monitor_array(ctx_isp,
			CAM_ISP_HW_EVENT_DONE,
			ctx_isp->substate_activated,
			ctx_isp->substate_activated);
		__cam_isp_ctx_update_event_record(ctx_isp,
			CAM_ISP_CTX_EVENT_BUFDONE, req);
	} else {
		list_del_init(&req->list);
		list_add_tail(&req->list, &ctx->free_req_list);
@@ -907,6 +917,7 @@ static int __cam_isp_ctx_notify_sof_in_activated_state(
	struct cam_context *ctx = ctx_isp->base;
	struct cam_ctx_request  *req = NULL;
	uint64_t  request_id  = 0;
	struct cam_isp_ctx_req  *req_isp = NULL;

	/*
	 * notify reqmgr with sof signal. Note, due to scheduling delay
@@ -934,6 +945,8 @@ static int __cam_isp_ctx_notify_sof_in_activated_state(
			if (req->request_id >
				ctx_isp->req_info.reported_req_id) {
				request_id = req->request_id;
				req_isp =
					(struct cam_isp_ctx_req *)req->req_priv;
				ctx_isp->req_info.reported_req_id = request_id;
				ctx_isp->req_info.last_reported_id_time_stamp =
					jiffies_to_msecs(jiffies);
@@ -966,6 +979,14 @@ static int __cam_isp_ctx_notify_sof_in_activated_state(
		rc = -EFAULT;
	}

	if ((req_isp) && (req_isp->num_acked == req_isp->num_fence_map_out)) {
		CAM_INFO_RATE_LIMIT(CAM_REQ,
			"Move active req %lld to free [all fences done] ctx %u",
			req->request_id, ctx_isp->active_req_cnt, ctx->ctx_id);
		list_del_init(&req->list);
		list_add_tail(&req->list, &ctx->free_req_list);
	}

	return 0;
}

@@ -3824,12 +3845,6 @@ static int __cam_isp_ctx_stop_dev_in_activated_unlock(
		(struct cam_isp_context *) ctx->ctx_priv;
	struct cam_isp_stop_args         stop_isp;

	/* Mask off all the incoming hardware events */
	spin_lock_bh(&ctx->lock);
	ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HALT;
	spin_unlock_bh(&ctx->lock);
	CAM_DBG(CAM_ISP, "next substate %d", ctx_isp->substate_activated);

	/* stop hw first */
	if (ctx_isp->hw_ctx) {
		stop.ctxt_to_hw_map = ctx_isp->hw_ctx;
@@ -3846,6 +3861,12 @@ static int __cam_isp_ctx_stop_dev_in_activated_unlock(
			&stop);
	}

	/* Mask off all the incoming hardware events */
	spin_lock_bh(&ctx->lock);
	ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HALT;
	spin_unlock_bh(&ctx->lock);
	CAM_DBG(CAM_ISP, "next substate %d", ctx_isp->substate_activated);

	while (!list_empty(&ctx->pending_req_list)) {
		req = list_first_entry(&ctx->pending_req_list,
				struct cam_ctx_request, list);