Re: [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic

2008-10-25 Thread Anatolij Gustschin
Haavard Skinnemoen wrote:
 If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED,
 otherwise we don't. WTF?
 
 Signed-off-by: Haavard Skinnemoen [EMAIL PROTECTED]

Applied to u-boot-video/master repo. Thanks.

Best regards,
Anatolij

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic

2008-09-02 Thread Detlev Zundel
Hi Haavard,

 If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED,
 otherwise we don't. WTF?

 Signed-off-by: Haavard Skinnemoen [EMAIL PROTECTED]
 ---
  drivers/video/atmel_lcdfb.c |5 +
  1 files changed, 1 insertions(+), 4 deletions(-)

 diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
 index 7f0dceb..3a51cc7 100644
 --- a/drivers/video/atmel_lcdfb.c
 +++ b/drivers/video/atmel_lcdfb.c
 @@ -107,10 +107,7 @@ void lcd_ctrl_init(void *lcdbase)
   if (panel_info.vl_tft)
   value |= ATMEL_LCDC_DISTYPE_TFT;
  
 - if (!(panel_info.vl_sync  ATMEL_LCDC_INVLINE_INVERTED))
 - value |= ATMEL_LCDC_INVLINE_INVERTED;
 - if (!(panel_info.vl_sync  ATMEL_LCDC_INVFRAME_INVERTED))
 - value |= ATMEL_LCDC_INVFRAME_INVERTED;
 + value |= panel_info.vl_sync;

What about

value |= panel_info.vl_sync  (ATMEL_LCDC_INVLINE_INVERTED | 
ATMEL_LCDC_INVFRAME_INVERTED);

[break lines where convenient] Apart from this being the formal
equivalent to the original code, this would make it more clear what can
go in, no?

Cheers
  Detlev

-- 
[From 2.4 to 2.6 to 2.7 discussing release numbering of the Linux kernel]
Let the bike-shed-painting begin.
 -- Linus Torvalds 
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic

2008-09-02 Thread Haavard Skinnemoen
Detlev Zundel [EMAIL PROTECTED] wrote:
 What about
 
   value |= panel_info.vl_sync  (ATMEL_LCDC_INVLINE_INVERTED | 
 ATMEL_LCDC_INVFRAME_INVERTED);
 
 [break lines where convenient] Apart from this being the formal
 equivalent to the original code, this would make it more clear what can
 go in, no?

Well, there's also INVVD, INVCLK and INVDVAL which the original code
doesn't care about at all. I'm not sure if all of them are suitable for
the vl_sync field, but perhaps the field should be renamed.

In Linux, there's just a default_lcdcon2 field which the board code can
use to set any flags it wants. I'm not sure if the driver should really
bother too much about those flags anyway -- almost all of them depend
on the type of display, how it's hooked up, etc.

Haavard
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic

2008-09-01 Thread Haavard Skinnemoen
If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED,
otherwise we don't. WTF?

Signed-off-by: Haavard Skinnemoen [EMAIL PROTECTED]
---
 drivers/video/atmel_lcdfb.c |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 7f0dceb..3a51cc7 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -107,10 +107,7 @@ void lcd_ctrl_init(void *lcdbase)
if (panel_info.vl_tft)
value |= ATMEL_LCDC_DISTYPE_TFT;
 
-   if (!(panel_info.vl_sync  ATMEL_LCDC_INVLINE_INVERTED))
-   value |= ATMEL_LCDC_INVLINE_INVERTED;
-   if (!(panel_info.vl_sync  ATMEL_LCDC_INVFRAME_INVERTED))
-   value |= ATMEL_LCDC_INVFRAME_INVERTED;
+   value |= panel_info.vl_sync;
value |= (panel_info.vl_bpix  5);
lcdc_writel(panel_info.mmio, ATMEL_LCDC_LCDCON2, value);
 
-- 
1.5.6.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot