소스 검색

msm: camera: isp: Reset SFE HW clock rate at stream off

Reset core clock rate when all SFE resources are streamed off.
This will ensure that the new clock rate on the next session
will take affect.

CRs-Fixed: 2841729
Change-Id: I12f039a2abe42c7a6a1bfd6ce9d8d54b23c177dc
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram 4 년 전
부모
커밋
9e6ecad633
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_top/cam_sfe_top.c

+ 9 - 1
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_top/cam_sfe_top.c

@@ -765,8 +765,12 @@ static int cam_sfe_top_set_hw_clk_rate(
 			max_clk_rate = top_priv->req_clk_rate[i];
 	}
 
-	if (max_clk_rate == top_priv->hw_clk_rate)
+	if (max_clk_rate == top_priv->hw_clk_rate) {
+		CAM_DBG(CAM_SFE,
+			"Requested rate: %u same as current rate: %u",
+			max_clk_rate, top_priv->hw_clk_rate);
 		return 0;
+	}
 
 	soc_private = (struct cam_sfe_soc_private *)
 		soc_info->soc_private;
@@ -1604,6 +1608,10 @@ int cam_sfe_top_stop(
 			path_data->common_reg->diag_config);
 	}
 
+	/* Reset clk rate when all resources are streamed off */
+	if (!start_stop_cnt)
+		top_priv->hw_clk_rate = 0;
+
 	return 0;
 }