aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console/fbcon_ud.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/console/fbcon_ud.c')
-rw-r--r--drivers/video/console/fbcon_ud.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c
index c4d7c89212b4..9dd059e8b645 100644
--- a/drivers/video/console/fbcon_ud.c
+++ b/drivers/video/console/fbcon_ud.c
@@ -420,13 +420,15 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info,
420int ud_update_start(struct fb_info *info) 420int ud_update_start(struct fb_info *info)
421{ 421{
422 struct fbcon_ops *ops = info->fbcon_par; 422 struct fbcon_ops *ops = info->fbcon_par;
423 u32 xoffset, yoffset; 423 int xoffset, yoffset;
424 u32 vyres = GETVYRES(ops->p->scrollmode, info); 424 u32 vyres = GETVYRES(ops->p->scrollmode, info);
425 u32 vxres = GETVXRES(ops->p->scrollmode, info); 425 u32 vxres = GETVXRES(ops->p->scrollmode, info);
426 int err; 426 int err;
427 427
428 xoffset = (vxres - info->var.xres) - ops->var.xoffset; 428 xoffset = vxres - info->var.xres - ops->var.xoffset;
429 yoffset = (vyres - info->var.yres) - ops->var.yoffset; 429 yoffset = vyres - info->var.yres - ops->var.yoffset;
430 if (yoffset < 0)
431 yoffset += vyres;
430 ops->var.xoffset = xoffset; 432 ops->var.xoffset = xoffset;
431 ops->var.yoffset = yoffset; 433 ops->var.yoffset = yoffset;
432 err = fb_pan_display(info, &ops->var); 434 err = fb_pan_display(info, &ops->var);