aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/controlfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/controlfb.c')
-rw-r--r--drivers/video/controlfb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index 8cc6c0e2d27a..04c6d928189b 100644
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -415,13 +415,15 @@ static int __init init_control(struct fb_info_control *p)
415 full = p->total_vram == 0x400000; 415 full = p->total_vram == 0x400000;
416 416
417 /* Try to pick a video mode out of NVRAM if we have one. */ 417 /* Try to pick a video mode out of NVRAM if we have one. */
418#ifdef CONFIG_NVRAM
418 if (default_cmode == CMODE_NVRAM){ 419 if (default_cmode == CMODE_NVRAM){
419 cmode = nvram_read_byte(NV_CMODE); 420 cmode = nvram_read_byte(NV_CMODE);
420 if(cmode < CMODE_8 || cmode > CMODE_32) 421 if(cmode < CMODE_8 || cmode > CMODE_32)
421 cmode = CMODE_8; 422 cmode = CMODE_8;
422 } else 423 } else
424#endif
423 cmode=default_cmode; 425 cmode=default_cmode;
424 426#ifdef CONFIG_NVRAM
425 if (default_vmode == VMODE_NVRAM) { 427 if (default_vmode == VMODE_NVRAM) {
426 vmode = nvram_read_byte(NV_VMODE); 428 vmode = nvram_read_byte(NV_VMODE);
427 if (vmode < 1 || vmode > VMODE_MAX || 429 if (vmode < 1 || vmode > VMODE_MAX ||
@@ -432,7 +434,9 @@ static int __init init_control(struct fb_info_control *p)
432 if (control_mac_modes[vmode - 1].m[full] < cmode) 434 if (control_mac_modes[vmode - 1].m[full] < cmode)
433 vmode = VMODE_640_480_60; 435 vmode = VMODE_640_480_60;
434 } 436 }
435 } else { 437 } else
438#endif
439 {
436 vmode=default_vmode; 440 vmode=default_vmode;
437 if (control_mac_modes[vmode - 1].m[full] < cmode) { 441 if (control_mac_modes[vmode - 1].m[full] < cmode) {
438 if (cmode > CMODE_8) 442 if (cmode > CMODE_8)