mb862xxfb: use display information in info not in var for panning
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 25 May 2011 09:34:52 +0000 (11:34 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 19 Aug 2011 08:32:41 +0000 (10:32 +0200)
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>
drivers/video/mb862xx/mb862xxfbdrv.c

index ee1de3e26dece9a80f152478ffa642cfef00beae..7a1f2773cf38366ac5090bbf1dc37f89496807be 100644 (file)
@@ -278,7 +278,7 @@ static int mb862xxfb_pan(struct fb_var_screeninfo *var,
        reg = pack(var->yoffset, var->xoffset);
        outreg(disp, GC_L0WY_L0WX, reg);
 
-       reg = pack(var->yres_virtual, var->xres_virtual);
+       reg = pack(info->var.yres_virtual, info->var.xres_virtual);
        outreg(disp, GC_L0WH_L0WW, reg);
        return 0;
 }