msm: camera: isp: Reinit completion before issuing path reset

Reinitializing complete variable after reset command can cause
the variable to set to 0 before going for wait for completion.
This causes the wait to fail even after the IRQ is received.
This commit moves the reinit before issuing the reset command.

CRs-Fixed: 2911638
Change-Id: I771ae546b18a4b86e40cf7815668bdeee4fc9d47
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Bu işleme şunda yer alıyor:
Gaurav Jindal
2021-03-16 10:08:56 +05:30
ebeveyn 4aa9286fd7
işleme 0a26ed8228

Dosyayı Görüntüle

@@ -647,15 +647,14 @@ static int cam_ife_csid_path_reset(
val = cam_io_r_mb(soc_info->reg_map[0].mem_base +
path_reg->irq_mask_addr);
val |= 1 << csid_reg->cmn_reg->rst_done_shift_val;
irq_reg = cam_ife_csid_convert_res_to_irq_reg(res->res_id);
reinit_completion(&csid_hw->irq_complete[irq_reg]);
cam_io_w_mb(val, soc_info->reg_map[0].mem_base +
path_reg->irq_mask_addr);
cam_io_w_mb(csid_reg->cmn_reg->path_rst_stb_all,
soc_info->reg_map[0].mem_base + path_reg->rst_strobes_addr);
irq_reg = cam_ife_csid_convert_res_to_irq_reg(res->res_id);
reinit_completion(&csid_hw->irq_complete[irq_reg]);
rem_jiffies = cam_common_wait_for_completion_timeout(
&csid_hw->irq_complete[irq_reg],
msecs_to_jiffies(IFE_CSID_TIMEOUT));