Jean-Christophe PLAGNIOL-VILLARD wrote: > On 18:56 Wed 15 Jul , Dimitar Dimitrov wrote: ... >> --- a/drivers/video/atmel_lcdfb.c >> +++ b/drivers/video/atmel_lcdfb.c >> @@ -112,6 +112,9 @@ void lcd_ctrl_init(void *lcdbase) >> >> value |= panel_info.vl_sync; >> value |= (panel_info.vl_bpix << 5); >> +#if defined(CONFIG_LCD_INVERTED_CLOCK) >> + value |= ATMEL_LCDC_INVCLK_INVERTED; >> +#endif > NACK > do this throught the struct via vl_sync as in linux
actually the "vl_sync" is supposed to contain HSYNC and VSYNC polarity flags and not the dot clock polarity. The Linux driver in mainline uses var.sync for this purpose too, and doesn't set inverted dot clock polarity at all. This definition in struct vidinfo for Atmel LCD /* LCD configuration register */ u_long vl_sync; /* Horizontal / vertical sync */ u_long vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */ u_long vl_tft; /* 0 = passive, 1 = TFT */ is confusing. If these fields are supposed to contain flags for LCD configuration register LCDCON2 then we should define only one "u_long lcdcon2" field containing all the flags/fields for sync polarity, bpp, clock polarity, scan mode, display type, interface width, LCDD, LCDDEN polarities, LCDDOTCLK mode and memory ordering format. We are wasting tree u_longs here and are not even able to use half of the possible settings for LCDCON2 register. I would rather fix the struct vidinfo for Atmel LCD so that people could set needed flags in the board code, e.g.: vidinfo_t panel_info = { ... lcdcon2: ATMEL_LCDC_INVLINE_INVERTED | ATMEL_LCDC_INVFRAME_INVERTED | ATMEL_LCDC_INVCLK_INVERTED; ... } I don't have the Atmel hardware to test/fix this change however. Best regards, Anatolij _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot