Skip to contentSkip to conversation

Atmel LCD driver GUARDTIME fix

PATCH New Mark Jackson 4 participants 11 messages Jun 22, 2009 – Jun 23, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

This patch correctly sets up the guard time parameter in the Atmel LCDC driver.

This works on the AVR32 platform, but needs to be tested under the AT91 platform which shares the same code base.

---
  drivers/video/atmel_lcdfb.c |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
drivers/video/atmel_lcdfb.c +3 -2
index 3a51cc7..14f578e 100644
@@ -42,6 +42,7 @@ short console_row;
  /* configurable parameters */
  #define ATMEL_LCDC_CVAL_DEFAULT		0xc8
  #define ATMEL_LCDC_DMA_BURST_LEN	8
+#define ATMEL_LCDC_GUARD_TIME		2
 
  #if defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91CAP9)
  #define ATMEL_LCDC_FIFO_SIZE		2048
@@ -69,7 +70,7 @@ void lcd_ctrl_init(void *lcdbase)
 
  	/* Turn off the LCD controller and the DMA controller */
  	lcdc_writel(panel_info.mmio, ATMEL_LCDC_PWRCON,
-		    1 << ATMEL_LCDC_GUARDT_OFFSET);
+		    ATMEL_LCDC_GUARD_TIME << ATMEL_LCDC_GUARDT_OFFSET);
 
  	/* Wait for the LCDC core to become idle */
  	while (lcdc_readl(panel_info.mmio, ATMEL_LCDC_PWRCON) & ATMEL_LCDC_BUSY)
@@ -150,7 +151,7 @@ void lcd_ctrl_init(void *lcdbase)
 
  	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMACON, ATMEL_LCDC_DMAEN);
  	lcdc_writel(panel_info.mmio, ATMEL_LCDC_PWRCON,
-		    (1 << ATMEL_LCDC_GUARDT_OFFSET) | ATMEL_LCDC_PWR);
+		    (ATMEL_LCDC_GUARD_TIME << ATMEL_LCDC_GUARDT_OFFSET) | ATMEL_LCDC_PWR);
  }
 
  ulong calc_fbsize(void)
#1 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

Quoted 16 lines · Mark Jackson

This patch correctly sets up the guard time parameter in the Atmel LCDC driver.

This works on the AVR32 platform, but needs to be tested under the AT91 platform which shares the same code base.

---
  drivers/video/atmel_lcdfb.c |    5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)
drivers/video/atmel_lcdfb.c +0 -0
index 3a51cc7..14f578e 100644

drivers/video/atmel_lcdfb.c short console_row; · line 45

Quoted 4 lines
drivers/video/atmel_lcdfb.c +1 -0
@@ -42,6 +42,7 @@ short console_row;
  /* configurable parameters */
  #define ATMEL_LCDC_CVAL_DEFAULT		0xc8
  #define ATMEL_LCDC_DMA_BURST_LEN	8
+#define ATMEL_LCDC_GUARD_TIME		2

This should be ...

drivers/video/atmel_lcdfb.c short console_row; · line 45

Quoted 3 lines
drivers/video/atmel_lcdfb.c +1 -0
 #define ATMEL_LCDC_CVAL_DEFAULT		0xc8
 #define ATMEL_LCDC_DMA_BURST_LEN	8
+#define ATMEL_LCDC_GUARD_TIME		2

... without the extra space at the start.

Quoted 13 lines
drivers/video/atmel_lcdfb.c +1 -1
  #if defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91CAP9)
  #define ATMEL_LCDC_FIFO_SIZE		2048
@@ -69,7 +70,7 @@ void lcd_ctrl_init(void *lcdbase)
 
  	/* Turn off the LCD controller and the DMA controller */
  	lcdc_writel(panel_info.mmio, ATMEL_LCDC_PWRCON,
-		    1 << ATMEL_LCDC_GUARDT_OFFSET);
+		    ATMEL_LCDC_GUARD_TIME << ATMEL_LCDC_GUARDT_OFFSET);
 
  	/* Wait for the LCDC core to become idle */
  	while (lcdc_readl(panel_info.mmio, ATMEL_LCDC_PWRCON) & ATMEL_LCDC_BUSY)

drivers/video/atmel_lcdfb.c void lcd_ctrl_init(void *lcdbase) · line 157

Quoted 8 lines
drivers/video/atmel_lcdfb.c +1 -1
@@ -150,7 +151,7 @@ void lcd_ctrl_init(void *lcdbase)
 
  	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMACON, ATMEL_LCDC_DMAEN);
  	lcdc_writel(panel_info.mmio, ATMEL_LCDC_PWRCON,
-		    (1 << ATMEL_LCDC_GUARDT_OFFSET) | ATMEL_LCDC_PWR);
+		    (ATMEL_LCDC_GUARD_TIME << ATMEL_LCDC_GUARDT_OFFSET) | ATMEL_LCDC_PWR);
  }
 
  ulong calc_fbsize(void)

My patch has been mangled ... there's an extra space at the start of each "unchanged" patch line.

Any ideas ?

#3 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

Quoted 11 lines · Haavard Skinnemoen
Quoted 1 line · Mark Jackson

User-Agent: Thunderbird 2.0.0.21 (X11/20090409)

(...)

Quoted 2 lines

My patch has been mangled ... there's an extra space at the start of each "unchanged" patch line.

Read about how to make Thunderbird behave here:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/email-clients.txt

But I've sent in patches before without any problems !!

And as per my other mail on the topic, I posted to both the u-boot at denx and u-boot at avr32linux MLs, and only *one* of the incoming mails (u-boot at denx) was mangled.

Any ideas ?

Regards
Mark

#4 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

Quoted 11 lines · Mark Jackson
Quoted 10 lines · Haavard Skinnemoen
Quoted 1 line · Mark Jackson

User-Agent: Thunderbird 2.0.0.21 (X11/20090409)

(...)

Quoted 2 lines

My patch has been mangled ... there's an extra space at the start of each "unchanged" patch line.

Read about how to make Thunderbird behave here:

Quoted 7 lines
Quoted 1 line

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/email-clients.txt

But I've sent in patches before without any problems !!

And as per my other mail on the topic, I posted to both the u-boot at denx and u-boot at avr32linux MLs, and only *one* of the incoming mails (u-boot at denx) was mangled.

Any ideas ?

I'm not sure why the 2 mailing lists would behave differently, but using "git format-patch" and "git send-email" is one way to take the email client out of the picture. The git commands are the prefered method to send patches, especially if you're going to be sending more in the future.

Best,
Peter

#5 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

In reply to Mark Jackson
Quoted 6 lines · On Mon, 22 Jun 2009 16:31:20 +0100 Mark Jackson <[email protected]> wrote:
Quoted 5 lines · Haavard Skinnemoen
Quoted 1 line · Mark Jackson

User-Agent: Thunderbird 2.0.0.21 (X11/20090409)

(...)

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

My patch has been mangled ... there's an extra space at the start of each "unchanged" patch line.

Read about how to make Thunderbird behave here:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/email-clients.txt

But I've sent in patches before without any problems !!

Weird.

Quoted 3 lines

And as per my other mail on the topic, I posted to both the u-boot at denx and u-boot at avr32linux MLs, and only *one* of the incoming mails (u-boot at denx) was mangled.

Hmm...the one I received through avr32linux.org looks mangled too; it has extra spaces before some of the lines.

Quoted 1 line

Any ideas ?

My guess is that format=flowed is causing problems. From the patch:

Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I wish people who implement e-mail software weren't completely insane.

Haavard

#6 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

In reply to Mark Jackson
Quoted 5 lines · Mark Jackson

This patch correctly sets up the guard time parameter in the Atmel LCDC driver.

This works on the AVR32 platform, but needs to be tested under the AT91 platform which shares the same code base.

for at91 the GUARD_TIME is 1 and IIRC it's lcd specific

Best Regards,
J.

#7 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD

for at91 the GUARD_TIME is 1 and IIRC it's lcd specific

You just contradicted yourself.

The Guard time is the number of empty frames (with control signals enabled but no data) to wait before starting to send valid data to the display.

Setting it slightly too high shouldn't make any difference. However, setting it slightly too low may cause strange failures every now and then.

Haavard

#8 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

Quoted 4 lines · Haavard Skinnemoen
Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD

for at91 the GUARD_TIME is 1 and IIRC it's lcd specific

You just contradicted yourself.

at91 boards

Quoted 8 lines

The Guard time is the number of empty frames (with control signals enabled but no data) to wait before starting to send valid data to the display.

Setting it slightly too high shouldn't make any difference. However, setting it slightly too low may cause strange failures every now and then.

for at91 boards it's 1 and I've never seen any problem, same in the kernel

So I'll prefer to make it optionial and no hardcoded for all boards.

Best Regards,
J.

#9 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines · Haavard Skinnemoen
Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD

for at91 the GUARD_TIME is 1 and IIRC it's lcd specific

You just contradicted yourself.

at91 boards

Ok, I see.

Quoted 11 lines
Quoted 8 lines

The Guard time is the number of empty frames (with control signals enabled but no data) to wait before starting to send valid data to the display.

Setting it slightly too high shouldn't make any difference. However, setting it slightly too low may cause strange failures every now and then.

for at91 boards it's 1 and I've never seen any problem, same in the kernel

So I'll prefer to make it optionial and no hardcoded for all boards.

Good point. How about if we turn it into a configuration symbol and default to 1 if it's unset?

Haavard

#10 lore raw

PATCH 1/1 Atmel LCD driver GUARDTIME fix

Quoted 18 lines · Haavard Skinnemoen
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines · Haavard Skinnemoen
Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD

for at91 the GUARD_TIME is 1 and IIRC it's lcd specific

You just contradicted yourself.

at91 boards

Ok, I see.

Quoted 8 lines
Quoted 8 lines

The Guard time is the number of empty frames (with control signals enabled but no data) to wait before starting to send valid data to the display.

Setting it slightly too high shouldn't make any difference. However, setting it slightly too low may cause strange failures every now and then.

Quoted 6 lines
Quoted 3 lines

for at91 boards it's 1 and I've never seen any problem, same in the kernel

So I'll prefer to make it optionial and no hardcoded for all boards.

Good point. How about if we turn it into a configuration symbol and default to 1 if it's unset?

fine for me

Best Regards,
J.