aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorMichal Januszewski <spock@gentoo.org>2008-10-16 01:03:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:21:44 -0400
commit9350cc90ca8a72bc1974f76a9922f91ced84a5cf (patch)
tree5f1b40814ed6f3911b63e7e868045875814d7900 /drivers/video
parentc0dd504cea3703c3ec9bfd810e6bd649680afd37 (diff)
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/uvesafb.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 50744229c7a9..6c2d37fdd3b9 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -516,10 +516,12 @@ static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
516 516
517 err = uvesafb_exec(task); 517 err = uvesafb_exec(task);
518 if (err || (task->t.regs.eax & 0xffff) != 0x004f) { 518 if (err || (task->t.regs.eax & 0xffff) != 0x004f) {
519 printk(KERN_ERR "uvesafb: Getting mode info block " 519 printk(KERN_WARNING "uvesafb: Getting mode info block "
520 "for mode 0x%x failed (eax=0x%x, err=%d)\n", 520 "for mode 0x%x failed (eax=0x%x, err=%d)\n",
521 *mode, (u32)task->t.regs.eax, err); 521 *mode, (u32)task->t.regs.eax, err);
522 return -EINVAL; 522 mode++;
523 par->vbe_modes_cnt--;
524 continue;
523 } 525 }
524 526
525 mib = task->buf; 527 mib = task->buf;
@@ -548,7 +550,10 @@ static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
548 mib->depth = mib->bits_per_pixel; 550 mib->depth = mib->bits_per_pixel;
549 } 551 }
550 552
551 return 0; 553 if (par->vbe_modes_cnt > 0)
554 return 0;
555 else
556 return -EINVAL;
552} 557}
553 558
554/* 559/*