|
@@ -27,7 +27,7 @@ static void cam_node_print_ctx_state(
|
|
spin_lock_bh(&ctx->lock);
|
|
spin_lock_bh(&ctx->lock);
|
|
CAM_INFO(CAM_CORE,
|
|
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",
|
|
"[%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",
|
|
|
|
|
|
+ ctx->dev_name,
|
|
i, ctx->state,
|
|
i, ctx->state,
|
|
atomic_read(&(ctx->refcount.refcount.refs)),
|
|
atomic_read(&(ctx->refcount.refcount.refs)),
|
|
list_empty(&ctx->active_req_list),
|
|
list_empty(&ctx->active_req_list),
|
|
@@ -148,6 +148,12 @@ static int __cam_node_handle_acquire_hw_v1(struct cam_node *node,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (strcmp(node->name, ctx->dev_name)) {
|
|
|
|
+ CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching",
|
|
|
|
+ node->name, ctx->dev_name);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
rc = cam_context_handle_acquire_hw(ctx, acquire);
|
|
rc = cam_context_handle_acquire_hw(ctx, acquire);
|
|
if (rc) {
|
|
if (rc) {
|
|
CAM_ERR(CAM_CORE, "Acquire device failed for node %s",
|
|
CAM_ERR(CAM_CORE, "Acquire device failed for node %s",
|
|
@@ -226,6 +232,12 @@ static int __cam_node_handle_start_dev(struct cam_node *node,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (strcmp(node->name, ctx->dev_name)) {
|
|
|
|
+ CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching",
|
|
|
|
+ node->name, ctx->dev_name);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
rc = cam_context_handle_start_dev(ctx, start);
|
|
rc = cam_context_handle_start_dev(ctx, start);
|
|
if (rc)
|
|
if (rc)
|
|
CAM_ERR(CAM_CORE, "Start failure for node %s", node->name);
|
|
CAM_ERR(CAM_CORE, "Start failure for node %s", node->name);
|
|
@@ -259,6 +271,12 @@ static int __cam_node_handle_stop_dev(struct cam_node *node,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (strcmp(node->name, ctx->dev_name)) {
|
|
|
|
+ CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching",
|
|
|
|
+ node->name, ctx->dev_name);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
rc = cam_context_handle_stop_dev(ctx, stop);
|
|
rc = cam_context_handle_stop_dev(ctx, stop);
|
|
if (rc)
|
|
if (rc)
|
|
CAM_ERR(CAM_CORE, "Stop failure for node %s", node->name);
|
|
CAM_ERR(CAM_CORE, "Stop failure for node %s", node->name);
|
|
@@ -292,6 +310,12 @@ static int __cam_node_handle_config_dev(struct cam_node *node,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (strcmp(node->name, ctx->dev_name)) {
|
|
|
|
+ CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching",
|
|
|
|
+ node->name, ctx->dev_name);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
rc = cam_context_handle_config_dev(ctx, config);
|
|
rc = cam_context_handle_config_dev(ctx, config);
|
|
if (rc)
|
|
if (rc)
|
|
CAM_ERR(CAM_CORE, "Config failure for node %s", node->name);
|
|
CAM_ERR(CAM_CORE, "Config failure for node %s", node->name);
|
|
@@ -325,6 +349,12 @@ static int __cam_node_handle_flush_dev(struct cam_node *node,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (strcmp(node->name, ctx->dev_name)) {
|
|
|
|
+ CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching",
|
|
|
|
+ node->name, ctx->dev_name);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
rc = cam_context_handle_flush_dev(ctx, flush);
|
|
rc = cam_context_handle_flush_dev(ctx, flush);
|
|
if (rc)
|
|
if (rc)
|
|
CAM_ERR(CAM_CORE, "Flush failure for node %s", node->name);
|
|
CAM_ERR(CAM_CORE, "Flush failure for node %s", node->name);
|
|
@@ -358,6 +388,12 @@ static int __cam_node_handle_release_dev(struct cam_node *node,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (strcmp(node->name, ctx->dev_name)) {
|
|
|
|
+ CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching",
|
|
|
|
+ node->name, ctx->dev_name);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (ctx->state > CAM_CTX_UNINIT && ctx->state < CAM_CTX_STATE_MAX) {
|
|
if (ctx->state > CAM_CTX_UNINIT && ctx->state < CAM_CTX_STATE_MAX) {
|
|
rc = cam_context_handle_release_dev(ctx, release);
|
|
rc = cam_context_handle_release_dev(ctx, release);
|
|
if (rc)
|
|
if (rc)
|
|
@@ -413,6 +449,12 @@ static int __cam_node_handle_release_hw_v1(struct cam_node *node,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (strcmp(node->name, ctx->dev_name)) {
|
|
|
|
+ CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching",
|
|
|
|
+ node->name, ctx->dev_name);
|
|
|
|
+ return -EINVAL;
|
|
|
|
+ }
|
|
|
|
+
|
|
rc = cam_context_handle_release_hw(ctx, release);
|
|
rc = cam_context_handle_release_hw(ctx, release);
|
|
if (rc)
|
|
if (rc)
|
|
CAM_ERR(CAM_CORE, "context release failed node %s", node->name);
|
|
CAM_ERR(CAM_CORE, "context release failed node %s", node->name);
|