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

Commit 51c18241 authored by Alok Pandey's avatar Alok Pandey Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: icp: signal error on fences in case of frame process error



If fences are not signaled with error, UMD initiates session reset and
recovery. In case of f/w responds with error the corresponding request
is signaled with Error, UMD cancels the request and continue from next
request.
This change makes sure that if f/w results with error, corresponding
fences are signaled with error.

Change-Id: I219621582dc1dbe742bc854f7d00daa29014831b
Signed-off-by: default avatarAlok Pandey <akumarpa@codeaurora.org>
parent 8cb6469b
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1456,7 +1456,7 @@ static int cam_icp_mgr_handle_frame_process(uint32_t *msg_ptr, int flag)
	ctx_data = (struct cam_icp_hw_ctx_data *)
		U64_TO_PTR(ioconfig_ack->user_data1);
	if (!ctx_data) {
		CAM_ERR(CAM_ICP, "Invalid Context");
		CAM_ERR(CAM_ICP, "Invalid Context req %llu", request_id);
		return -EINVAL;
	}

@@ -1491,6 +1491,11 @@ static int cam_icp_mgr_handle_frame_process(uint32_t *msg_ptr, int flag)
	}
	idx = i;

	if (flag == ICP_FRAME_PROCESS_FAILURE)
		CAM_ERR(CAM_ICP, "Done with error: ctx_id %d req %llu dev %d",
			ctx_data->ctx_id, request_id,
			ctx_data->icp_dev_acquire_info->dev_type);

	buf_data.request_id = hfi_frame_process->request_id[idx];
	ctx_data->ctxt_event_cb(ctx_data->context_priv, flag, &buf_data);
	hfi_frame_process->request_id[idx] = 0;
@@ -1521,6 +1526,8 @@ static int cam_icp_mgr_process_msg_frame_process(uint32_t *msg_ptr)
	if (ioconfig_ack->err_type != HFI_ERR_SYS_NONE) {
		CAM_ERR(CAM_ICP, "failed with error : %u",
			ioconfig_ack->err_type);
		cam_icp_mgr_handle_frame_process(msg_ptr,
			ICP_FRAME_PROCESS_FAILURE);
		return -EIO;
	}