summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Xie <xxie@nvidia.com>2011-06-30 16:06:57 -0700
committerNiket Sirsi <nsirsi@nvidia.com>2011-07-21 18:02:02 -0700
commit9ce7a159660b9f9087a4d655b4155d199a6e4eff (patch)
treec8b7723a5b0c4a4b9b9453e0cf6560d643d08a24
parent2646dd1d3b3d8676f6e9a98bfb710c32396d7f33 (diff)
tegra: dc: change EMC efficiency for bandwidth
BUG 835372 Change-Id: I571ca8785893df339175306f548daa31158721fd Reviewed-on: http://git-master/r/39277 Reviewed-by: Xin Xie <xxie@nvidia.com> Tested-by: Xin Xie <xxie@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/dc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index fef8bb84f46f..4e15e0a5d662 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -531,11 +531,6 @@ static unsigned int tegra_dc_find_max_bandwidth(struct tegra_dc_win *wins[],
/* 8 bits per byte (1 << 3) */
#define BIT_TO_BYTE_SHIFT 3
-/*
- * Assuming 50% (X >> 1) efficiency: i.e. if we calculate we need 70MBps, we
- * will request 140MBps from EMC.
- */
-#define MEM_EFFICIENCY_SHIFT 1
static unsigned long tegra_dc_get_emc_rate(struct tegra_dc_win *wins[], int n)
{
int i;
@@ -571,7 +566,9 @@ static unsigned long tegra_dc_get_emc_rate(struct tegra_dc_win *wins[], int n)
(WIN_IS_TILED(w) ? TILED_WINDOWS_BW_MULTIPLIER : 1);
}
- max = tegra_dc_find_max_bandwidth(wins, bw, n) << MEM_EFFICIENCY_SHIFT;
+ max = tegra_dc_find_max_bandwidth(wins, bw, n);
+ /* multiply bandwidth by 2.5 assuming 40% memory efficiency */
+ max = (max << 1) + (max >> 1);
ret = EMC_BW_TO_FREQ(max);
@@ -585,7 +582,6 @@ static unsigned long tegra_dc_get_emc_rate(struct tegra_dc_win *wins[], int n)
return ret;
}
#undef BIT_TO_BYTE_SHIFT
-#undef MEM_EFFICIENCY_SHIFT
static void tegra_dc_change_emc(struct tegra_dc *dc)
{