summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2011-08-31 18:01:45 -0700
committerVarun Colbert <vcolbert@nvidia.com>2011-09-06 16:47:24 -0700
commit969fe6f1a6b5e28cf6de75937fd100c73e6a99b4 (patch)
treed0313845940123cc97e1bd7d4832b38eab674eb5
parent58de177d5eb9ad81c6bfb25195a88011ce8622b9 (diff)
video: tegra: dc: disable windows on dc disable
When disabling a display, also disable its windows. This forces applications to resend windows on hotplug and resume or they will see a blank screen. Bug 871107 Change-Id: I647cbc27fa8ce34b18dd3fbd270f9b8569d7f506 Reviewed-on: http://git-master/r/50204 Tested-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Donghan Ryu <dryu@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/dc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 2bf4e1b77bb1..94580d90aff1 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -2295,17 +2295,20 @@ static void _tegra_dc_controller_disable(struct tegra_dc *dc)
clk_disable(dc->clk);
tegra_dvfs_set_rate(dc->clk, 0);
- for (i = 0; i < DC_N_WINDOWS; i++) {
+ if (dc->out && dc->out->disable)
+ dc->out->disable();
+
+ for (i = 0; i < dc->n_windows; i++) {
struct tegra_dc_win *w = &dc->windows[i];
+
+ /* reset window bandwidth */
w->bandwidth = 0;
w->new_bandwidth = 0;
- }
- if (dc->out && dc->out->disable)
- dc->out->disable();
+ /* disable windows */
+ w->flags &= ~TEGRA_WIN_FLAG_ENABLED;
- /* flush any pending syncpt waits */
- for (i = 0; i < dc->n_windows; i++) {
+ /* flush any pending syncpt waits */
while (dc->syncpt[i].min < dc->syncpt[i].max) {
dc->syncpt[i].min++;
nvhost_syncpt_cpu_incr(&dc->ndev->host->syncpt,