diff options
| author | Ingrid Gallardo <ingridg@codeaurora.org> | 2014-08-29 16:49:51 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:34:03 -0700 |
| commit | 6892685c74a0fb415b596a1b9be7a549d439fb5a (patch) | |
| tree | 48b71d5d9e1748d92b8cadf602b8f22654aae52a /drivers/video/fbdev | |
| parent | 684b3e45791d5394d5d51b7cccba490e1470ce5a (diff) | |
msm: mdss: consider memory controller channels for bw vote
Add property to sepecify the number of memory controller
channels. This property is used by the driver to
reduce the display bandwidth vote by the number of
channels.
Change-Id: Id8fbdc2cac532569627fd6b4c0bf4e71061f6673
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss.h | 1 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp.c | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss.h b/drivers/video/fbdev/msm/mdss.h index e6cf0da83e91..f8608986007a 100644 --- a/drivers/video/fbdev/msm/mdss.h +++ b/drivers/video/fbdev/msm/mdss.h @@ -159,6 +159,7 @@ struct mdss_data_type { u32 rot_block_size; u32 axi_port_cnt; + u32 bus_channels; u32 curr_bw_uc_idx; u32 bus_hdl; struct msm_bus_scale_pdata *bus_scale_table; diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c index bea124f4ac25..a687d51894f7 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.c +++ b/drivers/video/fbdev/msm/mdss_mdp.c @@ -352,6 +352,9 @@ int mdss_mdp_bus_scale_set_quota(u64 ab_quota_rt, u64 ab_quota_nrt, new_uc_idx = (mdss_res->curr_bw_uc_idx % (bw_table->num_usecases - 1)) + 1; + if (mdss_res->bus_channels > 0) + ib_quota = div_u64(ib_quota, mdss_res->bus_channels); + for (i = 0; i < mdss_res->axi_port_cnt; i++) { vect = &bw_table->usecase[mdss_res->curr_bw_uc_idx]. vectors[i]; @@ -367,8 +370,9 @@ int mdss_mdp_bus_scale_set_quota(u64 ab_quota_rt, u64 ab_quota_nrt, vect->ab = ab_quota[i]; vect->ib = ib_quota; - pr_debug("uc_idx=%d path_idx=%d ab=%llu ib=%llu\n", - new_uc_idx, i, vect->ab, vect->ib); + pr_debug("uc_idx=%d path_idx=%d ab=%llu ib=%llu ch=%d\n", + new_uc_idx, i, vect->ab, vect->ib, + mdss_res->bus_channels); } } mdss_res->curr_bw_uc_idx = new_uc_idx; @@ -2620,6 +2624,12 @@ static int mdss_mdp_parse_dt_misc(struct platform_device *pdev) "qcom,mdss-traffic-shaper-enabled"); mdata->has_rot_dwnscale = of_property_read_bool(pdev->dev.of_node, "qcom,mdss-has-rotator-downscale"); + + rc = of_property_read_u32(pdev->dev.of_node, + "qcom,mdss-dram-channels", &mdata->bus_channels); + if (rc) + pr_debug("number of channels property not specified\n"); + return 0; } |
