Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187173
b: refs/heads/master
c: ee79d54
h: refs/heads/master
i:
  187171: dae4867
v: v3
  • Loading branch information
Florian Tobias Schandinat authored and Linus Torvalds committed Mar 12, 2010
1 parent 459ccef commit 78a7e82
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7cf607923dee1898b9fc1e62568b79e7f785b995
refs/heads/master: ee79d54db45bb5e6da3eb76bae162c920aeb9763
2 changes: 0 additions & 2 deletions trunk/drivers/video/via/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2206,8 +2206,6 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
outb(VPIT.SR[i - 1], VIASR + 1);
}

viafb_set_primary_address(0);
viafb_set_secondary_address(viafb_SAMM_ON ? viafb_second_offset : 0);
viafb_set_iga_path();

/* Write CRTC */
Expand Down
23 changes: 15 additions & 8 deletions trunk/drivers/video/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ static void apply_second_mode_setting(struct fb_var_screeninfo
*sec_var);
static void retrieve_device_setting(struct viafb_ioctl_setting
*setting_info);
static int viafb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info);

static struct fb_ops viafb_ops;

Expand Down Expand Up @@ -182,6 +184,7 @@ static int viafb_set_par(struct fb_info *info)
info->flags |= FBINFO_HWACCEL_DISABLED;
viafb_setmode(vmode_entry, info->var.bits_per_pixel,
vmode_entry1, viafb_bpp1);
viafb_pan_display(&info->var, info);
}

return 0;
Expand Down Expand Up @@ -410,15 +413,19 @@ static int viafb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
static int viafb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
unsigned int offset;

DEBUG_MSG(KERN_INFO "viafb_pan_display!\n");

offset = (var->xoffset + (var->yoffset * var->xres_virtual)) *
var->bits_per_pixel / 16;
struct viafb_par *viapar = info->par;
u32 vram_addr = (var->yoffset * var->xres_virtual + var->xoffset)
* (var->bits_per_pixel / 8) + viapar->vram_addr;

DEBUG_MSG(KERN_DEBUG "viafb_pan_display, address = %d\n", vram_addr);
if (!viafb_dual_fb) {
viafb_set_primary_address(vram_addr);
viafb_set_secondary_address(vram_addr);
} else if (viapar->iga_path == IGA1)
viafb_set_primary_address(vram_addr);
else
viafb_set_secondary_address(vram_addr);

DEBUG_MSG(KERN_INFO "\nviafb_pan_display,offset =%d ", offset);
viafb_set_primary_address(offset);
return 0;
}

Expand Down

0 comments on commit 78a7e82

Please sign in to comment.