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

Commit f56961a5 authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: reqmgr: Reduce delay by one frame during bubble recovery"...

Merge "msm: camera: reqmgr: Reduce delay by one frame during bubble recovery" into camera-kernel.lnx.3.1
parents 4fa1726f a1c2e500
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -1335,6 +1335,11 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp,
		notify.dev_hdl = ctx->dev_hdl;
		notify.req_id = req->request_id;
		notify.error = CRM_KMD_ERR_BUBBLE;
		notify.trigger = 0;
		if (ctx_isp->subscribe_event & CAM_TRIGGER_POINT_SOF)
			notify.trigger = CAM_TRIGGER_POINT_SOF;
		notify.frame_id = ctx_isp->frame_id;
		notify.sof_timestamp_val = ctx_isp->sof_timestamp_val;
		CAM_WARN(CAM_ISP,
			"Notify CRM about Bubble req %lld frame %lld, ctx %u",
			req->request_id, ctx_isp->frame_id, ctx->ctx_id);
@@ -1513,6 +1518,11 @@ static int __cam_isp_ctx_epoch_in_bubble_applied(
		notify.dev_hdl = ctx->dev_hdl;
		notify.req_id = req->request_id;
		notify.error = CRM_KMD_ERR_BUBBLE;
		notify.trigger = 0;
		if (ctx_isp->subscribe_event & CAM_TRIGGER_POINT_SOF)
			notify.trigger = CAM_TRIGGER_POINT_SOF;
		notify.frame_id = ctx_isp->frame_id;
		notify.sof_timestamp_val = ctx_isp->sof_timestamp_val;
		CAM_WARN(CAM_REQ,
			"Notify CRM about Bubble req_id %llu frame %lld, ctx %u",
			req->request_id, ctx_isp->frame_id, ctx->ctx_id);
@@ -3021,6 +3031,11 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_applied(
		notify.dev_hdl = ctx->dev_hdl;
		notify.req_id = req->request_id;
		notify.error = CRM_KMD_ERR_BUBBLE;
		notify.trigger = 0;
		if (ctx_isp->subscribe_event & CAM_TRIGGER_POINT_SOF)
			notify.trigger = CAM_TRIGGER_POINT_SOF;
		notify.frame_id = ctx_isp->frame_id;
		notify.sof_timestamp_val = ctx_isp->sof_timestamp_val;
		CAM_WARN(CAM_ISP,
			"Notify CRM about Bubble req %lld frame %lld ctx %u",
			req->request_id,
+30 −0
Original line number Diff line number Diff line
@@ -2342,6 +2342,35 @@ int cam_req_mgr_process_add_req(void *priv, void *data)
	return rc;
}

/**
 * __cam_req_mgr_apply_on_bubble()
 *
 * @brief    : This API tries to apply settings to the device
 *             with highest pd on the bubbled frame
 * @link     : link information.
 * @err_info : contains information about frame_id, trigger etc.
 *
 */
void __cam_req_mgr_apply_on_bubble(
	struct cam_req_mgr_core_link    *link,
	struct cam_req_mgr_error_notify *err_info)
{
	int rc = 0;
	struct cam_req_mgr_trigger_notify trigger_data;

	trigger_data.dev_hdl = err_info->dev_hdl;
	trigger_data.frame_id = err_info->frame_id;
	trigger_data.link_hdl = err_info->link_hdl;
	trigger_data.sof_timestamp_val =
		err_info->sof_timestamp_val;
	trigger_data.trigger = err_info->trigger;

	rc = __cam_req_mgr_process_req(link, &trigger_data);
	if (rc)
		CAM_ERR(CAM_CRM,
			"Failed to apply request on bubbled frame");
}

/**
 * cam_req_mgr_process_error()
 *
@@ -2432,6 +2461,7 @@ int cam_req_mgr_process_error(void *priv, void *data)
			link->state = CAM_CRM_LINK_STATE_ERR;
			spin_unlock_bh(&link->link_state_spin_lock);
			link->open_req_cnt++;
			__cam_req_mgr_apply_on_bubble(link, err_info);
		}
	}
	mutex_unlock(&link->req.lock);
+6 −0
Original line number Diff line number Diff line
@@ -239,12 +239,18 @@ struct cam_req_mgr_timer_notify {
 * @link_hdl : link identifier
 * @dev_hdl  : device handle which has sent this req id
 * @req_id   : req id which hit error
 * @frame_id : frame id for internal tracking
 * @trigger  : trigger point of this notification, CRM will send apply
 * @sof_timestamp_val : Captured time stamp value at sof hw event
 * @error    : what error device hit while processing this req
 */
struct cam_req_mgr_error_notify {
	int32_t  link_hdl;
	int32_t  dev_hdl;
	uint64_t req_id;
	int64_t  frame_id;
	uint32_t trigger;
	uint64_t sof_timestamp_val;
	enum cam_req_mgr_device_error error;
};