@@ -66,14 +66,6 @@ static int msm_mdss_parse_data_bus_icc_path(struct device *dev,
6666 return 0 ;
6767}
6868
69- static void msm_mdss_icc_request_bw (struct msm_mdss * msm_mdss , unsigned long bw )
70- {
71- int i ;
72-
73- for (i = 0 ; i < msm_mdss -> num_mdp_paths ; i ++ )
74- icc_set_bw (msm_mdss -> mdp_path [i ], 0 , Bps_to_icc (bw ));
75- }
76-
7769static void msm_mdss_irq (struct irq_desc * desc )
7870{
7971 struct msm_mdss * msm_mdss = irq_desc_get_handler_data (desc );
@@ -227,14 +219,15 @@ const struct msm_mdss_data *msm_mdss_get_mdss_data(struct device *dev)
227219
228220static int msm_mdss_enable (struct msm_mdss * msm_mdss )
229221{
230- int ret ;
222+ int ret , i ;
231223
232224 /*
233225 * Several components have AXI clocks that can only be turned on if
234226 * the interconnect is enabled (non-zero bandwidth). Let's make sure
235227 * that the interconnects are at least at a minimum amount.
236228 */
237- msm_mdss_icc_request_bw (msm_mdss , MIN_IB_BW );
229+ for (i = 0 ; i < msm_mdss -> num_mdp_paths ; i ++ )
230+ icc_set_bw (msm_mdss -> mdp_path [i ], 0 , Bps_to_icc (MIN_IB_BW ));
238231
239232 ret = clk_bulk_prepare_enable (msm_mdss -> num_clocks , msm_mdss -> clocks );
240233 if (ret ) {
@@ -286,8 +279,12 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss)
286279
287280static int msm_mdss_disable (struct msm_mdss * msm_mdss )
288281{
282+ int i ;
283+
289284 clk_bulk_disable_unprepare (msm_mdss -> num_clocks , msm_mdss -> clocks );
290- msm_mdss_icc_request_bw (msm_mdss , 0 );
285+
286+ for (i = 0 ; i < msm_mdss -> num_mdp_paths ; i ++ )
287+ icc_set_bw (msm_mdss -> mdp_path [i ], 0 , 0 );
291288
292289 return 0 ;
293290}
0 commit comments