Skip to content

Commit

Permalink
viafb: do modesetting after updating variables
Browse files Browse the repository at this point in the history
Reorder viafb_set_par to allow using the updated variables in
viafb_setmode.  This fixes a regression that prevented proper runtime mode
changes.

Signed-off-by: Erik-Jan Post <ej.lfs@xs4all.nl>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Erik-Jan Post authored and Linus Torvalds committed Jan 16, 2010
1 parent 0b94190 commit 8a3a95c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/video/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,15 @@ static int viafb_set_par(struct fb_info *info)
}

if (vmode_index != VIA_RES_INVALID) {
viafb_setmode(vmode_index, info->var.xres, info->var.yres,
info->var.bits_per_pixel, vmode_index1,
viafb_second_xres, viafb_second_yres, viafb_bpp1);

viafb_update_fix(info);
viafb_bpp = info->var.bits_per_pixel;
if (info->var.accel_flags & FB_ACCELF_TEXT)
info->flags &= ~FBINFO_HWACCEL_DISABLED;
else
info->flags |= FBINFO_HWACCEL_DISABLED;
viafb_setmode(vmode_index, info->var.xres, info->var.yres,
info->var.bits_per_pixel, vmode_index1,
viafb_second_xres, viafb_second_yres, viafb_bpp1);
}

return 0;
Expand Down

0 comments on commit 8a3a95c

Please sign in to comment.