summaryrefslogtreecommitdiff
path: root/drivers/video/mx3fb.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-06-15 15:48:40 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-06-15 15:48:40 +0900
commitfc90ec86294202b306b7b124f2f6d5035c94fa13 (patch)
treeda3da512c8082f2864c95de9684a0a75ac997dad /drivers/video/mx3fb.c
parentd521dd944e461371cb309c7c3568483cd2b6f5f2 (diff)
parente6c4d3d43d4d00a0ed945c77e6b89c74b38120d7 (diff)
Merge branch 'fbdev/panning-fixes'
Diffstat (limited to 'drivers/video/mx3fb.c')
-rw-r--r--drivers/video/mx3fb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 7e3a490e8d76..bd768588cf10 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -1062,15 +1062,15 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
y_bottom = var->yoffset;
if (!(var->vmode & FB_VMODE_YWRAP))
- y_bottom += var->yres;
+ y_bottom += fbi->var.yres;
if (y_bottom > fbi->var.yres_virtual)
return -EINVAL;
mutex_lock(&mx3_fbi->mutex);
- offset = (var->yoffset * var->xres_virtual + var->xoffset) *
- (var->bits_per_pixel / 8);
+ offset = var->yoffset * fbi->fix.line_length
+ + var->xoffset * (fbi->var.bits_per_pixel / 8);
base = fbi->fix.smem_start + offset;
dev_dbg(fbi->device, "Updating SDC BG buf %d address=0x%08lX\n",