Loading drivers/cam_core/cam_context_utils.c +2 −2 Original line number Diff line number Diff line Loading @@ -535,8 +535,8 @@ int32_t cam_context_acquire_dev_to_hw(struct cam_context *ctx, cmd->resource_hdl); if (cmd->num_resources > CAM_CTX_RES_MAX) { CAM_ERR(CAM_CTXT, "[%s][%d] resource limit exceeded", ctx->dev_name, ctx->ctx_id); CAM_ERR(CAM_CTXT, "[%s][%d] resource[%d] limit exceeded", ctx->dev_name, ctx->ctx_id, cmd->num_resources); rc = -ENOMEM; goto end; } Loading drivers/cam_core/cam_node.c +18 −9 Original line number Diff line number Diff line Loading @@ -346,31 +346,36 @@ static int __cam_node_handle_flush_dev(struct cam_node *node, return -EINVAL; if (flush->dev_handle <= 0) { CAM_ERR(CAM_CORE, "Invalid device handle for context"); CAM_ERR_RATE_LIMIT(CAM_CORE, "Invalid device handle for context"); return -EINVAL; } if (flush->session_handle <= 0) { CAM_ERR(CAM_CORE, "Invalid session handle for context"); CAM_ERR_RATE_LIMIT(CAM_CORE, "Invalid session handle for context"); return -EINVAL; } ctx = (struct cam_context *)cam_get_device_priv(flush->dev_handle); if (!ctx) { CAM_ERR(CAM_CORE, "Can not get context for handle %d", CAM_ERR_RATE_LIMIT(CAM_CORE, "Can not get context for handle %d", flush->dev_handle); return -EINVAL; } if (strcmp(node->name, ctx->dev_name)) { CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching", CAM_ERR_RATE_LIMIT(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); if (rc) CAM_ERR(CAM_CORE, "Flush failure for node %s", node->name); CAM_ERR_RATE_LIMIT(CAM_CORE, "Flush failure for node %s", node->name); return rc; } Loading Loading @@ -446,25 +451,29 @@ static int __cam_node_handle_dump_dev(struct cam_node *node, return -EINVAL; if (dump->dev_handle <= 0) { CAM_ERR(CAM_CORE, "Invalid device handle for context"); CAM_ERR_RATE_LIMIT(CAM_CORE, "Invalid device handle for context"); return -EINVAL; } if (dump->session_handle <= 0) { CAM_ERR(CAM_CORE, "Invalid session handle for context"); CAM_ERR_RATE_LIMIT(CAM_CORE, "Invalid session handle for context"); return -EINVAL; } ctx = (struct cam_context *)cam_get_device_priv(dump->dev_handle); if (!ctx) { CAM_ERR(CAM_CORE, "Can not get context for handle %d", CAM_ERR_RATE_LIMIT(CAM_CORE, "Can not get context for handle %d", dump->dev_handle); return -EINVAL; } rc = cam_context_handle_dump_dev(ctx, dump); if (rc) CAM_ERR(CAM_CORE, "Dump failure for node %s", node->name); CAM_ERR_RATE_LIMIT(CAM_CORE, "Dump failure for node %s", node->name); return rc; } Loading drivers/cam_req_mgr/cam_req_mgr_util.c +10 −8 Original line number Diff line number Diff line Loading @@ -223,23 +223,25 @@ void *cam_get_device_priv(int32_t dev_hdl) idx = CAM_REQ_MGR_GET_HDL_IDX(dev_hdl); if (idx >= CAM_REQ_MGR_MAX_HANDLES_V2) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid idx"); CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid idx:%d", idx); goto device_priv_fail; } if (hdl_tbl->hdl[idx].state != HDL_ACTIVE) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid state"); if (hdl_tbl->hdl[idx].hdl_value != dev_hdl) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid hdl [%d] [%d]", dev_hdl, hdl_tbl->hdl[idx].hdl_value); goto device_priv_fail; } type = CAM_REQ_MGR_GET_HDL_TYPE(dev_hdl); if (HDL_TYPE_DEV != type && HDL_TYPE_SESSION != type) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid type"); if (hdl_tbl->hdl[idx].state != HDL_ACTIVE) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid state:%d", hdl_tbl->hdl[idx].state); goto device_priv_fail; } if (hdl_tbl->hdl[idx].hdl_value != dev_hdl) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid hdl"); type = CAM_REQ_MGR_GET_HDL_TYPE(dev_hdl); if (HDL_TYPE_DEV != type && HDL_TYPE_SESSION != type) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid type:%d", type); goto device_priv_fail; } Loading Loading
drivers/cam_core/cam_context_utils.c +2 −2 Original line number Diff line number Diff line Loading @@ -535,8 +535,8 @@ int32_t cam_context_acquire_dev_to_hw(struct cam_context *ctx, cmd->resource_hdl); if (cmd->num_resources > CAM_CTX_RES_MAX) { CAM_ERR(CAM_CTXT, "[%s][%d] resource limit exceeded", ctx->dev_name, ctx->ctx_id); CAM_ERR(CAM_CTXT, "[%s][%d] resource[%d] limit exceeded", ctx->dev_name, ctx->ctx_id, cmd->num_resources); rc = -ENOMEM; goto end; } Loading
drivers/cam_core/cam_node.c +18 −9 Original line number Diff line number Diff line Loading @@ -346,31 +346,36 @@ static int __cam_node_handle_flush_dev(struct cam_node *node, return -EINVAL; if (flush->dev_handle <= 0) { CAM_ERR(CAM_CORE, "Invalid device handle for context"); CAM_ERR_RATE_LIMIT(CAM_CORE, "Invalid device handle for context"); return -EINVAL; } if (flush->session_handle <= 0) { CAM_ERR(CAM_CORE, "Invalid session handle for context"); CAM_ERR_RATE_LIMIT(CAM_CORE, "Invalid session handle for context"); return -EINVAL; } ctx = (struct cam_context *)cam_get_device_priv(flush->dev_handle); if (!ctx) { CAM_ERR(CAM_CORE, "Can not get context for handle %d", CAM_ERR_RATE_LIMIT(CAM_CORE, "Can not get context for handle %d", flush->dev_handle); return -EINVAL; } if (strcmp(node->name, ctx->dev_name)) { CAM_ERR(CAM_CORE, "node name %s dev name:%s not matching", CAM_ERR_RATE_LIMIT(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); if (rc) CAM_ERR(CAM_CORE, "Flush failure for node %s", node->name); CAM_ERR_RATE_LIMIT(CAM_CORE, "Flush failure for node %s", node->name); return rc; } Loading Loading @@ -446,25 +451,29 @@ static int __cam_node_handle_dump_dev(struct cam_node *node, return -EINVAL; if (dump->dev_handle <= 0) { CAM_ERR(CAM_CORE, "Invalid device handle for context"); CAM_ERR_RATE_LIMIT(CAM_CORE, "Invalid device handle for context"); return -EINVAL; } if (dump->session_handle <= 0) { CAM_ERR(CAM_CORE, "Invalid session handle for context"); CAM_ERR_RATE_LIMIT(CAM_CORE, "Invalid session handle for context"); return -EINVAL; } ctx = (struct cam_context *)cam_get_device_priv(dump->dev_handle); if (!ctx) { CAM_ERR(CAM_CORE, "Can not get context for handle %d", CAM_ERR_RATE_LIMIT(CAM_CORE, "Can not get context for handle %d", dump->dev_handle); return -EINVAL; } rc = cam_context_handle_dump_dev(ctx, dump); if (rc) CAM_ERR(CAM_CORE, "Dump failure for node %s", node->name); CAM_ERR_RATE_LIMIT(CAM_CORE, "Dump failure for node %s", node->name); return rc; } Loading
drivers/cam_req_mgr/cam_req_mgr_util.c +10 −8 Original line number Diff line number Diff line Loading @@ -223,23 +223,25 @@ void *cam_get_device_priv(int32_t dev_hdl) idx = CAM_REQ_MGR_GET_HDL_IDX(dev_hdl); if (idx >= CAM_REQ_MGR_MAX_HANDLES_V2) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid idx"); CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid idx:%d", idx); goto device_priv_fail; } if (hdl_tbl->hdl[idx].state != HDL_ACTIVE) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid state"); if (hdl_tbl->hdl[idx].hdl_value != dev_hdl) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid hdl [%d] [%d]", dev_hdl, hdl_tbl->hdl[idx].hdl_value); goto device_priv_fail; } type = CAM_REQ_MGR_GET_HDL_TYPE(dev_hdl); if (HDL_TYPE_DEV != type && HDL_TYPE_SESSION != type) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid type"); if (hdl_tbl->hdl[idx].state != HDL_ACTIVE) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid state:%d", hdl_tbl->hdl[idx].state); goto device_priv_fail; } if (hdl_tbl->hdl[idx].hdl_value != dev_hdl) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid hdl"); type = CAM_REQ_MGR_GET_HDL_TYPE(dev_hdl); if (HDL_TYPE_DEV != type && HDL_TYPE_SESSION != type) { CAM_ERR_RATE_LIMIT(CAM_CRM, "Invalid type:%d", type); goto device_priv_fail; } Loading