summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJong Kim <jongk@nvidia.com>2012-12-12 16:20:22 -0800
committerWinnie Hsu <whsu@nvidia.com>2012-12-17 12:30:38 -0800
commitc1e028a7d3f2c2a5cda48a038053898458e7198c (patch)
treede933f63109e8f7cba2c58213b7497cf288e87af
parentbf5e8d0816d9b92219813f303f882f2c07e7230a (diff)
video: tegra: clear fb2 unspecified by bootloader
Clear framebuffer2 if and only if framebuffer2 is not specified by the bootloader. If the bootloader framebuffer2 is specified, then copy the contents to kernel framebuffer2. bug 1175957 Change-Id: I4ac4432c1dac6a6c634ab3e6ae31628f9c64ddb4 Signed-off-by: Jong Kim <jongk@nvidia.com> Reviewed-on: http://git-master/r/170663 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board-cardhu-panel.c13
-rw-r--r--arch/arm/mach-tegra/board-ventana-panel.c13
2 files changed, 20 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c
index d7101af55712..bbd6d4aaac37 100644
--- a/arch/arm/mach-tegra/board-cardhu-panel.c
+++ b/arch/arm/mach-tegra/board-cardhu-panel.c
@@ -1444,9 +1444,16 @@ skip_lvds:
res->start = tegra_fb2_start;
res->end = tegra_fb2_start + tegra_fb2_size - 1;
- /* Copy the bootloader fb to the fb2. */
- tegra_move_framebuffer(tegra_fb2_start, tegra_bootloader_fb_start,
- min(tegra_fb2_size, tegra_bootloader_fb_size));
+ /*
+ * If the bootloader fb2 is valid, copy it to the fb2, or else
+ * clear fb2 to avoid garbage on dispaly2.
+ */
+ if (tegra_bootloader_fb2_size)
+ tegra_move_framebuffer(tegra_fb2_start,
+ tegra_bootloader_fb2_start,
+ min(tegra_fb2_size, tegra_bootloader_fb2_size));
+ else
+ tegra_clear_framebuffer(tegra_fb2_start, tegra_fb2_size);
if (!err)
err = nvhost_device_register(&cardhu_disp2_device);
diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c
index 56a222432fe0..d2d89392e1c5 100644
--- a/arch/arm/mach-tegra/board-ventana-panel.c
+++ b/arch/arm/mach-tegra/board-ventana-panel.c
@@ -433,9 +433,16 @@ int __init ventana_panel_init(void)
tegra_move_framebuffer(tegra_fb_start, tegra_bootloader_fb_start,
min(tegra_fb_size, tegra_bootloader_fb_size));
- /* Copy the bootloader fb to the fb2. */
- tegra_move_framebuffer(tegra_fb2_start, tegra_bootloader_fb_start,
- min(tegra_fb2_size, tegra_bootloader_fb_size));
+ /*
+ * If the bootloader fb2 is valid, copy it to the fb2, or else
+ * clear fb2 to avoid garbage on dispaly2.
+ */
+ if (tegra_bootloader_fb2_size)
+ tegra_move_framebuffer(tegra_fb2_start,
+ tegra_bootloader_fb2_start,
+ min(tegra_fb2_size, tegra_bootloader_fb2_size));
+ else
+ tegra_clear_framebuffer(tegra_fb2_start, tegra_fb2_size);
#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)