patch-2.3.43 linux/drivers/video/controlfb.c
Next file: linux/drivers/video/cyber2000fb.c
Previous file: linux/drivers/video/chipsfb.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Wed Feb 9 19:43:57 2000
- Orig file:
v2.3.42/linux/drivers/video/controlfb.c
- Orig date:
Mon Oct 11 15:38:15 1999
diff -u --recursive --new-file v2.3.42/linux/drivers/video/controlfb.c linux/drivers/video/controlfb.c
@@ -528,17 +528,23 @@
p->sense = read_control_sense(p);
printk(KERN_INFO "Monitor sense value = 0x%x, ", p->sense);
/* Try to pick a video mode out of NVRAM if we have one. */
- par->vmode = nvram_read_byte(NV_VMODE);
- if(par->vmode <= 0 || par->vmode > VMODE_MAX || !control_reg_init[par->vmode - 1])
- par->vmode = VMODE_CHOOSE;
- if(par->vmode == VMODE_CHOOSE)
- par->vmode = mac_map_monitor_sense(p->sense);
- if(!control_reg_init[par->vmode - 1])
- par->vmode = VMODE_640_480_60;
+ if (default_vmode == VMODE_NVRAM) {
+ par->vmode = nvram_read_byte(NV_VMODE);
+ if(par->vmode <= 0 || par->vmode > VMODE_MAX || !control_reg_init[par->vmode - 1])
+ par->vmode = VMODE_CHOOSE;
+ if(par->vmode == VMODE_CHOOSE)
+ par->vmode = mac_map_monitor_sense(p->sense);
+ if(!control_reg_init[par->vmode - 1])
+ par->vmode = VMODE_640_480_60;
+ } else
+ par->vmode=default_vmode;
- par->cmode = nvram_read_byte(NV_CMODE);
- if(par->cmode < CMODE_8 || par->cmode > CMODE_32)
- par->cmode = CMODE_8;
+ if (default_cmode == CMODE_NVRAM){
+ par->cmode = nvram_read_byte(NV_CMODE);
+ if(par->cmode < CMODE_8 || par->cmode > CMODE_32)
+ par->cmode = CMODE_8;}
+ else
+ par->cmode=default_cmode;
/*
* Reduce the pixel size if we don't have enough VRAM.
*/
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)