Skip to content

Commit

Permalink
imsttfb: use display information in info not in var for panning
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Laurent Pinchart authored and Paul Mundt committed Jun 15, 2011
1 parent eca7370 commit c12665f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/imsttfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ set_offset (struct fb_var_screeninfo *var, struct fb_info *info)
{
struct imstt_par *par = info->par;
__u32 off = var->yoffset * (info->fix.line_length >> 3)
+ ((var->xoffset * (var->bits_per_pixel >> 3)) >> 3);
+ ((var->xoffset * (info->var.bits_per_pixel >> 3)) >> 3);
write_reg_le32(par->dc_regs, SSR, off);
}

Expand Down

0 comments on commit c12665f

Please sign in to comment.