board rk30 sdk,LR097 DS1006H,rk3168 tb:use get_fb_size instead of RK30_FB0_MEM_SIZE
authoryxj <yxj@rock-chips.com>
Wed, 23 Jan 2013 03:36:50 +0000 (11:36 +0800)
committeryxj <yxj@rock-chips.com>
Wed, 23 Jan 2013 03:39:30 +0000 (11:39 +0800)
arch/arm/mach-rk30/board-rk30-sdk.c
arch/arm/mach-rk30/board-rk3168-LR097.c
arch/arm/mach-rk30/board-rk3168-ds1006h.c
arch/arm/mach-rk30/board-rk3168-tb.c

index 93161fc2dfd71f79d264638c91d002dd648843b4..3f98b9433832b2bf5e15612c687619c7b1944d24 100755 (executable)
 #if defined(CONFIG_DP501)   //for display port transmitter dp501
 #include<linux/dp501.h>
 #endif
-#ifdef  CONFIG_THREE_FB_BUFFER
-#define RK30_FB0_MEM_SIZE 12*SZ_1M
-#else
-#define RK30_FB0_MEM_SIZE 8*SZ_1M
-#endif
 
 #include "board-rk30-sdk-camera.c"
 
@@ -1845,16 +1840,16 @@ static void __init rk30_reserve(void)
        rk30_ion_pdata.heaps[0].base = board_mem_reserve_add("ion", ION_RESERVE_SIZE);
 #endif
 #ifdef CONFIG_FB_ROCKCHIP
-       resource_fb[0].start = board_mem_reserve_add("fb0 buf", RK30_FB0_MEM_SIZE);
-       resource_fb[0].end = resource_fb[0].start + RK30_FB0_MEM_SIZE - 1;
+       resource_fb[0].start = board_mem_reserve_add("fb0 buf", get_fb_size());
+       resource_fb[0].end = resource_fb[0].start + get_fb_size()- 1;
 #if 0
        resource_fb[1].start = board_mem_reserve_add("ipp buf", RK30_FB0_MEM_SIZE);
        resource_fb[1].end = resource_fb[1].start + RK30_FB0_MEM_SIZE - 1;
 #endif
 
 #if defined(CONFIG_FB_ROTATE) || !defined(CONFIG_THREE_FB_BUFFER)
-       resource_fb[2].start = board_mem_reserve_add("fb2 buf", RK30_FB0_MEM_SIZE);
-       resource_fb[2].end = resource_fb[2].start + RK30_FB0_MEM_SIZE - 1;
+       resource_fb[2].start = board_mem_reserve_add("fb2 buf",get_fb_size());
+       resource_fb[2].end = resource_fb[2].start + get_fb_size() - 1;
 #endif
 #endif
 #ifdef CONFIG_VIDEO_RK29
index 7949d85165c333d2c6a35a87e9fa3b730cf7e195..bc6256d9a2331df9296b34e86103f94148596854 100755 (executable)
 #include "../../../drivers/staging/android/timed_gpio.h"
 #endif
 
-#ifdef  CONFIG_THREE_FB_BUFFER
-#define RK30_FB0_MEM_SIZE 36*SZ_1M
-#else
-#define RK30_FB0_MEM_SIZE 24*SZ_1M
-#endif
 
 #include "board-rk3168-LR097-camera.c"
 
@@ -2140,15 +2135,19 @@ static void __init rk30_reserve(void)
        rk30_ion_pdata.heaps[0].base = board_mem_reserve_add("ion", ION_RESERVE_SIZE);
 #endif
 #ifdef CONFIG_FB_ROCKCHIP
-       resource_fb[0].start = board_mem_reserve_add("fb0", RK30_FB0_MEM_SIZE);
-       resource_fb[0].end = resource_fb[0].start + RK30_FB0_MEM_SIZE - 1;
-       #if 0
+       resource_fb[0].start = board_mem_reserve_add("fb0 buf", get_fb_size());
+       resource_fb[0].end = resource_fb[0].start + get_fb_size()- 1;
+#if 0
        resource_fb[1].start = board_mem_reserve_add("ipp buf", RK30_FB0_MEM_SIZE);
        resource_fb[1].end = resource_fb[1].start + RK30_FB0_MEM_SIZE - 1;
-       resource_fb[2].start = board_mem_reserve_add("fb2", RK30_FB0_MEM_SIZE);
-       resource_fb[2].end = resource_fb[2].start + RK30_FB0_MEM_SIZE - 1;
-       #endif
 #endif
+
+#if defined(CONFIG_FB_ROTATE) || !defined(CONFIG_THREE_FB_BUFFER)
+       resource_fb[2].start = board_mem_reserve_add("fb2 buf",get_fb_size());
+       resource_fb[2].end = resource_fb[2].start + get_fb_size() - 1;
+#endif
+#endif
+
 #ifdef CONFIG_VIDEO_RK29
        rk30_camera_request_reserve_mem();
 #endif
index 7c12acb6c88803d9a7990eb9b74ff4bab0302520..364ef90192b0be31bed4f60222f0edeb87e3d4eb 100644 (file)
 #include <linux/gps.h>
 #endif
 
-#ifdef  CONFIG_THREE_FB_BUFFER
-#define RK30_FB0_MEM_SIZE 12*SZ_1M
-#else
-#define RK30_FB0_MEM_SIZE 8*SZ_1M
-#endif
-
 #include "board-rk3168-ds1006h-camera.c"
 #include <plat/key.h>
 
@@ -1703,16 +1697,22 @@ static void __init rk30_reserve(void)
 #ifdef CONFIG_ION
        rk30_ion_pdata.heaps[0].base = board_mem_reserve_add("ion", ION_RESERVE_SIZE);
 #endif
+
 #ifdef CONFIG_FB_ROCKCHIP
-       resource_fb[0].start = board_mem_reserve_add("fb0", RK30_FB0_MEM_SIZE);
-       resource_fb[0].end = resource_fb[0].start + RK30_FB0_MEM_SIZE - 1;
-       #if 0
+       resource_fb[0].start = board_mem_reserve_add("fb0 buf", get_fb_size());
+       resource_fb[0].end = resource_fb[0].start + get_fb_size()- 1;
+#if 0
        resource_fb[1].start = board_mem_reserve_add("ipp buf", RK30_FB0_MEM_SIZE);
        resource_fb[1].end = resource_fb[1].start + RK30_FB0_MEM_SIZE - 1;
-       resource_fb[2].start = board_mem_reserve_add("fb2", RK30_FB0_MEM_SIZE);
-       resource_fb[2].end = resource_fb[2].start + RK30_FB0_MEM_SIZE - 1;
-       #endif
 #endif
+
+#if defined(CONFIG_FB_ROTATE) || !defined(CONFIG_THREE_FB_BUFFER)
+       resource_fb[2].start = board_mem_reserve_add("fb2 buf",get_fb_size());
+       resource_fb[2].end = resource_fb[2].start + get_fb_size() - 1;
+#endif
+#endif
+
+
 #ifdef CONFIG_VIDEO_RK29
        rk30_camera_request_reserve_mem();
 #endif
index bd075e1ce07ab718f80916a99c6c6f02c1074118..d40247bb5a1c0c54454c503c56964822ad5a42b8 100755 (executable)
 #include "../../../drivers/staging/android/timed_gpio.h"
 #endif
 
-#ifdef  CONFIG_THREE_FB_BUFFER
-#define RK30_FB0_MEM_SIZE 12*SZ_1M
-#else
-#define RK30_FB0_MEM_SIZE 8*SZ_1M
-#endif
-
 #include "board-rk3168-tb-camera.c"
 
 #if defined(CONFIG_TOUCHSCREEN_GT8XX)
@@ -1966,15 +1960,19 @@ static void __init rk30_reserve(void)
        rk30_ion_pdata.heaps[0].base = board_mem_reserve_add("ion", ION_RESERVE_SIZE);
 #endif
 #ifdef CONFIG_FB_ROCKCHIP
-       resource_fb[0].start = board_mem_reserve_add("fb0", RK30_FB0_MEM_SIZE);
-       resource_fb[0].end = resource_fb[0].start + RK30_FB0_MEM_SIZE - 1;
-       #if 0
+       resource_fb[0].start = board_mem_reserve_add("fb0 buf", get_fb_size());
+       resource_fb[0].end = resource_fb[0].start + get_fb_size()- 1;
+#if 0
        resource_fb[1].start = board_mem_reserve_add("ipp buf", RK30_FB0_MEM_SIZE);
        resource_fb[1].end = resource_fb[1].start + RK30_FB0_MEM_SIZE - 1;
-       resource_fb[2].start = board_mem_reserve_add("fb2", RK30_FB0_MEM_SIZE);
-       resource_fb[2].end = resource_fb[2].start + RK30_FB0_MEM_SIZE - 1;
-       #endif
 #endif
+
+#if defined(CONFIG_FB_ROTATE) || !defined(CONFIG_THREE_FB_BUFFER)
+       resource_fb[2].start = board_mem_reserve_add("fb2 buf",get_fb_size());
+       resource_fb[2].end = resource_fb[2].start + get_fb_size() - 1;
+#endif
+#endif
+
 #ifdef CONFIG_VIDEO_RK29
        rk30_camera_request_reserve_mem();
 #endif