summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-12-21 15:04:36 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2012-12-21 15:04:36 +0100
commit9fec45b720abdf5b699aaeb9dad074453dc46d09 (patch)
tree2dd39cfbbe2acc1474f480875cee317ee349cbf7
parent5dac187eabed5b35ab1aa114e8e19fb2e8d69137 (diff)
colibri_t30: 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.
-rw-r--r--arch/arm/mach-tegra/board-colibri_t30-panel.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/arch/arm/mach-tegra/board-colibri_t30-panel.c b/arch/arm/mach-tegra/board-colibri_t30-panel.c
index 59e35ca47247..ee7487469c39 100644
--- a/arch/arm/mach-tegra/board-colibri_t30-panel.c
+++ b/arch/arm/mach-tegra/board-colibri_t30-panel.c
@@ -716,6 +716,7 @@ int __init colibri_t30_panel_init(void)
{
int err = 0;
struct resource *res;
+ void __iomem *to_io;
/* enable hdmi hotplug gpio for hotplug detection */
gpio_request(colibri_t30_hdmi_hpd, "hdmi_hpd");
@@ -752,24 +753,32 @@ int __init colibri_t30_panel_init(void)
IORESOURCE_MEM, "fbmem");
res->start = tegra_fb_start;
res->end = tegra_fb_start + tegra_fb_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));
-
-#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
- if (!err)
- err = nvhost_device_register(&colibri_t30_disp1_device);
res = nvhost_get_resource_byname(&colibri_t30_disp2_device,
IORESOURCE_MEM, "fbmem");
res->start = tegra_fb2_start;
res->end = tegra_fb2_start + tegra_fb2_size - 1;
+#endif /* CONFIG_TEGRA_GRHOST & CONFIG_TEGRA_DC */
+
+ /* 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__);
- /* 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 defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
+ if (!err)
+ err = nvhost_device_register(&colibri_t30_disp1_device);
if (!err)
err = nvhost_device_register(&colibri_t30_disp2_device);