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

Commit 99dff463 authored by Haritha Chintalapati's avatar Haritha Chintalapati Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: reduce bufdone error logs" into camera-kernel.lnx.4.0

parents 20e88f8b 1f9cc4f4
Loading
Loading
Loading
Loading
+27 −8
Original line number Diff line number Diff line
@@ -839,6 +839,7 @@ static int __cam_isp_ctx_handle_buf_done_for_req_list(
				"Move active request %lld to free list(cnt = %d) [flushed], ctx %u",
				buf_done_req_id, ctx_isp->active_req_cnt,
				ctx->ctx_id);
			ctx_isp->last_bufdone_err_apply_req_id = 0;
		} else {
			list_add(&req->list, &ctx->pending_req_list);
			CAM_DBG(CAM_REQ,
@@ -864,6 +865,7 @@ static int __cam_isp_ctx_handle_buf_done_for_req_list(
			"Move active request %lld to free list(cnt = %d) [all fences done], ctx %u",
			buf_done_req_id, ctx_isp->active_req_cnt, ctx->ctx_id);
		ctx_isp->req_info.last_bufdone_req_id = req->request_id;
		ctx_isp->last_bufdone_err_apply_req_id = 0;
	}

	cam_cpas_notify_event("IFE BufDone", buf_done_req_id);
@@ -1167,11 +1169,11 @@ static int __cam_isp_ctx_handle_buf_done_for_request_verify_addr(
			 */
			req_isp->deferred_fence_map_index[deferred_indx] = j;
			req_isp->num_deferred_acks++;
			CAM_WARN(CAM_ISP,
			CAM_DBG(CAM_ISP,
				"ctx[%d] : Deferred buf done for %llu with bubble state %d recovery %d",
				ctx->ctx_id, req->request_id, bubble_state,
				req_isp->bubble_report);
			CAM_WARN(CAM_ISP,
			CAM_DBG(CAM_ISP,
				"ctx[%d] : Deferred info : num_acks=%d, fence_map_index=%d, resource_handle=0x%x, sync_id=%d",
				ctx->ctx_id, req_isp->num_deferred_acks, j,
				req_isp->fence_map_out[j].resource_handle,
@@ -1383,20 +1385,28 @@ static int __cam_isp_ctx_handle_buf_done_verify_addr(
	struct cam_ctx_request *req;
	struct cam_ctx_request *next_req = NULL;
	struct cam_context *ctx = ctx_isp->base;
	bool  req_in_wait_list = false;

	if (list_empty(&ctx->active_req_list)) {
		CAM_WARN(CAM_ISP,
			"Buf done with no active request bubble_state=%d",
			bubble_state);

		if (!list_empty(&ctx->wait_req_list)) {
			struct cam_isp_ctx_req *req_isp;

			req = list_first_entry(&ctx->wait_req_list,
				struct cam_ctx_request, list);

			req_in_wait_list = true;
			if (ctx_isp->last_applied_req_id !=
				ctx_isp->last_bufdone_err_apply_req_id) {
				CAM_WARN(CAM_ISP,
				"Buf done with no active request but with req in wait list, req %llu",
				req->request_id);
					"Buf done with no active request but with req in wait list, req %llu last apply id:%lld last err id:%lld",
					req->request_id,
					ctx_isp->last_applied_req_id,
					ctx_isp->last_bufdone_err_apply_req_id);
				ctx_isp->last_bufdone_err_apply_req_id =
					ctx_isp->last_applied_req_id;
			}

			req_isp = (struct cam_isp_ctx_req *) req->req_priv;

			/*
@@ -1410,6 +1420,15 @@ static int __cam_isp_ctx_handle_buf_done_verify_addr(
			__cam_isp_ctx_handle_buf_done_for_request_verify_addr(
				ctx_isp, req, done, bubble_state, true, true);
		}

		if (!req_in_wait_list  && (ctx_isp->last_applied_req_id !=
			ctx_isp->last_bufdone_err_apply_req_id)) {
			CAM_WARN(CAM_ISP,
				"Buf done with no active request bubble_state=%d last_applied_req_id:%lld ",
				bubble_state, ctx_isp->last_applied_req_id);
			ctx_isp->last_bufdone_err_apply_req_id =
					ctx_isp->last_applied_req_id;
		}
		return 0;
	}

+2 −0
Original line number Diff line number Diff line
@@ -277,6 +277,7 @@ struct cam_isp_context_event_record {
 *                             decide whether to apply request in offline ctx
 * @workq:                     Worker thread for offline ife
 * @trigger_id:                ID provided by CRM for each ctx on the link
 * @last_bufdone_err_apply_req_id:  last bufdone error apply request id
 *
 */
struct cam_isp_context {
@@ -323,6 +324,7 @@ struct cam_isp_context {
	atomic_t                              rxd_epoch;
	struct cam_req_mgr_core_workq        *workq;
	int32_t                               trigger_id;
	int64_t                               last_bufdone_err_apply_req_id;
};

/**