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

Commit cebed70a authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: context: add name to cam_context for debug" into dev/msm-4.9-camx

parents 9d40d66e e9a8a9cf
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -332,14 +332,15 @@ int cam_context_handle_stop_dev(struct cam_context *ctx,
			ctx, cmd);
	else
		/* stop device can be optional for some driver */
		CAM_WARN(CAM_CORE, "No stop device in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
		CAM_WARN(CAM_CORE, "No stop device in dev %d, name %s state %d",
			ctx->dev_hdl, ctx->dev_name, ctx->state);
	mutex_unlock(&ctx->ctx_mutex);

	return rc;
}

int cam_context_init(struct cam_context *ctx,
	const char *dev_name,
	struct cam_req_mgr_kmd_ops *crm_node_intf,
	struct cam_hw_mgr_intf *hw_mgr_intf,
	struct cam_ctx_request *req_list,
@@ -361,6 +362,7 @@ int cam_context_init(struct cam_context *ctx,
	mutex_init(&ctx->ctx_mutex);
	spin_lock_init(&ctx->lock);

	ctx->dev_name = dev_name;
	ctx->ctx_crm_intf = NULL;
	ctx->crm_ctx_intf = crm_node_intf;
	ctx->hw_mgr_intf = hw_mgr_intf;
+4 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ struct cam_ctx_ops {
/**
 * struct cam_context - camera context object for the subdevice node
 *
 * @dev_name:              String giving name of device associated
 * @list:                  Link list entry
 * @sessoin_hdl:           Session handle
 * @dev_hdl:               Device handle
@@ -158,6 +159,7 @@ struct cam_ctx_ops {
 *
 */
struct cam_context {
	const char                  *dev_name;
	struct list_head             list;
	int32_t                      session_hdl;
	int32_t                      dev_hdl;
@@ -331,6 +333,7 @@ int cam_context_deinit(struct cam_context *ctx);
 * @brief:        Camera context initialize function
 *
 * @ctx:                   Object pointer for cam_context
 * @dev_name:              String giving name of device associated
 * @crm_node_intf:         Function table for crm to context interface
 * @hw_mgr_intf:           Function table for context to hw interface
 * @req_list:              Requests storage
@@ -338,6 +341,7 @@ int cam_context_deinit(struct cam_context *ctx);
 *
 */
int cam_context_init(struct cam_context *ctx,
		const char *dev_name,
		struct cam_req_mgr_kmd_ops *crm_node_intf,
		struct cam_hw_mgr_intf *hw_mgr_intf,
		struct cam_ctx_request *req_list,
+4 −2
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
#include "cam_fd_context.h"
#include "cam_trace.h"

static const char fd_dev_name[] = "fd";

/* Functions in Available state */
static int __cam_fd_ctx_acquire_dev_in_available(struct cam_context *ctx,
	struct cam_acquire_dev_cmd *cmd)
@@ -208,8 +210,8 @@ int cam_fd_context_init(struct cam_fd_context *fd_ctx,

	memset(fd_ctx, 0, sizeof(*fd_ctx));

	rc = cam_context_init(base_ctx, NULL, hw_intf, fd_ctx->req_base,
		CAM_CTX_REQ_MAX);
	rc = cam_context_init(base_ctx, fd_dev_name, NULL, hw_intf,
		fd_ctx->req_base, CAM_CTX_REQ_MAX);
	if (rc) {
		CAM_ERR(CAM_FD, "Camera Context Base init failed, rc=%d", rc);
		return rc;
+4 −2
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@
#include "cam_trace.h"
#include "cam_debug_util.h"

static const char icp_dev_name[] = "icp";

static int __cam_icp_acquire_dev_in_available(struct cam_context *ctx,
	struct cam_acquire_dev_cmd *cmd)
{
@@ -171,8 +173,8 @@ int cam_icp_context_init(struct cam_icp_context *ctx,
		goto err;
	}

	rc = cam_context_init(ctx->base, NULL, hw_intf, ctx->req_base,
		CAM_CTX_REQ_MAX);
	rc = cam_context_init(ctx->base, icp_dev_name, NULL, hw_intf,
		ctx->req_base, CAM_CTX_REQ_MAX);
	if (rc) {
		CAM_ERR(CAM_ICP, "Camera Context Base init failed");
		goto err;
+4 −2
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@
#include "cam_trace.h"
#include "cam_debug_util.h"

static const char isp_dev_name[] = "isp";

static int __cam_isp_ctx_enqueue_request_in_order(
	struct cam_context *ctx, struct cam_ctx_request *req)
{
@@ -2154,8 +2156,8 @@ int cam_isp_context_init(struct cam_isp_context *ctx,
	}

	/* camera context setup */
	rc = cam_context_init(ctx_base, crm_node_intf, hw_intf, ctx->req_base,
		CAM_CTX_REQ_MAX);
	rc = cam_context_init(ctx_base, isp_dev_name, crm_node_intf, hw_intf,
		ctx->req_base, CAM_CTX_REQ_MAX);
	if (rc) {
		CAM_ERR(CAM_ISP, "Camera Context Base init failed");
		goto err;
Loading