diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2007-10-16 04:28:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:17 -0400 |
commit | 3c9ffd0501157b38599b5bb7711366913f633f88 (patch) | |
tree | a57108df27c409b4cd99786408c5b5f2ee0de54e /drivers | |
parent | 5f20f69beb4983454b2d5ced4cabf90825bb263e (diff) |
s3c2410fb: use vertical margins values
This patch makes use of vertical margins fields in
the s3c2410fb_display structure.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/s3c2410fb.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 27528caa5a48..a30d538bc8c1 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -325,14 +325,10 @@ static void s3c2410fb_calculate_stn_lcd_regs(const struct fb_info *info, | |||
325 | var->bits_per_pixel); | 325 | var->bits_per_pixel); |
326 | } | 326 | } |
327 | /* update X/Y info */ | 327 | /* update X/Y info */ |
328 | dprintk("setting vert: up=%d, low=%d, sync=%d\n", | ||
329 | var->upper_margin, var->lower_margin, var->vsync_len); | ||
330 | |||
331 | dprintk("setting horz: lft=%d, rt=%d, sync=%d\n", | 328 | dprintk("setting horz: lft=%d, rt=%d, sync=%d\n", |
332 | var->left_margin, var->right_margin, var->hsync_len); | 329 | var->left_margin, var->right_margin, var->hsync_len); |
333 | 330 | ||
334 | regs->lcdcon2 &= ~S3C2410_LCDCON2_LINEVAL(0x3ff); | 331 | regs->lcdcon2 = S3C2410_LCDCON2_LINEVAL(var->yres - 1); |
335 | regs->lcdcon2 |= S3C2410_LCDCON2_LINEVAL(var->yres - 1); | ||
336 | 332 | ||
337 | if (wdly > 3) | 333 | if (wdly > 3) |
338 | wdly = 3; | 334 | wdly = 3; |
@@ -387,8 +383,10 @@ static void s3c2410fb_calculate_tft_lcd_regs(const struct fb_info *info, | |||
387 | dprintk("setting horz: lft=%d, rt=%d, sync=%d\n", | 383 | dprintk("setting horz: lft=%d, rt=%d, sync=%d\n", |
388 | var->left_margin, var->right_margin, var->hsync_len); | 384 | var->left_margin, var->right_margin, var->hsync_len); |
389 | 385 | ||
390 | regs->lcdcon2 &= ~S3C2410_LCDCON2_LINEVAL(0x3ff); | 386 | regs->lcdcon2 &= S3C2410_LCDCON2_VSPW(0x3f); |
391 | regs->lcdcon2 |= S3C2410_LCDCON2_LINEVAL(var->yres - 1); | 387 | regs->lcdcon2 |= S3C2410_LCDCON2_LINEVAL(var->yres - 1); |
388 | regs->lcdcon2 |= S3C2410_LCDCON2_VBPD(var->upper_margin - 1); | ||
389 | regs->lcdcon2 |= S3C2410_LCDCON2_VFPD(var->lower_margin - 1); | ||
392 | 390 | ||
393 | regs->lcdcon3 = S3C2410_LCDCON3_HBPD(var->right_margin - 1) | | 391 | regs->lcdcon3 = S3C2410_LCDCON3_HBPD(var->right_margin - 1) | |
394 | S3C2410_LCDCON3_HFPD(var->left_margin - 1) | | 392 | S3C2410_LCDCON3_HFPD(var->left_margin - 1) | |
@@ -416,8 +414,6 @@ static void s3c2410fb_activate_var(struct fb_info *info) | |||
416 | 414 | ||
417 | if (!mach_info->fixed_syncs) { | 415 | if (!mach_info->fixed_syncs) { |
418 | fbi->regs.lcdcon2 = | 416 | fbi->regs.lcdcon2 = |
419 | S3C2410_LCDCON2_VBPD(var->upper_margin - 1) | | ||
420 | S3C2410_LCDCON2_VFPD(var->lower_margin - 1) | | ||
421 | S3C2410_LCDCON2_VSPW(var->vsync_len - 1); | 417 | S3C2410_LCDCON2_VSPW(var->vsync_len - 1); |
422 | 418 | ||
423 | fbi->regs.lcdcon4 &= ~S3C2410_LCDCON4_HSPW(0xff); | 419 | fbi->regs.lcdcon4 &= ~S3C2410_LCDCON4_HSPW(0xff); |
@@ -892,13 +888,10 @@ static int __init s3c2410fb_probe(struct platform_device *pdev) | |||
892 | fbinfo->var.left_margin = display->left_margin; | 888 | fbinfo->var.left_margin = display->left_margin; |
893 | fbinfo->var.right_margin = display->right_margin; | 889 | fbinfo->var.right_margin = display->right_margin; |
894 | 890 | ||
895 | fbinfo->var.upper_margin = | 891 | fbinfo->var.upper_margin = display->upper_margin; |
896 | S3C2410_LCDCON2_GET_VBPD(display->lcdcon2) + 1; | 892 | fbinfo->var.lower_margin = display->lower_margin; |
897 | fbinfo->var.lower_margin = | ||
898 | S3C2410_LCDCON2_GET_VFPD(display->lcdcon2) + 1; | ||
899 | fbinfo->var.vsync_len = | 893 | fbinfo->var.vsync_len = |
900 | S3C2410_LCDCON2_GET_VSPW(display->lcdcon2) + 1; | 894 | S3C2410_LCDCON2_GET_VSPW(display->lcdcon2) + 1; |
901 | |||
902 | fbinfo->var.hsync_len = | 895 | fbinfo->var.hsync_len = |
903 | S3C2410_LCDCON4_GET_HSPW(display->lcdcon4) + 1; | 896 | S3C2410_LCDCON4_GET_HSPW(display->lcdcon4) + 1; |
904 | 897 | ||