aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Solomon <daniels@nvidia.com>2015-01-15 20:01:27 -0800
committerMitch Luban <mluban@nvidia.com>2015-01-19 14:11:44 -0800
commit1330d02ca9b244e6f5525c529c2ed5f859bdad6c (patch)
treeb0f7e83a9b0532713891b883a2ef8fc654862e0c
parent123a7deee23ac4718d3d3be502b43c36a4919ba6 (diff)
tegra: video: dc: fix flicker during resume
Currently we use aligned CMU update during bootup to avoid flicker caused by enabling and disabline CMU. This causes an issue during resume, which shares the same code path, where CMU can be written to late enough in the frame to cause flicker. This change modifies this behavior such that we use aligned CMU update only during boot, for seamless boot, and then use a regular CMU update during resume. Change-Id: If434734ed729ad7690ba707ee90e6f7a62ada2cc Signed-off-by: Daniel Solomon <daniels@nvidia.com> Reviewed-on: http://git-master/r/673243 Reviewed-by: Aly Hirani <ahirani@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Mitch Luban <mluban@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/dc.c13
-rw-r--r--drivers/video/tegra/dc/dc_priv_defs.h3
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 15dad5b727b..95efb1aab51 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1109,11 +1109,6 @@ static void _tegra_dc_update_cmu(struct tegra_dc *dc, struct tegra_dc_cmu *cmu)
tegra_dc_cache_cmu(dc, cmu);
- if (dc->cmu_skip_once) {
- dc->cmu_skip_once = false;
- return;
- }
-
/* Disable CMU to avoid programming it while it is in use */
val = tegra_dc_readl(dc, DC_DISP_DISP_COLOR_CONTROL);
if (val & CMU_ENABLE) {
@@ -2345,7 +2340,11 @@ static int tegra_dc_init(struct tegra_dc *dc)
#endif
#ifdef CONFIG_TEGRA_DC_CMU
- _tegra_dc_update_cmu_aligned(dc, &dc->cmu, true);
+ if (dc->is_cmu_set_bl)
+ _tegra_dc_update_cmu_aligned(dc, &dc->cmu, true);
+ else
+ _tegra_dc_update_cmu(dc, &dc->cmu);
+ dc->is_cmu_set_bl = false;
#endif
tegra_dc_set_color_control(dc);
for_each_set_bit(i, &dc->valid_windows, DC_N_WINDOWS) {
@@ -3212,6 +3211,8 @@ static int tegra_dc_probe(struct platform_device *ndev)
pm_runtime_enable(&ndev->dev);
#ifdef CONFIG_TEGRA_DC_CMU
+ /* if bootloader leaves this head enabled, then skip CMU programming. */
+ dc->is_cmu_set_bl = (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED) != 0;
dc->cmu_enabled = dc->pdata->cmu_enable;
#endif
diff --git a/drivers/video/tegra/dc/dc_priv_defs.h b/drivers/video/tegra/dc/dc_priv_defs.h
index 0f2fdfe9b9b..f8e43627520 100644
--- a/drivers/video/tegra/dc/dc_priv_defs.h
+++ b/drivers/video/tegra/dc/dc_priv_defs.h
@@ -168,7 +168,8 @@ struct tegra_dc {
#ifdef CONFIG_TEGRA_DC_CMU
struct tegra_dc_cmu cmu;
struct tegra_dc_cmu cmu_shadow;
- bool cmu_skip_once;
+ /* Is CMU set by bootloader */
+ bool is_cmu_set_bl;
bool cmu_shadow_dirty;
bool cmu_shadow_force_update;
bool cmu_enabled;