diff mbox

[U-Boot,RFC] possible typo in atmel_lcdfb.c

Message ID 1271344585-23124-1-git-send-email-alexander.stein@systec-electronic.com
State RFC
Delegated to: Reinhard Meyer
Headers show

Commit Message

Alexander Stein April 15, 2010, 3:16 p.m. UTC
This may be a typo inside the driver, but HFP is subtracted by 2 instead of 1
like the other variables in the register.
This is stated in AT91SAM9263 Summary 6249H–ATARM–27-Jul-09 p. 940
HFP: Horizontal Front Porch in LCDTIM2

So the driver should also subtract 2 to achieve the correct and exptected
behavior. Of cource, in this case all sources which use already this variable must be
adjusted to reflect this.

Kind regards,
Alexander
---
 drivers/video/atmel_lcdfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index c02ffd8..b2b7b8c 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -121,7 +121,7 @@  void lcd_ctrl_init(void *lcdbase)
 	lcdc_writel(panel_info.mmio, ATMEL_LCDC_TIM1, value);
 
 	/* Horizontal timing */
-	value = (panel_info.vl_right_margin - 1) << ATMEL_LCDC_HFP_OFFSET;
+	value = (panel_info.vl_right_margin - 2) << ATMEL_LCDC_HFP_OFFSET;
 	value |= (panel_info.vl_hsync_len - 1) << ATMEL_LCDC_HPW_OFFSET;
 	value |= (panel_info.vl_left_margin - 1);
 	lcdc_writel(panel_info.mmio, ATMEL_LCDC_TIM2, value);