|
@@ -3521,6 +3521,7 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
|
struct cam_cdm_bl_request *cdm_cmd;
|
|
|
struct cam_ife_hw_mgr_ctx *ctx;
|
|
|
struct cam_isp_prepare_hw_update_data *hw_update_data;
|
|
|
+ unsigned long rem_jiffies = 0;
|
|
|
|
|
|
if (!hw_mgr_priv || !config_hw_args) {
|
|
|
CAM_ERR(CAM_ISP,
|
|
@@ -3635,21 +3636,18 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
|
}
|
|
|
|
|
|
if (cfg->init_packet) {
|
|
|
- rc = wait_for_completion_timeout(
|
|
|
+ rem_jiffies = wait_for_completion_timeout(
|
|
|
&ctx->config_done_complete,
|
|
|
msecs_to_jiffies(30));
|
|
|
- if (rc <= 0) {
|
|
|
+ if (rem_jiffies == 0) {
|
|
|
CAM_ERR(CAM_ISP,
|
|
|
- "config done completion timeout for req_id=%llu rc=%d ctx_index %d",
|
|
|
- cfg->request_id, rc, ctx->ctx_index);
|
|
|
- if (rc == 0)
|
|
|
- rc = -ETIMEDOUT;
|
|
|
- } else {
|
|
|
- rc = 0;
|
|
|
+ "config done completion timeout for req_id=%llu ctx_index %d",
|
|
|
+ cfg->request_id, ctx->ctx_index);
|
|
|
+ rc = -ETIMEDOUT;
|
|
|
+ } else
|
|
|
CAM_DBG(CAM_ISP,
|
|
|
"config done Success for req_id=%llu ctx_index %d",
|
|
|
cfg->request_id, ctx->ctx_index);
|
|
|
- }
|
|
|
}
|
|
|
} else {
|
|
|
CAM_ERR(CAM_ISP, "No commands to config");
|
|
@@ -3797,6 +3795,7 @@ static int cam_ife_mgr_stop_hw(void *hw_mgr_priv, void *stop_hw_args)
|
|
|
struct cam_ife_hw_mgr_ctx *ctx;
|
|
|
enum cam_ife_csid_halt_cmd csid_halt_type;
|
|
|
uint32_t i, master_base_idx = 0;
|
|
|
+ unsigned long rem_jiffies = 0;
|
|
|
|
|
|
if (!hw_mgr_priv || !stop_hw_args) {
|
|
|
CAM_ERR(CAM_ISP, "Invalid arguments");
|
|
@@ -3896,14 +3895,12 @@ static int cam_ife_mgr_stop_hw(void *hw_mgr_priv, void *stop_hw_args)
|
|
|
|
|
|
cam_ife_mgr_pause_hw(ctx);
|
|
|
|
|
|
- rc = wait_for_completion_timeout(&ctx->config_done_complete,
|
|
|
+ rem_jiffies = wait_for_completion_timeout(&ctx->config_done_complete,
|
|
|
msecs_to_jiffies(10));
|
|
|
- if (rc == 0) {
|
|
|
+ if (rem_jiffies == 0)
|
|
|
CAM_WARN(CAM_ISP,
|
|
|
"config done completion timeout for last applied req_id=%llu rc=%d ctx_index %d",
|
|
|
ctx->applied_req_id, rc, ctx->ctx_index);
|
|
|
- rc = -ETIMEDOUT;
|
|
|
- }
|
|
|
|
|
|
if (stop_isp->stop_only)
|
|
|
goto end;
|
|
@@ -6145,6 +6142,7 @@ static int cam_ife_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
|
|
|
hw_cmd_args->ctxt_to_hw_map;
|
|
|
struct cam_isp_hw_cmd_args *isp_hw_cmd_args = NULL;
|
|
|
struct cam_packet *packet;
|
|
|
+ unsigned long rem_jiffies = 0;
|
|
|
|
|
|
if (!hw_mgr_priv || !cmd_args) {
|
|
|
CAM_ERR(CAM_ISP, "Invalid arguments");
|
|
@@ -6218,15 +6216,13 @@ static int cam_ife_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
|
|
|
if (ctx->last_dump_flush_req_id == ctx->applied_req_id)
|
|
|
return 0;
|
|
|
|
|
|
- rc = wait_for_completion_timeout(
|
|
|
+ rem_jiffies = wait_for_completion_timeout(
|
|
|
&ctx->config_done_complete,
|
|
|
msecs_to_jiffies(30));
|
|
|
- if (rc <= 0) {
|
|
|
+ if (rem_jiffies == 0)
|
|
|
CAM_ERR(CAM_ISP,
|
|
|
- "config done completion timeout, Reg dump will be unreliable rc=%d ctx_index %d",
|
|
|
- rc, ctx->ctx_index);
|
|
|
- rc = 0;
|
|
|
- }
|
|
|
+ "config done completion timeout, Reg dump will be unreliable ctx_index %d",
|
|
|
+ ctx->ctx_index);
|
|
|
|
|
|
ctx->last_dump_flush_req_id = ctx->applied_req_id;
|
|
|
rc = cam_ife_mgr_handle_reg_dump(ctx, ctx->reg_dump_buf_desc,
|