viafb: reorder initialization for dual framebuffer mode

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, March 12, 2010 - 5:59 pm

Gitweb:     http://git.kernel.org/linus/7cf607923dee1898b9fc1e62568b79e7f785b995
Commit:     7cf607923dee1898b9fc1e62568b79e7f785b995
Parent:     d8566b29e86ef3906dd6c0ea4a02c2a925748da5
Author:     Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
AuthorDate: Wed Mar 10 15:21:31 2010 -0800
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Fri Mar 12 15:52:33 2010 -0800

    viafb: reorder initialization for dual framebuffer mode
    
    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 <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>
---
 drivers/video/via/viafbdev.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 5f5b5e9..4d955ca 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -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);
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
viafb: reorder initialization for dual framebuffer mode, Linux Kernel Mailing ..., (Fri Mar 12, 5:59 pm)