mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
[controlfb] Ifdef for when CONFIG_NVRAM isn't enabled.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
This commit is contained in:
parent
d57cdcffe1
commit
4938d3f4f8
1 changed files with 6 additions and 2 deletions
|
@ -415,13 +415,15 @@ static int __init init_control(struct fb_info_control *p)
|
||||||
full = p->total_vram == 0x400000;
|
full = p->total_vram == 0x400000;
|
||||||
|
|
||||||
/* Try to pick a video mode out of NVRAM if we have one. */
|
/* Try to pick a video mode out of NVRAM if we have one. */
|
||||||
|
#ifdef CONFIG_NVRAM
|
||||||
if (default_cmode == CMODE_NVRAM){
|
if (default_cmode == CMODE_NVRAM){
|
||||||
cmode = nvram_read_byte(NV_CMODE);
|
cmode = nvram_read_byte(NV_CMODE);
|
||||||
if(cmode < CMODE_8 || cmode > CMODE_32)
|
if(cmode < CMODE_8 || cmode > CMODE_32)
|
||||||
cmode = CMODE_8;
|
cmode = CMODE_8;
|
||||||
} else
|
} else
|
||||||
|
#endif
|
||||||
cmode=default_cmode;
|
cmode=default_cmode;
|
||||||
|
#ifdef CONFIG_NVRAM
|
||||||
if (default_vmode == VMODE_NVRAM) {
|
if (default_vmode == VMODE_NVRAM) {
|
||||||
vmode = nvram_read_byte(NV_VMODE);
|
vmode = nvram_read_byte(NV_VMODE);
|
||||||
if (vmode < 1 || vmode > VMODE_MAX ||
|
if (vmode < 1 || vmode > VMODE_MAX ||
|
||||||
|
@ -432,7 +434,9 @@ static int __init init_control(struct fb_info_control *p)
|
||||||
if (control_mac_modes[vmode - 1].m[full] < cmode)
|
if (control_mac_modes[vmode - 1].m[full] < cmode)
|
||||||
vmode = VMODE_640_480_60;
|
vmode = VMODE_640_480_60;
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
vmode=default_vmode;
|
vmode=default_vmode;
|
||||||
if (control_mac_modes[vmode - 1].m[full] < cmode) {
|
if (control_mac_modes[vmode - 1].m[full] < cmode) {
|
||||||
if (cmode > CMODE_8)
|
if (cmode > CMODE_8)
|
||||||
|
|
Loading…
Reference in a new issue