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

Commit 3cc51ab3 authored by Sridhar Gujje's avatar Sridhar Gujje
Browse files

Merge remote-tracking branch 'dev/msm-4.14-camx' into msm-4.14 10/23



* commit 'a11f39a8':
  msm: camera:icp: Fix deadlock during ICP pagefault handling
  msm: camera: isp: Reset sof counter before enable the CSID path
  msm: camera: isp: Disable tasklet once
  msm: camera: isp: Mask unused rdi interrupts
  msm: camera: isp: CSID error propagation
  msm: camera: isp: Skip reapply of DMI config on bubble recovery
  ARM: dts: msm: Add svsl1 level for CSID clock in atoll

Change-Id: I75fdc6a46780a4828ba8798d43d7750bec7d35ae
Signed-off-by: default avatarSridhar Gujje <sgujje@codeaurora.org>
parents 8ff9672b a11f39a8
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -899,8 +899,9 @@
			<&clock_camcc CAM_CC_IFE_0_AXI_CLK>;
		clock-rates =
			<0 0 0 0 0 0 270000000 0 0 0 360000000 0 0>,
			<0 0 0 0 0 0 360000000 0 0 0 432000000 0 0>,
			<0 0 0 0 0 0 480000000 0 0 0 600000000 0 0>;
		clock-cntl-level = "svs", "turbo";
		clock-cntl-level = "svs", "svs_l1", "turbo";
		src-clock-name = "ife_csid_clk_src";
		ppi-enable;
		status = "ok";
@@ -987,8 +988,9 @@
			<&clock_camcc CAM_CC_IFE_1_AXI_CLK>;
		clock-rates =
			<0 0 0 0 0 0 270000000 0 0 0 360000000 0 0>,
			<0 0 0 0 0 0 360000000 0 0 0 432000000 0 0>,
			<0 0 0 0 0 0 480000000 0 0 0 600000000 0 0>;
		clock-cntl-level = "svs", "turbo";
		clock-cntl-level = "svs", "svs_l1", "turbo";
		src-clock-name = "ife_csid_clk_src";
		ppi-enable;
		status = "ok";
@@ -1072,8 +1074,9 @@
			<&clock_camcc CAM_CC_CAMNOC_AXI_CLK>;
		clock-rates =
			<0 0 0 0 0 0 270000000 0 0 0 360000000 0>,
			<0 0 0 0 0 0 360000000 0 0 0 432000000 0>,
			<0 0 0 0 0 0 480000000 0 0 0 600000000 0>;
		clock-cntl-level = "svs", "turbo";
		clock-cntl-level = "svs", "svs_l1", "turbo";
		src-clock-name = "ife_csid_clk_src";
		ppi-enable;
		status = "ok";
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -80,4 +80,8 @@ struct cam_hw_intf {
	void                        *hw_priv;
};

/* hardware event callback function type */
typedef int (*cam_hw_mgr_event_cb_func)(void *priv, uint32_t evt_id,
	void *evt_data);

#endif /* _CAM_HW_INTF_H_ */
+2 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ struct cam_hw_stream_setttings {
 * @num_out_map_entries:   Number of out map entries
 * @priv:                  Private pointer
 * @request_id:            Request ID
 * @reapply                True if reapplying after bubble
 *
 */
struct cam_hw_config_args {
@@ -222,6 +223,7 @@ struct cam_hw_config_args {
	void                           *priv;
	uint64_t                        request_id;
	bool                            init_packet;
	bool                            reapply;
};

/**
+1 −5
Original line number Diff line number Diff line
@@ -45,12 +45,10 @@ static int cam_icp_context_dump_active_request(void *data, unsigned long iova,
		return -EINVAL;
	}

	mutex_lock(&ctx->ctx_mutex);

	if (ctx->state < CAM_CTX_ACQUIRED || ctx->state > CAM_CTX_ACTIVATED) {
		CAM_ERR(CAM_ICP, "Invalid state icp ctx %d state %d",
			ctx->ctx_id, ctx->state);
		goto end;
		return -EINVAL;
	}

	CAM_INFO(CAM_ICP, "iommu fault for icp ctx %d state %d",
@@ -71,8 +69,6 @@ static int cam_icp_context_dump_active_request(void *data, unsigned long iova,
				req->request_id, rc);
	}

end:
	mutex_unlock(&ctx->ctx_mutex);
	return rc;
}

+21 −4
Original line number Diff line number Diff line
@@ -698,6 +698,7 @@ static int __cam_isp_ctx_handle_buf_done_in_activated_state(
	} else {
		list_del_init(&req->list);
		list_add_tail(&req->list, &ctx->free_req_list);
		req_isp->reapply = false;

		CAM_DBG(CAM_REQ,
			"Move active request %lld to free list(cnt = %d) [all fences done], ctx %u",
@@ -1125,6 +1126,7 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp,
		list);
	req_isp = (struct cam_isp_ctx_req *)req->req_priv;
	req_isp->bubble_detected = true;
	req_isp->reapply = true;

	CAM_INFO(CAM_ISP, "ctx:%d Report Bubble flag %d req id:%lld",
		ctx->ctx_id, req_isp->bubble_report, req->request_id);
@@ -1288,6 +1290,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied(
	CAM_INFO(CAM_ISP, "Ctx:%d Report Bubble flag %d req id:%lld",
		ctx->ctx_id, req_isp->bubble_report, req->request_id);
	__cam_isp_ctx_dump_state_monitor_array(ctx_isp, true);
	req_isp->reapply = true;

	if (req_isp->bubble_report && ctx->ctx_crm_intf &&
		ctx->ctx_crm_intf->notify_err) {
@@ -1378,11 +1381,16 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp,
			(struct cam_isp_hw_error_event_data *)evt_data;

	uint32_t error_type = error_event_data->error_type;
	bool                             is_csid_fatal = false;

	CAM_DBG(CAM_ISP, "Enter error_type = %d", error_type);
	if ((error_type == CAM_ISP_HW_ERROR_OVERFLOW) ||
		(error_type == CAM_ISP_HW_ERROR_BUSIF_OVERFLOW))
		(error_type == CAM_ISP_HW_ERROR_BUSIF_OVERFLOW)) {
		notify.error = CRM_KMD_ERR_OVERFLOW;
	} else if (error_type == CAM_ISP_HW_ERROR_CSID_FATAL) {
		notify.error = CRM_KMD_ERR_FATAL;
		is_csid_fatal = true;
	}

	/*
	 * The error is likely caused by first request on the active list.
@@ -1552,9 +1560,14 @@ static int __cam_isp_ctx_handle_error(struct cam_isp_context *ctx_isp,
		 * and to dump relevant info
		 */

		if (notify.error == CRM_KMD_ERR_OVERFLOW) {
		if ((notify.error == CRM_KMD_ERR_OVERFLOW) ||
			(is_csid_fatal == true)) {
			req_msg.session_hdl = ctx_isp->base->session_hdl;
			req_msg.u.err_msg.device_hdl = ctx_isp->base->dev_hdl;
			if (is_csid_fatal == true)
				req_msg.u.err_msg.error_type =
				    CAM_REQ_MGR_ERROR_TYPE_FULL_RECOVERY;
			else
				req_msg.u.err_msg.error_type =
				    CAM_REQ_MGR_ERROR_TYPE_RECOVERY;
			req_msg.u.err_msg.link_hdl = ctx_isp->base->link_hdl;
@@ -2055,6 +2068,7 @@ static int __cam_isp_ctx_apply_req_in_activated_state(
	cfg.num_hw_update_entries = req_isp->num_cfg;
	cfg.priv  = &req_isp->hw_update_data;
	cfg.init_packet = 0;
	cfg.reapply = req_isp->reapply;

	rc = ctx->hw_mgr_intf->hw_config(ctx->hw_mgr_intf->hw_mgr_priv, &cfg);
	if (rc) {
@@ -2335,6 +2349,7 @@ static int __cam_isp_ctx_flush_req(struct cam_context *ctx,
				req_isp->fence_map_out[i].sync_id = -1;
			}
		}
		req_isp->reapply = false;
		list_add_tail(&req->list, &ctx->free_req_list);
	}

@@ -2697,6 +2712,7 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_applied(
	CAM_INFO(CAM_ISP, "Ctx:%d Report Bubble flag %d req id:%lld",
		ctx->ctx_id, req_isp->bubble_report, req->request_id);
	__cam_isp_ctx_dump_state_monitor_array(ctx_isp, true);
	req_isp->reapply = true;

	if (req_isp->bubble_report && ctx->ctx_crm_intf &&
		ctx->ctx_crm_intf->notify_err) {
@@ -3753,6 +3769,7 @@ static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx,
	start_isp.hw_config.num_hw_update_entries = req_isp->num_cfg;
	start_isp.hw_config.priv  = &req_isp->hw_update_data;
	start_isp.hw_config.init_packet = 1;
	start_isp.hw_config.reapply = 0;
	start_isp.start_only = false;

	atomic_set(&ctx_isp->process_bubble, 0);
Loading