|
@@ -3358,9 +3358,10 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
struct cam_ife_hw_mgr_ctx *ctx;
|
|
struct cam_ife_hw_mgr_ctx *ctx;
|
|
struct cam_isp_prepare_hw_update_data *hw_update_data;
|
|
struct cam_isp_prepare_hw_update_data *hw_update_data;
|
|
|
|
|
|
- CAM_DBG(CAM_ISP, "Enter");
|
|
|
|
if (!hw_mgr_priv || !config_hw_args) {
|
|
if (!hw_mgr_priv || !config_hw_args) {
|
|
- CAM_ERR(CAM_ISP, "Invalid arguments");
|
|
|
|
|
|
+ CAM_ERR(CAM_ISP,
|
|
|
|
+ "Invalid arguments, hw_mgr_priv=%pK, config_hw_args=%pK",
|
|
|
|
+ hw_mgr_priv, config_hw_args);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3368,21 +3369,28 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
ctx = (struct cam_ife_hw_mgr_ctx *)cfg->ctxt_to_hw_map;
|
|
ctx = (struct cam_ife_hw_mgr_ctx *)cfg->ctxt_to_hw_map;
|
|
if (!ctx) {
|
|
if (!ctx) {
|
|
CAM_ERR(CAM_ISP, "Invalid context is used");
|
|
CAM_ERR(CAM_ISP, "Invalid context is used");
|
|
- return -EPERM;
|
|
|
|
|
|
+ return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
if (!ctx->ctx_in_use || !ctx->cdm_cmd) {
|
|
if (!ctx->ctx_in_use || !ctx->cdm_cmd) {
|
|
- CAM_ERR(CAM_ISP, "Invalid context parameters");
|
|
|
|
|
|
+ CAM_ERR(CAM_ISP,
|
|
|
|
+ "Invalid context parameters : ctx_in_use=%d, cdm_cmd=%pK",
|
|
|
|
+ ctx->ctx_in_use, ctx->cdm_cmd);
|
|
|
|
+ return -EPERM;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (atomic_read(&ctx->overflow_pending)) {
|
|
|
|
+ CAM_DBG(CAM_ISP,
|
|
|
|
+ "Ctx[%pK][%d] Overflow pending, cannot apply req %llu",
|
|
|
|
+ ctx, ctx->ctx_index, cfg->request_id);
|
|
return -EPERM;
|
|
return -EPERM;
|
|
}
|
|
}
|
|
- if (atomic_read(&ctx->overflow_pending))
|
|
|
|
- return -EINVAL;
|
|
|
|
|
|
|
|
hw_update_data = (struct cam_isp_prepare_hw_update_data *) cfg->priv;
|
|
hw_update_data = (struct cam_isp_prepare_hw_update_data *) cfg->priv;
|
|
hw_update_data->ife_mgr_ctx = ctx;
|
|
hw_update_data->ife_mgr_ctx = ctx;
|
|
|
|
|
|
- CAM_DBG(CAM_ISP, "Ctx[%pK][%d] : Applying Req %lld",
|
|
|
|
- ctx, ctx->ctx_index, cfg->request_id);
|
|
|
|
|
|
+ CAM_DBG(CAM_ISP, "Ctx[%pK][%d] : Applying Req %lld, init_packet=%d",
|
|
|
|
+ ctx, ctx->ctx_index, cfg->request_id, cfg->init_packet);
|
|
|
|
|
|
for (i = 0; i < CAM_IFE_HW_NUM_MAX; i++) {
|
|
for (i = 0; i < CAM_IFE_HW_NUM_MAX; i++) {
|
|
if (hw_update_data->bw_config_valid[i] == true) {
|
|
if (hw_update_data->bw_config_valid[i] == true) {
|
|
@@ -3454,7 +3462,9 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
atomic_set(&ctx->cdm_done, 0);
|
|
atomic_set(&ctx->cdm_done, 0);
|
|
rc = cam_cdm_submit_bls(ctx->cdm_handle, cdm_cmd);
|
|
rc = cam_cdm_submit_bls(ctx->cdm_handle, cdm_cmd);
|
|
if (rc) {
|
|
if (rc) {
|
|
- CAM_ERR(CAM_ISP, "Failed to apply the configs");
|
|
|
|
|
|
+ CAM_ERR(CAM_ISP,
|
|
|
|
+ "Failed to apply the configs for req %llu, rc %d",
|
|
|
|
+ cfg->request_id, rc);
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3954,11 +3964,16 @@ static int cam_ife_mgr_start_hw(void *hw_mgr_priv, void *start_hw_args)
|
|
}
|
|
}
|
|
|
|
|
|
start_only:
|
|
start_only:
|
|
|
|
+
|
|
|
|
+ atomic_set(&ctx->overflow_pending, 0);
|
|
|
|
+
|
|
/* Apply initial configuration */
|
|
/* Apply initial configuration */
|
|
CAM_DBG(CAM_ISP, "Config HW");
|
|
CAM_DBG(CAM_ISP, "Config HW");
|
|
rc = cam_ife_mgr_config_hw(hw_mgr_priv, &start_isp->hw_config);
|
|
rc = cam_ife_mgr_config_hw(hw_mgr_priv, &start_isp->hw_config);
|
|
if (rc) {
|
|
if (rc) {
|
|
- CAM_ERR(CAM_ISP, "Config HW failed");
|
|
|
|
|
|
+ CAM_ERR(CAM_ISP,
|
|
|
|
+ "Config HW failed, start_only=%d, rc=%d",
|
|
|
|
+ start_isp->start_only, rc);
|
|
goto cdm_streamoff;
|
|
goto cdm_streamoff;
|
|
}
|
|
}
|
|
|
|
|