summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-colibri_t20-panel.c
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-12-12 15:01:54 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-12-12 15:01:54 +0100
commitdc8410c4b219b0fee3f045c3bceb8d8ad97dece2 (patch)
tree1c4dfe997f96160780c9556b98a9d2d180a45886 /arch/arm/mach-tegra/board-colibri_t20-panel.c
parent53e54c77daa88dfb22d40f277f932342f5254e36 (diff)
colibri_t20: clear LVDS/HDMI framebuffers
Instead of copying the boot loader frame buffer which currently neither displays anything worth preserving nor even what it has in the right resolution make sure both LVDS as well as HDMI frame buffers get cleared during initialisation to avoid displaying random garbled stuff.
Diffstat (limited to 'arch/arm/mach-tegra/board-colibri_t20-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-colibri_t20-panel.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/arm/mach-tegra/board-colibri_t20-panel.c b/arch/arm/mach-tegra/board-colibri_t20-panel.c
index 6089e0512711..006f668659cb 100644
--- a/arch/arm/mach-tegra/board-colibri_t20-panel.c
+++ b/arch/arm/mach-tegra/board-colibri_t20-panel.c
@@ -521,6 +521,7 @@ int __init colibri_t20_panel_init(void)
{
int err;
struct resource __maybe_unused *res;
+ void __iomem *to_io;
/* enable hdmi hotplug gpio for hotplug detection */
gpio_request(colibri_t20_hdmi_hpd, "hdmi_hpd");
@@ -559,14 +560,21 @@ int __init colibri_t20_panel_init(void)
res->end = tegra_fb2_start + tegra_fb2_size - 1;
#endif /* CONFIG_TEGRA_GRHOST && CONFIG_TEGRA_DC */
- /* Copy the bootloader fb to the fb. */
- 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));
-
+ /* Make sure LVDS framebuffer is cleared. */
+ to_io = ioremap(tegra_fb_start, tegra_fb_size);
+ if (to_io) {
+ memset(to_io, 0, tegra_fb_size);
+ iounmap(to_io);
+ } else pr_err("%s: Failed to map LVDS framebuffer\n", __func__);
+
+ /* Make sure HDMI framebuffer is cleared.
+ Note: this seems to fix a tegradc.1 initialisation race in case of
+ framebuffer console as well. */
+ to_io = ioremap(tegra_fb2_start, tegra_fb2_size);
+ if (to_io) {
+ memset(to_io, 0, tegra_fb2_size);
+ iounmap(to_io);
+ } else pr_err("%s: Failed to map HDMI framebuffer\n", __func__);
#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
if (!err)