Przeglądaj źródła

msm: camera: isp: Avoid un-clocked access of registers during regdump

Un-clocked access of registers during dumping the registers while
handling the start failure.
Reason for the issue is that handle_reg_dump trying to read the hw
registers when HW clocks are disabled.
This commits adds a check to validate if the hw is initialized before
accessing the registers.

CRs-Fixed: 3668129
Change-Id: I98039af2382df7acce767422689992388210004f
Signed-off-by: Dharmender Sharma <[email protected]>
Dharmender Sharma 1 rok temu
rodzic
commit
7a0764952b
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

+ 6 - 0
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -484,6 +484,12 @@ static int cam_ife_mgr_handle_reg_dump(struct cam_ife_hw_mgr_ctx *ctx,
 {
 	int rc = 0, i;
 
+	if (!ctx->flags.init_done) {
+		CAM_WARN(CAM_ISP, "Cannot dump register as HW not initialized, ctx_idx: %u",
+			ctx->ctx_index);
+		return 0;
+	}
+
 	if (cam_presil_mode_enabled()) {
 		if (g_ife_hw_mgr.debug_cfg.enable_presil_reg_dump) {
 			CAM_WARN(CAM_ISP, "regdump enabled for presil mode, ctx_idx: %u",