Skip to content

Commit 7323694

Browse files
committed
drm/msm/mdss: inline msm_mdss_icc_request_bw()
There are just two places where we set the bandwidth: in the resume and in the suspend paths. Drop the wrapping function msm_mdss_icc_request_bw() and call icc_set_bw() directly. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/570168/ Link: https://lore.kernel.org/r/[email protected]
1 parent fabaf17 commit 7323694

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

drivers/gpu/drm/msm/msm_mdss.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
7769
static 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

228220
static 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

287280
static 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

Comments
 (0)