From 7e8549bcee00d92040904361cb1840c7a5eda615 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sat, 14 Feb 2009 16:29:38 +0100 Subject: imxfb: Fix margin settings The var->hsync_len, var->right_margin and var->left_margin fields should contain the real values, not the hardware dependent values. Signed-off-by: Sascha Hauer --- drivers/video/imxfb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 9dd27576db71..bd1cb75cd14b 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c @@ -495,9 +495,9 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf info->fix.id, var->lower_margin); #endif - writel(HCR_H_WIDTH(var->hsync_len) | - HCR_H_WAIT_1(var->right_margin) | - HCR_H_WAIT_2(var->left_margin), + writel(HCR_H_WIDTH(var->hsync_len - 1) | + HCR_H_WAIT_1(var->right_margin - 1) | + HCR_H_WAIT_2(var->left_margin - 3), fbi->regs + LCDC_HCR); writel(VCR_V_WIDTH(var->vsync_len) | -- cgit v1.2.3-58-ga151