Problem: I have to configure various LCD displays to be used by Android Platform. Almost in all cases there are no electrical specifications freely available for LCD displays on interest. But through experience and reverse engineering the parameters can be guessed reasonably well. I am trying to use Loadable Kernel Modules to fine tune the display parameters (any other suggestions are welcome too). Please find the relevant information below.
HW: Atmel SAMA5D31-EK (ARM Cortex-A5 processor)
SW: Android Linux (Target), Ubuntu (Host System), Sourcery CodeBench (Cross Compiler) Code Snippets from board-dt.c file
static struct fb_videomode at91_tft_vga_modes[] = { ..... .xres =435; .yres=235; .... } static struct fb_monspecs at91fb_default_monspecs = { ......... .modedb = at91_tft_vga_modes, ...... } static struct atmel_lcd_fb_info __initdata ek_lcdc_data = { .......... .default_monspecs = & at91fb_default_monspecs; ......... }
static struct fb_videomode at91_tft_vga_modes[] = {
..... .xres =435;
.yres=235;
....
}
static struct fb_monspecs at91fb_default_monspecs = {
.........
.modedb = at91_tft_vga_modes,
......
static struct atmel_lcd_fb_info __initdata ek_lcdc_data = {
..........
.default_monspecs = & at91fb_default_monspecs;
I added this code so the Loadable Kernel Module has access to lcdc_data structure
extern void set_fb_video(struct fb_videomode *mg_set_tft_vga_modes)
{ ek_lcdc_data.default_monspecs->modedb->xres = mg_set_tft_vga_modes->xres; } EXPORT_SYMBOL(set_fb_video);
{
ek_lcdc_data.default_monspecs->modedb->xres = mg_set_tft_vga_modes->xres;
EXPORT_SYMBOL(set_fb_video);
When I execute the loadable kernel module I don’t notice any change in the display. I suspect although I am changing the variable (memory) but registers are not been affected.
Question: What am I missing? I have read about making calls to platform_driver_register() and platform_driver_unregister().
Thank you for your help in advance.
I see you've cross posted this at Stack Overflow which is probably a more appropriate forum for this question. Was fbset able to accomplish what you needed in the end? XDA Developer Android Forums may also be of use. I'm not sure if many people at ARM have mucked about with external LCDs on Android but perhaps matteofranchin has run across something useful?
Echoing your findings at Stack Overflow for anyone else that arrives at this page:
How to change device (LCD) parameters dynamically on Android Linux ARM device - Stack Overflow
ti816evm HDMI resolution change - Android forum - Android - TI E2E Community