diff options
-rw-r--r-- | drivers/video/uvesafb.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index c288270e42f7..0b370aebdbfd 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c | |||
@@ -850,14 +850,16 @@ static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) | |||
850 | if (vbemode) { | 850 | if (vbemode) { |
851 | for (i = 0; i < par->vbe_modes_cnt; i++) { | 851 | for (i = 0; i < par->vbe_modes_cnt; i++) { |
852 | if (par->vbe_modes[i].mode_id == vbemode) { | 852 | if (par->vbe_modes[i].mode_id == vbemode) { |
853 | modeid = i; | ||
854 | uvesafb_setup_var(&info->var, info, | ||
855 | &par->vbe_modes[modeid]); | ||
853 | fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, | 856 | fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, |
854 | &info->var, info); | 857 | &info->var, info); |
855 | /* | 858 | /* |
856 | * With pixclock set to 0, the default BIOS | 859 | * With pixclock set to 0, the default BIOS |
857 | * timings will be used in set_par(). | 860 | * timings will be used in set_par(). |
858 | */ | 861 | */ |
859 | info->var.pixclock = 0; | 862 | info->var.pixclock = 0; |
860 | modeid = i; | ||
861 | goto gotmode; | 863 | goto gotmode; |
862 | } | 864 | } |
863 | } | 865 | } |
@@ -904,8 +906,11 @@ static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) | |||
904 | fb_videomode_to_var(&info->var, mode); | 906 | fb_videomode_to_var(&info->var, mode); |
905 | } else { | 907 | } else { |
906 | modeid = par->vbe_modes[0].mode_id; | 908 | modeid = par->vbe_modes[0].mode_id; |
909 | uvesafb_setup_var(&info->var, info, | ||
910 | &par->vbe_modes[modeid]); | ||
907 | fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, | 911 | fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, |
908 | &info->var, info); | 912 | &info->var, info); |
913 | |||
909 | goto gotmode; | 914 | goto gotmode; |
910 | } | 915 | } |
911 | } | 916 | } |
@@ -917,9 +922,9 @@ static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) | |||
917 | if (modeid == -1) | 922 | if (modeid == -1) |
918 | return -EINVAL; | 923 | return -EINVAL; |
919 | 924 | ||
920 | gotmode: | ||
921 | uvesafb_setup_var(&info->var, info, &par->vbe_modes[modeid]); | 925 | uvesafb_setup_var(&info->var, info, &par->vbe_modes[modeid]); |
922 | 926 | ||
927 | gotmode: | ||
923 | /* | 928 | /* |
924 | * If we are not VBE3.0+ compliant, we're done -- the BIOS will | 929 | * If we are not VBE3.0+ compliant, we're done -- the BIOS will |
925 | * ignore our timings anyway. | 930 | * ignore our timings anyway. |