星期一, 1月 18, 2010

Android Frame Buffer Driver for AT91SAM9261

1. Android frame buffer need support double-buffering. The default AT91SAM9261 Linux config use internal SRAM as frame buffer. However, the internal SRAM capacity is only 160KB, which is insufficient to support 320x240x16-bit double-buffering. You need to disable the option by:
make ARCH=arm menuconfig
Device Driver --->
Graphic Support --->
Support for frame buffer devices --->
AT91/AT32 LCD Controller support
[ ] Frame Buffer in internal SRAM

2.
Modify the Frame buffer driver (drivers/video/atmel_lcdfb.c), here is the modified atmel_lcdfb.c
2.1 Allocate double buffer:
ret = fb_find_mode(&info->var, info, NULL, info->monspecs.modedb,
info->monspecs.modedb_len, info->monspecs.modedb,
sinfo->default_bpp);
info->var.yres_virtual = info->var.yres*2;


2.2 Modify atmel_lcdfb_set_par

please refer to the reference [3]

2.3 Transform RGB565 to BGR555 (A stupid method)
* Allocate SRAM Frame Buffer for LCD Controller
* Cover FrameBuffer(Android View) to SRAM FrameBuffer(LCDC View)

Reference
[1]
Android Platform Development Kit
[2] Linux Frame Buffer Driver
[3] Patch Framebuffer Driver of PrimeCell Color LCD Controller with Double-Buffering to Support Android’s Page-Flipping

沒有留言: