From 543b26c0327ade37c04b9a8d307788046fe28f5d Mon Sep 17 00:00:00 2001 From: luowei Date: Wed, 27 Apr 2011 14:58:41 +0800 Subject: [PATCH] ZYC modify camera according to IPP for A22 --- arch/arm/configs/rk29_a22_defconfig | 4 +++- arch/arm/mach-rk29/board-rk29-a22.c | 21 +++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/arch/arm/configs/rk29_a22_defconfig b/arch/arm/configs/rk29_a22_defconfig index e9644ad23367..d45026b818e6 100755 --- a/arch/arm/configs/rk29_a22_defconfig +++ b/arch/arm/configs/rk29_a22_defconfig @@ -1233,7 +1233,9 @@ CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_RK2818 is not set CONFIG_FB_RK29=y -# CONFIG_FB_WORK_IPP is not set +CONFIG_FB_WORK_IPP=y +# CONFIG_FB_SCALING_OSD is not set +CONFIG_FB_ROTATE_VIDEO=y # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set diff --git a/arch/arm/mach-rk29/board-rk29-a22.c b/arch/arm/mach-rk29/board-rk29-a22.c index c8075857b6cd..cab9995ceaec 100755 --- a/arch/arm/mach-rk29/board-rk29-a22.c +++ b/arch/arm/mach-rk29/board-rk29-a22.c @@ -91,14 +91,19 @@ #define MEM_CAMIPP_SIZE 0 #endif #define MEM_FB_SIZE (3*SZ_2M) - +#ifdef CONFIG_FB_WORK_IPP +#define MEM_FBIPP_SIZE SZ_8M //1920 x 1080 x 2 x 2 //RGB565 = x2;RGB888 = x4 +#else +#define MEM_FBIPP_SIZE 0 +#endif #define PMEM_GPU_BASE ((u32)RK29_SDRAM_PHYS + SDRAM_SIZE - PMEM_GPU_SIZE) #define PMEM_UI_BASE (PMEM_GPU_BASE - PMEM_UI_SIZE) #define PMEM_VPU_BASE (PMEM_UI_BASE - PMEM_VPU_SIZE) #define PMEM_CAM_BASE (PMEM_VPU_BASE - PMEM_CAM_SIZE) #define MEM_CAMIPP_BASE (PMEM_CAM_BASE - MEM_CAMIPP_SIZE) #define MEM_FB_BASE (MEM_CAMIPP_BASE - MEM_FB_SIZE) -#define LINUX_SIZE (MEM_FB_BASE - RK29_SDRAM_PHYS) +#define MEM_FBIPP_BASE (MEM_FB_BASE - MEM_FBIPP_SIZE) +#define LINUX_SIZE (MEM_FBIPP_BASE - RK29_SDRAM_PHYS) #define PREALLOC_WLAN_SEC_NUM 4 #define PREALLOC_WLAN_BUF_NUM 160 @@ -270,9 +275,17 @@ static struct resource rk29_fb_resource[] = { [2] = { .name = "win1 buf", .start = MEM_FB_BASE, - .end = MEM_FB_BASE + MEM_FB_SIZE, + .end = MEM_FB_BASE + MEM_FB_SIZE - 1, .flags = IORESOURCE_MEM, }, + #ifdef CONFIG_FB_WORK_IPP + [3] = { + .name = "win1 ipp buf", + .start = MEM_FBIPP_BASE, + .end = MEM_FBIPP_BASE + MEM_FBIPP_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + #endif }; /*platform_device*/ @@ -1754,7 +1767,7 @@ static int rk29_sensor_io_init(void) gpio_set_value(camera_powerdown, ((camera_ioflag&RK29_CAM_POWERDNACTIVE_BITPOS)>>RK29_CAM_POWERDNACTIVE_BITPOS)); gpio_direction_output(camera_powerdown, ((camera_ioflag&RK29_CAM_POWERDNACTIVE_BITPOS)>>RK29_CAM_POWERDNACTIVE_BITPOS)); - printk("\n%s....powerdown pin(%d) init success(0x%x) \n",__FUNCTION__,camera_powerdown,((camera_ioflag&RK29_CAM_POWERDNACTIVE_BITPOS)>>RK29_CAM_POWERDNACTIVE_BITPOS)); + //printk("\n%s....powerdown pin(%d) init success(0x%x) \n",__FUNCTION__,camera_powerdown,((camera_ioflag&RK29_CAM_POWERDNACTIVE_BITPOS)>>RK29_CAM_POWERDNACTIVE_BITPOS)); } -- 2.34.1