summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2011-12-27 14:47:15 -0800
committerVarun Wadekar <vwadekar@nvidia.com>2012-01-04 11:44:15 +0530
commitc2f7bb5e2296f227d4fe0afcf71d8ce1bfca6ee8 (patch)
tree698c11dd1ccc5eb3430ffa16c892c3145206378e /drivers/video
parentf3b7aa416f443777ec1bb002c18451fef8fbca32 (diff)
video: tegra: dc: use highest bandwidth setting
Apply the highest bandwidth setting before windows are programmed rather than waiting for vblank. Bug 914917 Change-Id: Iaaede9966191fdfc896bbbb19fbbadf9c4598bff Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/72301 Reviewed-by: Michael I Gold <gold@nvidia.com> Tested-by: Michael I Gold <gold@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tegra/dc/dc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 1c0ff2a51bea..1ae7633eb9da 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -973,6 +973,24 @@ unsigned long tegra_dc_get_bandwidth(struct tegra_dc_win *windows[], int n)
return tegra_dc_find_max_bandwidth(windows, n);
}
+/* program bandwidth needs if higher than old bandwidth */
+static void tegra_dc_increase_bandwidth(struct tegra_dc *dc)
+{
+ unsigned i;
+
+ if (dc->emc_clk_rate < dc->new_emc_clk_rate) {
+ dc->emc_clk_rate = dc->new_emc_clk_rate;
+ clk_set_rate(dc->emc_clk, dc->emc_clk_rate);
+ }
+
+ for (i = 0; i < DC_N_WINDOWS; i++) {
+ struct tegra_dc_win *w = &dc->windows[i];
+ if (w->bandwidth < w->new_bandwidth && w->new_bandwidth != 0)
+ tegra_dc_set_latency_allowance(dc, w);
+ }
+}
+
+/* program the current bandwidth */
static void tegra_dc_program_bandwidth(struct tegra_dc *dc)
{
unsigned i;
@@ -1230,6 +1248,7 @@ int tegra_dc_update_windows(struct tegra_dc_win *windows[], int n)
}
tegra_dc_set_dynamic_emc(windows, n);
+ tegra_dc_increase_bandwidth(dc);
tegra_dc_writel(dc, update_mask << 8, DC_CMD_STATE_CONTROL);