diff options
Diffstat (limited to 'drivers/video/savage')
-rw-r--r-- | drivers/video/savage/savagefb_driver.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 4de541ca9c52..beb495044b24 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
@@ -1477,15 +1477,9 @@ static void savagefb_set_par_int(struct savagefb_par *par, struct savage_reg *r | |||
1477 | vgaHWProtect(par, 0); | 1477 | vgaHWProtect(par, 0); |
1478 | } | 1478 | } |
1479 | 1479 | ||
1480 | static void savagefb_update_start(struct savagefb_par *par, | 1480 | static void savagefb_update_start(struct savagefb_par *par, int base) |
1481 | struct fb_var_screeninfo *var) | ||
1482 | { | 1481 | { |
1483 | int base; | 1482 | /* program the start address registers */ |
1484 | |||
1485 | base = ((var->yoffset * var->xres_virtual + (var->xoffset & ~1)) | ||
1486 | * ((var->bits_per_pixel+7) / 8)) >> 2; | ||
1487 | |||
1488 | /* now program the start address registers */ | ||
1489 | vga_out16(0x3d4, (base & 0x00ff00) | 0x0c, par); | 1483 | vga_out16(0x3d4, (base & 0x00ff00) | 0x0c, par); |
1490 | vga_out16(0x3d4, ((base & 0x00ff) << 8) | 0x0d, par); | 1484 | vga_out16(0x3d4, ((base & 0x00ff) << 8) | 0x0d, par); |
1491 | vga_out8(0x3d4, 0x69, par); | 1485 | vga_out8(0x3d4, 0x69, par); |
@@ -1550,8 +1544,12 @@ static int savagefb_pan_display(struct fb_var_screeninfo *var, | |||
1550 | struct fb_info *info) | 1544 | struct fb_info *info) |
1551 | { | 1545 | { |
1552 | struct savagefb_par *par = info->par; | 1546 | struct savagefb_par *par = info->par; |
1547 | int base; | ||
1548 | |||
1549 | base = (var->yoffset * info->fix.line_length | ||
1550 | + (var->xoffset & ~1) * ((info->var.bits_per_pixel+7) / 8)) >> 2; | ||
1553 | 1551 | ||
1554 | savagefb_update_start(par, var); | 1552 | savagefb_update_start(par, base); |
1555 | return 0; | 1553 | return 0; |
1556 | } | 1554 | } |
1557 | 1555 | ||