Hi,
Since the whole point is to detect the case where we don't have a screen at all it makes sense to check several additional variables and make certain that they are all 0. Agreed?
Like in the attached patch? cheers, Gerd
Refine SCREEN_INFO sanity check for vgacon initialization. Checking video mode field only to see whenever SCREEN_INFO is initialized is not enougth, in some cases it is zero although a vga card is present. Lets additionally check cols and lines. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Andi Kleen <ak@suse.de> Cc: Alan <alan@lxorguk.ukuu.org.uk> Cc: Ingo Molnar <mingo@elte.hu> Cc: Eric W. Biederman <ebiederm@xmission.com> --- drivers/video/console/vgacon.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) Index: vanilla-2.6.21-git11/drivers/video/console/vgacon.c =================================================================== --- vanilla-2.6.21-git11.orig/drivers/video/console/vgacon.c +++ vanilla-2.6.21-git11/drivers/video/console/vgacon.c @@ -368,9 +368,14 @@ static const char *vgacon_startup(void) #endif } + /* SCREEN_INFO initialized? */ + if ((ORIG_VIDEO_MODE == 0) && + (ORIG_VIDEO_LINES == 0) && + (ORIG_VIDEO_COLS == 0)) + goto no_vga; + /* VGA16 modes are not handled by VGACON */ - if ((ORIG_VIDEO_MODE == 0x00) || /* SCREEN_INFO not initialized */ - (ORIG_VIDEO_MODE == 0x0D) || /* 320x200/4 */ + if ((ORIG_VIDEO_MODE == 0x0D) || /* 320x200/4 */ (ORIG_VIDEO_MODE == 0x0E) || /* 640x200/4 */ (ORIG_VIDEO_MODE == 0x10) || /* 640x350/4 */ (ORIG_VIDEO_MODE == 0x12) || /* 640x480/4 */
- Follow-Ups:
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: yhlu <yhlu.kernel@gmail.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- References:
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: Jeremy Fitzhardinge <jeremy@goop.org>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: yhlu <yhlu.kernel@gmail.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: yhlu <yhlu.kernel@gmail.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: yhlu <yhlu.kernel@gmail.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: yhlu <yhlu.kernel@gmail.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: Jeremy Fitzhardinge <jeremy@goop.org>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: "H. Peter Anvin" <hpa@zytor.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: yhlu <yhlu.kernel@gmail.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: "H. Peter Anvin" <hpa@zytor.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: "H. Peter Anvin" <hpa@zytor.com>
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- From: ebiederm@xmission.com (Eric W. Biederman)
- Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- Prev by Date: Re: Please revert 5adc55da4a7758021bcc374904b0f8b076508a11 (PCI_MULTITHREAD_PROBE)
- Next by Date: [PATCH 1/10] crypto: don't pollute the global namespace with sg_next()
- Previous by thread: Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- Next by thread: Re: [patches] [PATCH] [21/22] x86_64: Extend bzImage protocol for relocatable bzImage
- Index(es):
![]() |