Hi all, my first post here !!
I was working on the LCD initialisation in U-Boot on the OMAP L-138 evaluation board, to get a splash screen as fast as possible after switching on the board, it works great, but when Linux does the LCD initialisations in the file da8xx-fb.c, sometimes it works, and sometimes it fails (DMA stop working, so the screen is freezed and can't be modified anymore).
After a week of bug-hunting, I found that, in the Technical Reference, page 1037:
"If you clear RASTER_EN bit while the LCD controller is enabled, you can complete transmission of the current frame before being disabled. Completion of the
current frame is signaled by the LCD controller to the DMA by setting the frame done (Done) bit within the LCD controller status register"
In the Linux driver, the function lcd_raster_disable() disable the RASTER_EN bit, but it doesn't wait until the bit "Done" is set if the DMA was running, and start the registers configurations right away. It will work if the DMA was stopped, but not if it was refreshing the screen.
So here is my modification to this function:
file: linux/drivers/video/da8xx-fb.c
static inline void lcd_disable_raster(void)
{
u32 reg;
reg = lcdc_read(LCD_RASTER_CTRL_REG);
if (reg & LCD_RASTER_ENABLE)
{
lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
while(!(lcdc_read(LCD_STAT_REG) & 0x1))
;
}
}
And now, it works great !
I hope this will help someone !
Best regards,
Sylvain Villet
Audio Technology Switzerland