From 6b3cbe4094e3eddc9f38b34118c10aeea845eaf2 Mon Sep 17 00:00:00 2001 From: Florian Tobias Schandinat Date: Wed, 11 Jan 2012 22:26:59 +0000 Subject: Revert "atmel_lcdfb: Adjust HFP calculation so it matches the manual." This reverts commit 5d910426a6e80194a50e33351c91abcad266c809. Nicolas Ferre wrote: "Unfortunately this is not true for all the SoC that embed the atmel_lcdfb... So I may need to rework this patch but it is certainly not applicable in the current form." Signed-off-by: Florian Tobias Schandinat --- drivers/video/atmel_lcdfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index ced4419e56e2..0d7b20d4285d 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -400,7 +400,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) + 2); + (ATMEL_LCDC_HFP >> ATMEL_LCDC_HFP_OFFSET) + 1); 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, @@ -585,7 +585,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 - 2) << ATMEL_LCDC_HFP_OFFSET; + value = (info->var.right_margin - 1) << 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); -- cgit v1.2.3