-obj-y += timer.o io.o devices.o iomux.o clock.o rk29-pl330.o dma.o gpio.o ddr.o sram.o
+obj-y += timer.o io.o devices.o iomux.o clock.o rk29-pl330.o dma.o gpio.o ddr.o sram.o Memcpy_Dma.o
obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_CPU_FREQ) += cpufreq.o
obj-$(CONFIG_RK29_VPU) += vpu.o vpu_mem.o
.platform_data = &rk29_fb_info,
}
};
+
+struct platform_device rk29_device_Dma_cpy = {
+ .name = "dma_memcpy",
+ .id = 4,
+
+};
+
#endif
static struct android_pmem_platform_data android_pmem_pdata = {
#ifdef CONFIG_FB_RK29
&rk29_device_fb,
+ &rk29_device_Dma_cpy,
#endif
#ifdef CONFIG_BACKLIGHT_RK29_BL
&rk29_device_backlight,
extern struct rk29xx_spi_platform_data rk29xx_spi0_platdata;
extern struct rk29xx_spi_platform_data rk29xx_spi1_platdata;
extern struct platform_device rk29_device_fb;
+extern struct platform_device rk29_device_Dma_cpy;
extern struct platform_device rk29_device_nand;
extern struct platform_device rk29xx_device_nand;
extern struct rk29_sdmmc_platform_data default_sdmmc0_data;
LCDC_REG regbak;
int in_suspend;
-
+ int fb0_color_deepth;
/* variable used in mcu panel */
int mcu_needflush;
int mcu_isrcnt;
return -EINVAL;
}
+ if(inf->fb0_color_deepth)var->bits_per_pixel=inf->fb0_color_deepth;
switch(var->bits_per_pixel)
{
case 16: // rgb565
CHK_SUSPEND(inf);
+ if(inf->fb0_color_deepth)var->bits_per_pixel=inf->fb0_color_deepth;
if((inf->video_mode == 1)&&(screen->y_res < var->yres))ypos_virtual += (var->yres-screen->y_res);
switch(var->bits_per_pixel)
case 16: // rgb565
par->format = 1;
fix->line_length = 2 * xres_virtual;
- offset = (ypos_virtual*xres_virtual + xpos_virtual)*2;
+ offset = (ypos_virtual*xres_virtual + xpos_virtual)*(inf->fb0_color_deepth ? 4:2);
break;
case 32: // rgb888
default:
//fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
CHK_SUSPEND(inf);
-
+ if(inf->fb0_color_deepth)var->bits_per_pixel=inf->fb0_color_deepth;
+
switch(var1->bits_per_pixel)
{
case 16: // rgb565
var->xoffset = (var->xoffset) & (~0x1);
- offset = (var->yoffset*var1->xres_virtual + var->xoffset)*2;
- break;
+ offset = (var->yoffset*var1->xres_virtual + var->xoffset)*(inf->fb0_color_deepth ? 4:2);
+ break;
case 32: // rgb888
offset = (var->yoffset*var1->xres_virtual + var->xoffset)*4;
break;
inf->mcu_usetimer = 0;
}
break;
+ case FBIOPUT_16OR32:
+
+ inf->fb0_color_deepth = arg;
+
+ break;
default:
break;
}
inf->fb0->var.xres = screen->x_res;
inf->fb0->var.yres = screen->y_res;
inf->fb0->var.bits_per_pixel = 16;
+ inf->fb0_color_deepth = 0;
inf->fb0->var.xres_virtual = screen->x_res;
inf->fb0->var.yres_virtual = screen->y_res;
inf->fb0->var.width = screen->width;
#define FBIOGETCMAP 0x4604
#define FBIOPUTCMAP 0x4605
#define FBIOPAN_DISPLAY 0x4606
+#define FBIOPUT_16OR32 0x4607
#ifdef __KERNEL__
#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor_user)
#else