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

Commit 237e6e61 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "UPSTREAM commit 'ec43f060' 10/23"

parents af92a3d1 779c5179
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@ First Level Node - CSIPHY device
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,csiphy-v1.0",
	"qcom,csiphy-v1.1", "qcom,csiphy-v2.0", "qcom,csiphy".
	"qcom,csiphy-v1.1", "qcom,csiphy-v1.2",
	"qcom,csiphy-v2.0", "qcom,csiphy".

- cell-index: csiphy hardware core index
  Usage: required
+1 −1
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@
			<&tlmm 26 0>;
		gpio-reset = <1>;
		gpio-req-tbl-num = <0 1 2>;
		gpio-req-tbl-flags = <1 0 1>;
		gpio-req-tbl-flags = <1 0 0>;
		gpio-req-tbl-label = "CAMIF_MCLK3",
					"CAM_RESET3",
					"IMG_START";
+23 −14
Original line number Diff line number Diff line
@@ -42,25 +42,34 @@ static int cam_context_handle_hw_event(void *context, uint32_t evt_id,
int cam_context_shutdown(struct cam_context *ctx)
{
	int rc = 0;
	int32_t ctx_hdl = ctx->dev_hdl;
	struct cam_release_dev_cmd cmd;

	mutex_lock(&ctx->ctx_mutex);
	if (ctx->state_machine[ctx->state].ioctl_ops.stop_dev) {
		rc = ctx->state_machine[ctx->state].ioctl_ops.stop_dev(
			ctx, NULL);
		if (rc < 0)
			CAM_ERR(CAM_CORE, "Error while dev stop %d", rc);
	}
	if (ctx->state_machine[ctx->state].ioctl_ops.release_dev) {
		rc = ctx->state_machine[ctx->state].ioctl_ops.release_dev(
			ctx, NULL);
		if (rc < 0)
			CAM_ERR(CAM_CORE, "Error while dev release %d", rc);
	if (ctx->state > CAM_CTX_AVAILABLE && ctx->state < CAM_CTX_STATE_MAX) {
		cmd.session_handle = ctx->session_hdl;
		cmd.dev_handle = ctx->dev_hdl;
		rc = cam_context_handle_release_dev(ctx, &cmd);
		if (rc)
			CAM_ERR(CAM_CORE,
				"context release failed for dev_name %s",
				ctx->dev_name);
		else
			cam_context_putref(ctx);
	} else {
		CAM_WARN(CAM_CORE,
			"dev %s context id %u state %d invalid to release hdl",
			ctx->dev_name, ctx->ctx_id, ctx->state);
		rc = -EINVAL;
	}
	mutex_unlock(&ctx->ctx_mutex);

	if (!rc)
		rc = cam_destroy_device_hdl(ctx_hdl);
	rc = cam_destroy_device_hdl(ctx->dev_hdl);
	if (rc)
		CAM_ERR(CAM_CORE, "destroy device hdl failed for node %s",
			ctx->dev_name);
	else
		ctx->dev_hdl = -1;

	return rc;
}

+2 −3
Original line number Diff line number Diff line
@@ -344,6 +344,8 @@ static int __cam_node_handle_release_dev(struct cam_node *node,
	if (rc)
		CAM_ERR(CAM_CORE, "destroy device hdl failed for node %s",
			node->name);
	else
		ctx->dev_hdl = -1;

	CAM_DBG(CAM_CORE, "[%s] Release ctx_id=%d, refcount=%d",
		node->name, ctx->ctx_id,
@@ -510,9 +512,6 @@ int cam_node_shutdown(struct cam_node *node)
				"Node [%s] invoking shutdown on context [%d]",
				node->name, i);
			rc = cam_context_shutdown(&(node->ctx_list[i]));
			if (rc)
				continue;
			cam_context_putref(&(node->ctx_list[i]));
		}
	}

+6 −5
Original line number Diff line number Diff line
@@ -1464,10 +1464,6 @@ static int cam_icp_mgr_handle_frame_process(uint32_t *msg_ptr, int flag)
		CAM_ERR(CAM_ICP, "Invalid Context");
		return -EINVAL;
	}
	CAM_DBG(CAM_REQ,
		"ctx_id : %u, request_id :%lld dev_type: %d",
		ctx_data->ctx_id, request_id,
		ctx_data->icp_dev_acquire_info->dev_type);

	mutex_lock(&ctx_data->ctx_mutex);
	cam_icp_ctx_timer_reset(ctx_data);
@@ -1478,6 +1474,11 @@ static int cam_icp_mgr_handle_frame_process(uint32_t *msg_ptr, int flag)
		return 0;
	}

	CAM_DBG(CAM_REQ,
		"ctx_id : %u, request_id :%lld dev_type: %d",
		ctx_data->ctx_id, request_id,
		ctx_data->icp_dev_acquire_info->dev_type);

	clk_type = ICP_DEV_TYPE_TO_CLK_TYPE(
			ctx_data->icp_dev_acquire_info->dev_type);
	cam_icp_device_timer_reset(&icp_hw_mgr, clk_type);
@@ -4555,7 +4556,7 @@ static int cam_icp_mgr_create_wq(void)
		goto debugfs_create_failed;

	icp_hw_mgr.icp_pc_flag = true;
	icp_hw_mgr.ipe_bps_pc_flag = true;
	icp_hw_mgr.ipe_bps_pc_flag = false;

	for (i = 0; i < ICP_WORKQ_NUM_TASK; i++)
		icp_hw_mgr.msg_work->task.pool[i].payload =
Loading