summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2011-09-20 18:06:49 -0700
committerSimone Willett <swillett@nvidia.com>2011-09-21 16:18:31 -0700
commit234a39002a5a4daa364271ed357de14cff06f6a9 (patch)
tree26549e42ade690839533647c3135c90f855b76a1
parent58f55261f4d70dcdbcc14aec174317b0d5d716ef (diff)
video: tegra: provide blank that clears screen
Only clear the display when ioctl FBIOBLANK is FB_BLANK_NORMAL is used This indicates that display should still be powered on and is useful when HDMI audio needs to remain active but no content is displayed on screen. bug 857117 bug 868916 Change-Id: If9bd5616a02448a4c2859432b774afa793505447 Reviewed-on: http://git-master/r/53608 Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com> Tested-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: David Pu <dpu@nvidia.com> Tested-by: David Pu <dpu@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/include/mach/dc.h2
-rw-r--r--drivers/video/tegra/dc/dc.c15
-rw-r--r--drivers/video/tegra/fb.c6
3 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h
index 11c206bfed57..1ac66a6f96b1 100644
--- a/arch/arm/mach-tegra/include/mach/dc.h
+++ b/arch/arm/mach-tegra/include/mach/dc.h
@@ -475,6 +475,8 @@ struct tegra_dc *tegra_dc_get_dc(unsigned idx);
struct tegra_dc_win *tegra_dc_get_window(struct tegra_dc *dc, unsigned win);
bool tegra_dc_get_connected(struct tegra_dc *);
+void tegra_dc_blank(struct tegra_dc *dc);
+
void tegra_dc_enable(struct tegra_dc *dc);
void tegra_dc_disable(struct tegra_dc *dc);
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 4b3bacc7be60..3e5e0b386918 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -2376,6 +2376,21 @@ bool tegra_dc_stats_get(struct tegra_dc *dc)
return true;
}
+/* make the screen blank by disabling all windows */
+void tegra_dc_blank(struct tegra_dc *dc)
+{
+ struct tegra_dc_win *dcwins[DC_N_WINDOWS];
+ unsigned i;
+
+ for (i = 0; i < DC_N_WINDOWS; i++) {
+ dcwins[i] = tegra_dc_get_window(dc, i);
+ dcwins[i]->flags &= ~TEGRA_WIN_FLAG_ENABLED;
+ }
+
+ tegra_dc_update_windows(dcwins, DC_N_WINDOWS);
+ tegra_dc_sync_windows(dcwins, DC_N_WINDOWS);
+}
+
static void _tegra_dc_disable(struct tegra_dc *dc)
{
_tegra_dc_controller_disable(dc);
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index b170bcdcba2c..72176b7e99a5 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -182,10 +182,14 @@ static int tegra_fb_blank(int blank, struct fb_info *info)
return 0;
case FB_BLANK_NORMAL:
+ dev_dbg(&tegra_fb->ndev->dev, "blank - normal\n");
+ tegra_dc_blank(tegra_fb->win->dc);
+ return 0;
+
case FB_BLANK_VSYNC_SUSPEND:
case FB_BLANK_HSYNC_SUSPEND:
case FB_BLANK_POWERDOWN:
- dev_dbg(&tegra_fb->ndev->dev, "blank\n");
+ dev_dbg(&tegra_fb->ndev->dev, "blank - powerdown\n");
tegra_dc_disable(tegra_fb->win->dc);
return 0;