Skip to content

Commit 827e229

Browse files
Camera Software IntegrationGerrit - the friendly Code Review server
authored andcommitted
Merge "msm: camera: isp: Fix for Init Config Handling on Offline IFE Hardware" into camera-kernel.qclinux.1.0
2 parents 9b5ce25 + f35d758 commit 827e229

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

camera/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8109,7 +8109,7 @@ int cam_ife_mgr_config_hw(
81098109
c_ctx->curr_num_exp = hw_update_data->num_exp;
81108110
}
81118111
hw_update_data->mup_en = false;
8112-
8112+
c_ctx->flags.init_cfg_done = true;
81138113
/* Try for INIT packet reg dump by default - no debugfs set */
81148114
if (cfg->init_packet && !g_ife_hw_mgr.debug_cfg.per_req_reg_dump)
81158115
cam_ife_mgr_handle_reg_dump(hw_mgr_ctx,
@@ -8490,6 +8490,7 @@ static int cam_ife_mgr_stop_hw(void *hw_mgr_priv, void *stop_hw_args)
84908490
end:
84918491
c_ctx->flags.dump_on_error = false;
84928492
c_ctx->flags.dump_on_flush = false;
8493+
c_ctx->flags.init_cfg_done = false;
84938494
return rc;
84948495
}
84958496

camera/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ struct cam_ife_hw_mgr_ctx_scratch_buf_info {
208208
* @rdi_pd_context: Flag to specify the context has
209209
* only rdi and PD resource without PIX port.
210210
* @per_port_en: Indicates if per port feature is enabled or not
211+
* @init_cfg_done: indicate whether init configuration for hw is done or not.
211212
212213
*/
213214
struct cam_ife_hw_mgr_ctx_flags {
@@ -231,6 +232,7 @@ struct cam_ife_hw_mgr_ctx_flags {
231232
bool sys_cache_usage[CAM_LLCC_MAX];
232233
bool rdi_pd_context;
233234
bool per_port_en;
235+
bool init_cfg_done;
234236
};
235237

236238
/**

camera/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr_addons.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,15 @@ int cam_ife_mgr_check_start_processing(void *hw_mgr_priv,
183183
list_for_each_entry_safe(c_elem, c_elem_temp,
184184
&ife_hw_mgr->input_queue.list, list) {
185185
is_init_pkt =
186-
((c_elem->prepare.packet->header.op_code + 1) &
187-
0xF) == CAM_ISP_PACKET_INIT_DEV;
186+
(((c_elem->prepare.packet->header.op_code + 1) & 0xF) ==
187+
CAM_ISP_PACKET_INIT_DEV);
188+
if ((c_ctx->flags.init_cfg_done && is_init_pkt) ||
189+
(!(c_ctx->flags.init_cfg_done) && !(is_init_pkt))) {
190+
CAM_DBG(CAM_ISP, "#REJECT#: %s ctx id %d hw_id %d",
191+
c_ctx->flags.init_cfg_done ? "Init already done" : "Init not done",
192+
c_ctx->ctx_index, c_ctx->acquired_hw_id);
193+
continue;
194+
}
188195
if (c_ctx->waiting_start &&
189196
c_elem->ctx_idx != c_ctx->start_ctx_idx) {
190197
CAM_DBG(CAM_ISP,

0 commit comments

Comments
 (0)