video: tegra: dc: consider bandwidth efficiency for tegra2
Bharat Nihalani [Tue, 26 Jun 2012 12:36:42 +0000 (17:36 +0530)]
This is similar to commit a62be5b5595ad86411ced81bceeb3d6a693426d2
pushed for rel-14 branch.

Bug 1004341

Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>

Reviewed-on: http://git-master/r/111227
(cherry-picked from fbfce3106da8dad18948103c812bdd9d45ffdd06)

Change-Id: Ib459094fd6499b3cc63bc534bf36e57dc98ce62b
Reviewed-on: http://git-master/r/114584
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

drivers/video/tegra/dc/bandwidth.c

index c7e5072..0b307f4 100644 (file)
@@ -181,6 +181,13 @@ static unsigned long tegra_dc_calc_win_bandwidth(struct tegra_dc *dc,
                dfixed_trunc(w->w) / w->out_w * (WIN_IS_TILED(w) ?
                tiled_windows_bw_multiplier : 1);
 
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
+       /*
+        * Assuming 60% efficiency: i.e. if we calculate we need 70MBps, we
+        * will request 117MBps from EMC.
+        */
+       ret = ret + (17 * ret / 25);
+#endif
        return ret;
 }