From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Add inverted clock polarity support for Atmel LCD driver
Date: Sun, 19 Jul 2009 01:34:44 +0200 [thread overview]
Message-ID: <4A625C14.8020306@denx.de> (raw)
In-Reply-To: <20090718205816.GC16951@game.jcrosoft.org>
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
next prev parent reply other threads:[~2009-07-18 23:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 15:56 [U-Boot] [PATCH] Add inverted clock polarity support for Atmel LCD driver Dimitar Dimitrov
2009-07-15 15:58 ` [U-Boot] [PATCH 02/03 v3] Add support for Olimex SAM9-L9261 SBC Dimitar Dimitrov
2009-07-18 21:09 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-15 16:00 ` [U-Boot] [PATCH 03/03 v3] Add support for Olimex SAM9-L9260 SBC Dimitar Dimitrov
2009-07-18 21:13 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-18 19:18 ` [U-Boot] [PATCH] Add inverted clock polarity support for Atmel LCD driver Anatolij Gustschin
2009-07-25 20:28 ` Anatolij Gustschin
2009-07-18 20:58 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-18 23:34 ` Anatolij Gustschin [this message]
2009-07-19 9:34 ` Jean-Christophe PLAGNIOL-VILLARD
2009-11-22 21:01 ` Wolfgang Denk
2009-11-24 19:47 ` Dimitar Dimitrov
2009-12-05 0:10 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A625C14.8020306@denx.de \
--to=agust@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox