imxfb: Fix margin settings

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Saturday, March 28, 2009 - 3:05 pm

Gitweb:     http://git.kernel.org/linus/7e8549bcee00d92040904361cb1840c7a5eda615
Commit:     7e8549bcee00d92040904361cb1840c7a5eda615
Parent:     1d0f98709347c4babac08dd933466674e089f188
Author:     Sascha Hauer <s.hauer@pengutronix.de>
AuthorDate: Sat Feb 14 16:29:38 2009 +0100
Committer:  Sascha Hauer <s.hauer@pengutronix.de>
CommitDate: Fri Mar 13 10:34:24 2009 +0100

    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 <s.hauer@pengutronix.de>
---
 drivers/video/imxfb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 9dd2757..bd1cb75 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) |
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
imxfb: Fix margin settings, Linux Kernel Mailing ..., (Sat Mar 28, 3:05 pm)