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

Commit 9ecd2916 authored by Viswanadha Raju Thotakura's avatar Viswanadha Raju Thotakura Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Avoid applying while processing bubble recovery" into dev/msm-4.14-camx

parents 88a0c2d2 ddf00b1b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -488,6 +488,7 @@ static int __cam_isp_ctx_handle_buf_done_in_activated_state(
		req_isp->bubble_detected = false;
		list_del_init(&req->list);
		list_add(&req->list, &ctx->pending_req_list);
		atomic_set(&ctx_isp->process_bubble, 0);

		CAM_DBG(CAM_REQ,
			"Move active request %lld to pending list(cnt = %d) [bubble recovery]",
@@ -805,6 +806,7 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp,
		notify.req_id = req->request_id;
		notify.error = CRM_KMD_ERR_BUBBLE;
		ctx->ctx_crm_intf->notify_err(&notify);
		atomic_set(&ctx_isp->process_bubble, 1);
		CAM_DBG(CAM_ISP, "Notify CRM about Bubble frame %lld",
			ctx_isp->frame_id);
	} else {
@@ -1302,6 +1304,14 @@ static int __cam_isp_ctx_apply_req_in_activated_state(
	 */
	ctx_isp = (struct cam_isp_context *) ctx->ctx_priv;

	if (atomic_read(&ctx_isp->process_bubble)) {
		CAM_DBG(CAM_ISP,
			"Processing bubble cannot apply Request Id %llu",
			apply->request_id);
		rc = -EAGAIN;
		goto end;
	}

	spin_lock_bh(&ctx->lock);
	req = list_first_entry(&ctx->pending_req_list, struct cam_ctx_request,
		list);
+3 −0
Original line number Diff line number Diff line
@@ -144,6 +144,8 @@ struct cam_isp_context_state_monitor {
 * @base:                      Common context object pointer
 * @frame_id:                  Frame id tracking for the isp context
 * @substate_actiavted:        Current substate for the activated state.
 * @process_bubble:            Atomic variable to check if ctx is still
 *                             processing bubble.
 * @substate_machine:          ISP substate machine for external interface
 * @substate_machine_irq:      ISP substate machine for irq handling
 * @req_base:                  Common request object storage
@@ -170,6 +172,7 @@ struct cam_isp_context {

	int64_t                          frame_id;
	uint32_t                         substate_activated;
	atomic_t                         process_bubble;
	struct cam_ctx_ops              *substate_machine;
	struct cam_isp_ctx_irq_ops      *substate_machine_irq;