mach-tegra: change fb size to support 4K
Yogish Kulkarni [Mon, 3 Mar 2014 14:03:42 +0000 (19:03 +0530)]
Change fb memory size to support 4K resolution

Change-Id: I9bae86724d8c569a124939faed0b136778080a44
Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-on: http://git-master/r/376261
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bryan Wu <pengw@nvidia.com>
Tested-by: Bryan Wu <pengw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Eric Brower <ebrower@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

arch/arm/mach-tegra/board-ardbeg.c

index 4c2af4e..a82405c 100644 (file)
@@ -1388,13 +1388,24 @@ static void __init tegra_ardbeg_dt_init(void)
 
 static void __init tegra_ardbeg_reserve(void)
 {
+       unsigned long fb1_size, fb2_size, carveout_size;
+
+#ifndef CONFIG_TEGRA_HDMI_PRIMARY
+       fb1_size = SZ_16M + SZ_2M; /* 1920*1200*4*2 = 18432000 bytes */
+       fb2_size = SZ_64M + SZ_4M; /* 3840*2160*4*2 = 66355200 bytes */
+#else
+       fb1_size = SZ_64M + SZ_4M; /* 3840*2160*4*2 = 66355200 bytes */
+       fb2_size = SZ_16M + SZ_2M; /* 1920*1200*4*2 = 18432000 bytes */
+#endif
+
 #if defined(CONFIG_NVMAP_CONVERT_CARVEOUT_TO_IOVMM) || \
                defined(CONFIG_TEGRA_NO_CARVEOUT)
-       /* 1920*1200*4*2 = 18432000 bytes */
-       tegra_reserve(0, SZ_16M + SZ_2M, SZ_16M);
+       carveout_size = 0;
 #else
-       tegra_reserve(SZ_1G, SZ_16M + SZ_2M, SZ_4M);
+       carveout_size = SZ_1G;
 #endif
+
+       tegra_reserve(carveout_size, fb1_size, fb2_size);
        ardbeg_ramconsole_reserve(SZ_1M);
 }