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

Commit 44832ba6 authored by Sridhar Gujje's avatar Sridhar Gujje
Browse files

Merge commit '8b63da78' into msm-4.9 - PC 156



* commit '8b63da78:
  msm: camera: isp: put tasklet cmd back to free list at start
  msm: camera: Add NULL check before accessing power settings
  msm: camera: Increase CCI time out to 1.5 sec to fix the time out failures
  msm: camera: isp: Add debug logs
  msm: camera: isp: only wait for cdm callback for start
  msm: camera: core: Add debug messages for cam context leak
  msm: camera: isp: Poll for CSID hardware reset status
  msm: camera: sensor: Add slave address info
  msm: camera: reqmgr: Handle inject delay per req_id

Change-Id: Ia15166a6a1897cba8c637afe3aef8fcd3a082cfa
Signed-off-by: default avatarSridhar Gujje <sgujje@codeaurora.org>
parents a385b633 8b63da78
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -183,6 +183,7 @@ struct cam_hw_config_args {
	uint32_t                        num_out_map_entries;
	void                           *priv;
	uint64_t                        request_id;
	bool                            init_packet;
};

/**
+39 −0
Original line number Diff line number Diff line
@@ -18,6 +18,34 @@
#include "cam_trace.h"
#include "cam_debug_util.h"

static void cam_node_print_ctx_state(
	struct cam_node *node)
{
	int i;
	struct cam_context *ctx;

	CAM_INFO(CAM_CORE, "[%s] state=%d, ctx_size %d",
		node->name, node->state, node->ctx_size);

	mutex_lock(&node->list_mutex);
	for (i = 0; i < node->ctx_size; i++) {
		ctx = &node->ctx_list[i];

		spin_lock(&ctx->lock);
		CAM_INFO(CAM_CORE,
			"[%s][%d] : state=%d, refcount=%d, active_req_list=%d, pending_req_list=%d, wait_req_list=%d, free_req_list=%d",
			ctx->dev_name ? ctx->dev_name : "null",
			i, ctx->state,
			atomic_read(&(ctx->refcount.refcount)),
			list_empty(&ctx->active_req_list),
			list_empty(&ctx->pending_req_list),
			list_empty(&ctx->wait_req_list),
			list_empty(&ctx->free_req_list));
		spin_unlock(&ctx->lock);
	}
	mutex_unlock(&node->list_mutex);
}

static struct cam_context *cam_node_get_ctxt_from_free_list(
		struct cam_node *node)
{
@@ -75,6 +103,10 @@ static int __cam_node_handle_acquire_dev(struct cam_node *node,

	ctx = cam_node_get_ctxt_from_free_list(node);
	if (!ctx) {
		CAM_ERR(CAM_CORE, "No free ctx in free list node %s",
			node->name);
		cam_node_print_ctx_state(node);

		rc = -ENOMEM;
		goto err;
	}
@@ -86,6 +118,9 @@ static int __cam_node_handle_acquire_dev(struct cam_node *node,
		goto free_ctx;
	}

	CAM_DBG(CAM_CORE, "[%s] Acquire ctx_id %d",
		node->name, ctx->ctx_id);

	return 0;
free_ctx:
	cam_context_putref(ctx);
@@ -260,6 +295,10 @@ static int __cam_node_handle_release_dev(struct cam_node *node,
		CAM_ERR(CAM_CORE, "destroy device handle is failed node %s",
			node->name);

	CAM_DBG(CAM_CORE, "[%s] Release ctx_id=%d, refcount=%d",
		node->name, ctx->ctx_id,
		atomic_read(&(ctx->refcount.refcount)));

	cam_context_putref(ctx);
	return rc;
}
+2 −0
Original line number Diff line number Diff line
@@ -1244,6 +1244,7 @@ static int __cam_isp_ctx_apply_req_in_activated_state(
	cfg.hw_update_entries = req_isp->cfg;
	cfg.num_hw_update_entries = req_isp->num_cfg;
	cfg.priv  = &req_isp->hw_update_data;
	cfg.init_packet = 0;

	rc = ctx->hw_mgr_intf->hw_config(ctx->hw_mgr_intf->hw_mgr_priv, &cfg);
	if (rc) {
@@ -2374,6 +2375,7 @@ static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx,
	arg.hw_update_entries = req_isp->cfg;
	arg.num_hw_update_entries = req_isp->num_cfg;
	arg.priv  = &req_isp->hw_update_data;
	arg.init_packet = 1;

	ctx_isp->frame_id = 0;
	ctx_isp->active_req_cnt = 0;
+2 −2
Original line number Diff line number Diff line
@@ -1611,7 +1611,7 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
			cdm_cmd->cmd[i].len = cmd->len;
		}

		if (cfg->request_id == 1)
		if (cfg->init_packet)
			init_completion(&ctx->config_done_complete);

		CAM_DBG(CAM_ISP, "Submit to CDM");
@@ -1621,7 +1621,7 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
			return rc;
		}

		if (cfg->request_id == 1) {
		if (cfg->init_packet) {
			rc = wait_for_completion_timeout(
				&ctx->config_done_complete,
				msecs_to_jiffies(30));
+9 −2
Original line number Diff line number Diff line
@@ -579,8 +579,15 @@ int cam_isp_add_io_buffers(
				io_addr[plane_id] +=
						io_cfg[i].offsets[plane_id];
				CAM_DBG(CAM_ISP,
					"get io_addr for plane %d: 0x%llx",
					plane_id, io_addr[plane_id]);
					"get io_addr for plane %d: 0x%llx, mem_hdl=0x%x",
					plane_id, io_addr[plane_id],
					io_cfg[i].mem_handle[plane_id]);

				CAM_DBG(CAM_ISP,
					"mmu_hdl=0x%x, size=%d, end=0x%x",
					mmu_hdl, (int)size,
					io_addr[plane_id]+size);

			}
			if (!plane_id) {
				CAM_ERR(CAM_ISP, "No valid planes for res%d",
Loading