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

Alexander Stein alexander.stein at systec-electronic.com
Thu Apr 15 17:16:25 CEST 2010


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 --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);
-- 
1.6.4.4



More information about the U-Boot mailing list