瀏覽代碼

Merge "msm: camera: isp: Avoid un-clocked access of registers during regdump" into camera-kernel.lnx.7.0

Wasim Khan 1 年之前
父節點
當前提交
6a766662e7
共有 1 個文件被更改,包括 6 次插入0 次删除
  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",