uvesafb: don't treat mode info retrieval failures as errors
Some BIOSes return error codes when queried for information about modes from their own modelist. uvesafb treats this as an error case and bails out. Change this behavior so that broken modes do not prevent the driver from working. Only the failure to retrieve information about any usable video mode is considered to be an error case. Signed-off-by: Michal Januszewski <spock@gentoo.org> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Родитель
c0dd504cea
Коммит
9350cc90ca
|
@ -516,10 +516,12 @@ static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
|
||||||
|
|
||||||
err = uvesafb_exec(task);
|
err = uvesafb_exec(task);
|
||||||
if (err || (task->t.regs.eax & 0xffff) != 0x004f) {
|
if (err || (task->t.regs.eax & 0xffff) != 0x004f) {
|
||||||
printk(KERN_ERR "uvesafb: Getting mode info block "
|
printk(KERN_WARNING "uvesafb: Getting mode info block "
|
||||||
"for mode 0x%x failed (eax=0x%x, err=%d)\n",
|
"for mode 0x%x failed (eax=0x%x, err=%d)\n",
|
||||||
*mode, (u32)task->t.regs.eax, err);
|
*mode, (u32)task->t.regs.eax, err);
|
||||||
return -EINVAL;
|
mode++;
|
||||||
|
par->vbe_modes_cnt--;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
mib = task->buf;
|
mib = task->buf;
|
||||||
|
@ -548,7 +550,10 @@ static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
|
||||||
mib->depth = mib->bits_per_pixel;
|
mib->depth = mib->bits_per_pixel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (par->vbe_modes_cnt > 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
else
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче