video: tegra: fb: Add flag to flip fb during probe
authorColin Cross <ccross@android.com>
Wed, 20 Oct 2010 05:11:37 +0000 (22:11 -0700)
committerColin Cross <ccross@android.com>
Wed, 20 Oct 2010 21:30:18 +0000 (14:30 -0700)
Change-Id: Ibe65175392fe2fe491cb88b5df0771a17bc0c706
Signed-off-by: Colin Cross <ccross@android.com>
arch/arm/mach-tegra/include/mach/dc.h
drivers/video/tegra/fb.c

index f33c724ed8642579de48a8ee4aef7d96e7f74299..78a303e1263416d2b52d5faaf1234dd2ae5eebde 100644 (file)
@@ -143,8 +143,12 @@ struct tegra_fb_data {
        int             xres;
        int             yres;
        int             bits_per_pixel;
+
+       unsigned long   flags;
 };
 
+#define TEGRA_FB_FLIP_ON_PROBE         (1 << 0)
+
 struct tegra_dc_platform_data {
        unsigned long           flags;
        struct tegra_dc_out     *default_out;
index 8e0964841cdb974d9a2bba3fb3224c97d677d645..6d826d03aef903025b2fdccc95f16d018762a0c4 100644 (file)
@@ -703,6 +703,11 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
 
        dev_info(&ndev->dev, "probed\n");
 
+       if (fb_data->flags & TEGRA_FB_FLIP_ON_PROBE) {
+               tegra_dc_update_windows(&tegra_fb->win, 1);
+               tegra_dc_sync_windows(&tegra_fb->win, 1);
+       }
+
        return tegra_fb;
 
 err_iounmap_fb: