aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/via/hw.c2
-rw-r--r--drivers/video/via/viafbdev.c23
2 files changed, 15 insertions, 10 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index 1aa3bb2f1a4e..400373fda210 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -2206,8 +2206,6 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
2206 outb(VPIT.SR[i - 1], VIASR + 1); 2206 outb(VPIT.SR[i - 1], VIASR + 1);
2207 } 2207 }
2208 2208
2209 viafb_set_primary_address(0);
2210 viafb_set_secondary_address(viafb_SAMM_ON ? viafb_second_offset : 0);
2211 viafb_set_iga_path(); 2209 viafb_set_iga_path();
2212 2210
2213 /* Write CRTC */ 2211 /* Write CRTC */
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 4d955ca0a1d2..b417259868a8 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -50,6 +50,8 @@ static void apply_second_mode_setting(struct fb_var_screeninfo
50 *sec_var); 50 *sec_var);
51static void retrieve_device_setting(struct viafb_ioctl_setting 51static void retrieve_device_setting(struct viafb_ioctl_setting
52 *setting_info); 52 *setting_info);
53static int viafb_pan_display(struct fb_var_screeninfo *var,
54 struct fb_info *info);
53 55
54static struct fb_ops viafb_ops; 56static struct fb_ops viafb_ops;
55 57
@@ -182,6 +184,7 @@ static int viafb_set_par(struct fb_info *info)
182 info->flags |= FBINFO_HWACCEL_DISABLED; 184 info->flags |= FBINFO_HWACCEL_DISABLED;
183 viafb_setmode(vmode_entry, info->var.bits_per_pixel, 185 viafb_setmode(vmode_entry, info->var.bits_per_pixel,
184 vmode_entry1, viafb_bpp1); 186 vmode_entry1, viafb_bpp1);
187 viafb_pan_display(&info->var, info);
185 } 188 }
186 189
187 return 0; 190 return 0;
@@ -410,15 +413,19 @@ static int viafb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
410static int viafb_pan_display(struct fb_var_screeninfo *var, 413static int viafb_pan_display(struct fb_var_screeninfo *var,
411 struct fb_info *info) 414 struct fb_info *info)
412{ 415{
413 unsigned int offset; 416 struct viafb_par *viapar = info->par;
414 417 u32 vram_addr = (var->yoffset * var->xres_virtual + var->xoffset)
415 DEBUG_MSG(KERN_INFO "viafb_pan_display!\n"); 418 * (var->bits_per_pixel / 8) + viapar->vram_addr;
416 419
417 offset = (var->xoffset + (var->yoffset * var->xres_virtual)) * 420 DEBUG_MSG(KERN_DEBUG "viafb_pan_display, address = %d\n", vram_addr);
418 var->bits_per_pixel / 16; 421 if (!viafb_dual_fb) {
422 viafb_set_primary_address(vram_addr);
423 viafb_set_secondary_address(vram_addr);
424 } else if (viapar->iga_path == IGA1)
425 viafb_set_primary_address(vram_addr);
426 else
427 viafb_set_secondary_address(vram_addr);
419 428
420 DEBUG_MSG(KERN_INFO "\nviafb_pan_display,offset =%d ", offset);
421 viafb_set_primary_address(offset);
422 return 0; 429 return 0;
423} 430}
424 431