|
@@ -4394,8 +4394,8 @@ void cam_ife_cam_cdm_callback(uint32_t handle, void *userdata,
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- hw_update_data = (struct cam_isp_prepare_hw_update_data *)userdata;
|
|
|
|
- ctx = (struct cam_ife_hw_mgr_ctx *)hw_update_data->isp_mgr_ctx;
|
|
|
|
|
|
+ ctx = (struct cam_ife_hw_mgr_ctx *)userdata;
|
|
|
|
+ hw_update_data = ctx->cdm_userdata.hw_update_data;
|
|
|
|
|
|
if (status == CAM_CDM_CB_STATUS_BL_SUCCESS) {
|
|
if (status == CAM_CDM_CB_STATUS_BL_SUCCESS) {
|
|
complete_all(&ctx->config_done_complete);
|
|
complete_all(&ctx->config_done_complete);
|
|
@@ -4403,20 +4403,26 @@ void cam_ife_cam_cdm_callback(uint32_t handle, void *userdata,
|
|
atomic_set(&ctx->cdm_done, 1);
|
|
atomic_set(&ctx->cdm_done, 1);
|
|
ctx->last_cdm_done_req = cookie;
|
|
ctx->last_cdm_done_req = cookie;
|
|
if ((g_ife_hw_mgr.debug_cfg.per_req_reg_dump) &&
|
|
if ((g_ife_hw_mgr.debug_cfg.per_req_reg_dump) &&
|
|
- (!reg_dump_done))
|
|
|
|
- cam_ife_mgr_handle_reg_dump(ctx,
|
|
|
|
- hw_update_data->reg_dump_buf_desc,
|
|
|
|
- hw_update_data->num_reg_dump_buf,
|
|
|
|
- CAM_ISP_PACKET_META_REG_DUMP_PER_REQUEST,
|
|
|
|
- NULL, false);
|
|
|
|
-
|
|
|
|
|
|
+ (!reg_dump_done)) {
|
|
|
|
+ if (ctx->cdm_userdata.request_id == cookie) {
|
|
|
|
+ cam_ife_mgr_handle_reg_dump(ctx,
|
|
|
|
+ hw_update_data->reg_dump_buf_desc,
|
|
|
|
+ hw_update_data->num_reg_dump_buf,
|
|
|
|
+ CAM_ISP_PACKET_META_REG_DUMP_PER_REQUEST,
|
|
|
|
+ NULL, false);
|
|
|
|
+ } else {
|
|
|
|
+ CAM_INFO(CAM_ISP, "CDM delay, Skip dump req: %llu, cdm_req: %llu",
|
|
|
|
+ cookie, ctx->cdm_userdata.request_id);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
CAM_DBG(CAM_ISP,
|
|
CAM_DBG(CAM_ISP,
|
|
- "Called by CDM hdl=0x%x, udata=%pK, status=%d, cookie=%llu ctx_index=%d",
|
|
|
|
- handle, userdata, status, cookie, ctx->ctx_index);
|
|
|
|
|
|
+ "CDM hdl=0x%x, udata=%pK, status=%d, cookie=%llu ctx_index=%d cdm_req=%llu",
|
|
|
|
+ handle, userdata, status, cookie, ctx->ctx_index,
|
|
|
|
+ ctx->cdm_userdata.request_id);
|
|
} else {
|
|
} else {
|
|
CAM_WARN(CAM_ISP,
|
|
CAM_WARN(CAM_ISP,
|
|
- "Called by CDM hdl=0x%x, udata=%pK, status=%d, cookie=%llu",
|
|
|
|
- handle, userdata, status, cookie);
|
|
|
|
|
|
+ "Called by CDM hdl=0x%x, udata=%pK, status=%d, cookie=%llu, cdm_req=%llu",
|
|
|
|
+ handle, userdata, status, cookie, ctx->cdm_userdata.request_id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5660,6 +5666,8 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
|
|
|
|
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->isp_mgr_ctx = ctx;
|
|
hw_update_data->isp_mgr_ctx = ctx;
|
|
|
|
+ ctx->cdm_userdata.request_id = cfg->request_id;
|
|
|
|
+ ctx->cdm_userdata.hw_update_data = hw_update_data;
|
|
|
|
|
|
CAM_DBG(CAM_ISP, "Ctx[%pK][%d] : Applying Req %lld, init_packet=%d",
|
|
CAM_DBG(CAM_ISP, "Ctx[%pK][%d] : Applying Req %lld, init_packet=%d",
|
|
ctx, ctx->ctx_index, cfg->request_id, cfg->init_packet);
|
|
ctx, ctx->ctx_index, cfg->request_id, cfg->init_packet);
|
|
@@ -5755,7 +5763,7 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
cdm_cmd = ctx->cdm_cmd;
|
|
cdm_cmd = ctx->cdm_cmd;
|
|
cdm_cmd->type = CAM_CDM_BL_CMD_TYPE_MEM_HANDLE;
|
|
cdm_cmd->type = CAM_CDM_BL_CMD_TYPE_MEM_HANDLE;
|
|
cdm_cmd->flag = true;
|
|
cdm_cmd->flag = true;
|
|
- cdm_cmd->userdata = hw_update_data;
|
|
|
|
|
|
+ cdm_cmd->userdata = ctx;
|
|
cdm_cmd->cookie = cfg->request_id;
|
|
cdm_cmd->cookie = cfg->request_id;
|
|
cdm_cmd->gen_irq_arb = false;
|
|
cdm_cmd->gen_irq_arb = false;
|
|
|
|
|