Skip to content

Commit

Permalink
viafb: update fix before calculating depth
Browse files Browse the repository at this point in the history
viafb: update fix before calculating depth

As the depth calculation depends on information in fix it is saner to
do the update first.
No runtime change expected as the value visual in fix used never
changes to MONO.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Jul 23, 2010
1 parent 1f84435 commit 65123c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ static int viafb_set_par(struct fb_info *info)
struct VideoModeTable *vmode_entry, *vmode_entry1 = NULL;
DEBUG_MSG(KERN_INFO "viafb_set_par!\n");

viafb_update_fix(info);
viapar->depth = fb_get_color_depth(&info->var, &info->fix);
viafb_update_device_setting(viafbinfo->var.xres, viafbinfo->var.yres,
viafbinfo->var.bits_per_pixel, viafb_refresh, 0);
Expand All @@ -257,7 +258,6 @@ static int viafb_set_par(struct fb_info *info)
}

if (vmode_entry) {
viafb_update_fix(info);
if (viafb_dual_fb && viapar->iga_path == IGA2)
viafb_bpp1 = info->var.bits_per_pixel;
else
Expand Down

0 comments on commit 65123c6

Please sign in to comment.