From: Laurent Pinchart Date: Wed, 25 May 2011 09:34:52 +0000 (+0200) Subject: s3c-fb: use display information in info not in var for panning X-Git-Tag: v3.3-rc3~7^2~134^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8e7a74bf1f1c3d8235e1d939d3e1e96da94ed82;p=profile%2Fivi%2Fkernel-x86-ivi.git s3c-fb: 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 Acked-by: Jingoo Han --- diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 4aecf21..fd9f20d 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -883,7 +883,7 @@ static int s3c_fb_pan_display(struct fb_var_screeninfo *var, } } /* Offset in bytes to the end of the displayed area */ - end_boff = start_boff + var->yres * info->fix.line_length; + end_boff = start_boff + info->var.yres * info->fix.line_length; /* Temporarily turn off per-vsync update from shadow registers until * both start and end addresses are updated to prevent corruption */