Browse Source

Merge "msm: camera: isp: Reset SFE HW clock rate at stream off" into camera-kernel.lnx.5.0

Camera Software Integration 4 years ago
parent
commit
a5ec279fcd
1 changed files with 9 additions and 1 deletions
  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;
 }