Skip to content

Commit

Permalink
viafb: reorder initialization for dual framebuffer mode
Browse files Browse the repository at this point in the history
This patch reorders the initialization for dual framebuffer mode to not
ignore the settings for the first mode.  Previously they were overwritten
with the settings for the second one before they were applied.

This should have no effect on non dual framebuffer mode and do what the
user intended (initalization to desired modes) in dual framebuffer mode.

Signed-off-by: Florian Tobias Schandinat <[email protected]>
Cc: Scott Fang <[email protected]>
Cc: Joseph Chan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
schandinat authored and torvalds committed Mar 12, 2010
1 parent d8566b2 commit 7cf6079
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/video/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1960,6 +1960,9 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
default_var.lower_margin = 4;
default_var.hsync_len = default_var.left_margin;
default_var.vsync_len = 4;
viafb_setup_fixinfo(&viafbinfo->fix, viaparinfo);
viafb_check_var(&default_var, viafbinfo);
viafbinfo->var = default_var;

if (viafb_dual_fb) {
viafbinfo1 = framebuffer_alloc(viafb_par_length, &pdev->dev);
Expand Down Expand Up @@ -2015,9 +2018,6 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
&viafbinfo1->fix);
}

viafb_setup_fixinfo(&viafbinfo->fix, viaparinfo);
viafb_check_var(&default_var, viafbinfo);
viafbinfo->var = default_var;
viafb_update_fix(viafbinfo);
viaparinfo->depth = fb_get_color_depth(&viafbinfo->var,
&viafbinfo->fix);
Expand Down

0 comments on commit 7cf6079

Please sign in to comment.