arm: tegra: dalmore: Fix display blink during boot
Vineel Kumar Reddy Kovvuri [Mon, 18 Feb 2013 05:34:19 +0000 (10:34 +0530)]
Fix for display flashing multiple times when jumping from bootloader
to kernel during boot

Bug 1229530

Change-Id: I2888206c6f49820b7742da92394ae5ec78d64f6b
Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com>
Reviewed-on: http://git-master/r/201151
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

arch/arm/mach-tegra/board-panel.h
arch/arm/mach-tegra/panel-p-wuxga-10-1.c

index 97d44f9..ebc75cf 100644 (file)
@@ -38,6 +38,11 @@ struct tegra_panel {
 };
 
 extern atomic_t sd_brightness;
+#ifdef CONFIG_TEGRA_DC
+       extern atomic_t display_ready;
+#else
+       static __maybe_unused atomic_t display_ready = ATOMIC_INIT(1);
+#endif
 extern struct tegra_panel dsi_l_720p_5;
 extern struct tegra_panel dsi_j_720p_4_7;
 extern struct tegra_panel dsi_s_1080p_5;
index 9718dcc..7c4b588 100644 (file)
@@ -571,6 +571,11 @@ static int dsi_p_wuxga_10_1_check_fb(struct device *dev, struct fb_info *info)
        return info->device == &disp_device->dev;
 }
 
+static int dsi_p_wuxga_10_1_display_init(struct device *dev)
+{
+       return atomic_read(&display_ready);
+}
+
 static struct platform_pwm_backlight_data dsi_p_wuxga_10_1_bl_data = {
        .pwm_id         = 1,
        .max_brightness = 255,
@@ -579,6 +584,7 @@ static struct platform_pwm_backlight_data dsi_p_wuxga_10_1_bl_data = {
        .notify         = dsi_p_wuxga_10_1_bl_notify,
        /* Only toggle backlight on fb blank notifications for disp1 */
        .check_fb       = dsi_p_wuxga_10_1_check_fb,
+       .init = dsi_p_wuxga_10_1_display_init,
 };
 
 static struct platform_device __maybe_unused