diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2011-10-05 09:59:57 +0200 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-11-11 16:50:45 +0000 |
commit | 5d910426a6e80194a50e33351c91abcad266c809 (patch) | |
tree | 68931da14bd5b3161ff749fa96b1ad54b9372b2d /drivers/video/atmel_lcdfb.c | |
parent | 5a6b5e02d673486c96003d4a6e3e2510f4c59f92 (diff) | |
download | blackbird-op-linux-5d910426a6e80194a50e33351c91abcad266c809.tar.gz blackbird-op-linux-5d910426a6e80194a50e33351c91abcad266c809.zip |
atmel_lcdfb: Adjust HFP calculation so it matches the manual.
In the AT91SAM9263 Manual the HFP part in LCDTIM2 is described as follows:
* HFP: Horizontal Front Porch
Number of idle LCDDOTCK cycles at the end of the line.
Idle period is (HFP+2) LCDDOTCK cycles.
It is only a minor issue. I also changed all boards using atmel_lcdfb
I found to respect the new calculation.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 244d55b7c0ae..7e66263b18c1 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -396,7 +396,7 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var, var->lower_margin = min_t(u32, var->lower_margin, ATMEL_LCDC_VFP); var->right_margin = min_t(u32, var->right_margin, - (ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 1); + (ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 2); var->hsync_len = min_t(u32, var->hsync_len, (ATMEL_LCDC_HPW >> ATMEL_LCDC_HPW_OFFSET) + 1); var->left_margin = min_t(u32, var->left_margin, @@ -581,7 +581,7 @@ static int atmel_lcdfb_set_par(struct fb_info *info) lcdc_writel(sinfo, ATMEL_LCDC_TIM1, value); /* Horizontal timing */ - value = (info->var.right_margin - 1) << ATMEL_LCDC_HFP_OFFSET; + value = (info->var.right_margin - 2) << ATMEL_LCDC_HFP_OFFSET; value |= (info->var.hsync_len - 1) << ATMEL_LCDC_HPW_OFFSET; value |= (info->var.left_margin - 1); dev_dbg(info->device, " * LCDTIM2 = %08lx\n", value); |