diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-05-25 05:34:52 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-08-19 04:35:10 -0400 |
commit | 0aa76b0ce163f929b4e8f41331073814b0ef8612 (patch) | |
tree | d5a8d2bf270ea933cf834de6c24c472f472cc490 /drivers/video/sm501fb.c | |
parent | 8e42a962a279369ba3e6a25f321c7cd4d471e633 (diff) |
sm501fb: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/sm501fb.c')
-rw-r--r-- | drivers/video/sm501fb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 6294dca95500..a78254cf8e83 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -582,7 +582,7 @@ static int sm501fb_pan_crt(struct fb_var_screeninfo *var, | |||
582 | { | 582 | { |
583 | struct sm501fb_par *par = info->par; | 583 | struct sm501fb_par *par = info->par; |
584 | struct sm501fb_info *fbi = par->info; | 584 | struct sm501fb_info *fbi = par->info; |
585 | unsigned int bytes_pixel = var->bits_per_pixel / 8; | 585 | unsigned int bytes_pixel = info->var.bits_per_pixel / 8; |
586 | unsigned long reg; | 586 | unsigned long reg; |
587 | unsigned long xoffs; | 587 | unsigned long xoffs; |
588 | 588 | ||
@@ -614,10 +614,10 @@ static int sm501fb_pan_pnl(struct fb_var_screeninfo *var, | |||
614 | struct sm501fb_info *fbi = par->info; | 614 | struct sm501fb_info *fbi = par->info; |
615 | unsigned long reg; | 615 | unsigned long reg; |
616 | 616 | ||
617 | reg = var->xoffset | (var->xres_virtual << 16); | 617 | reg = var->xoffset | (info->var.xres_virtual << 16); |
618 | smc501_writel(reg, fbi->regs + SM501_DC_PANEL_FB_WIDTH); | 618 | smc501_writel(reg, fbi->regs + SM501_DC_PANEL_FB_WIDTH); |
619 | 619 | ||
620 | reg = var->yoffset | (var->yres_virtual << 16); | 620 | reg = var->yoffset | (info->var.yres_virtual << 16); |
621 | smc501_writel(reg, fbi->regs + SM501_DC_PANEL_FB_HEIGHT); | 621 | smc501_writel(reg, fbi->regs + SM501_DC_PANEL_FB_HEIGHT); |
622 | 622 | ||
623 | sm501fb_sync_regs(fbi); | 623 | sm501fb_sync_regs(fbi); |