summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/fb/mdss-mdp.txt3
-rw-r--r--drivers/video/fbdev/msm/mdss.h1
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.c14
3 files changed, 16 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/fb/mdss-mdp.txt b/Documentation/devicetree/bindings/fb/mdss-mdp.txt
index f1390f553938..b20cecfcec0a 100644
--- a/Documentation/devicetree/bindings/fb/mdss-mdp.txt
+++ b/Documentation/devicetree/bindings/fb/mdss-mdp.txt
@@ -341,6 +341,8 @@ Optional properties:
for MDSS rotator which spread out rotator bandwidth request
so that rotator don't compete with other real time read
clients.
+- qcom,mdss-dram-channels: This represents the number of channels in the
+ Bus memory controller.
Fudge Factors: Fudge factors are used to boost demand for
resources like bus bandswidth, clk rate etc. to
@@ -466,6 +468,7 @@ Example:
qcom,msm-bus,name = "mdss_mdp";
qcom,msm-bus,num-cases = <3>;
qcom,msm-bus,num-paths = <2>;
+ qcom,mdss-dram-channels = <2>;
qcom,msm-bus,vectors-KBps =
<22 512 0 0>, <23 512 0 0>,
<22 512 0 6400000>, <23 512 0 6400000>,
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;
}