All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Switch to vga console only if framebuffer details are missing
@ 2012-09-17 10:29 Matt Fleming
  2012-09-17 11:00 ` Alan Cox
  2012-10-10 13:43 ` Matt Fleming
  0 siblings, 2 replies; 5+ messages in thread
From: Matt Fleming @ 2012-09-17 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-efi, Matt Fleming, H. Peter Anvin, Matthew Garrett,
	Olof Johansson, Peter Jones, Ingo Molnar

From: Matt Fleming <matt.fleming@intel.com>

The efi_enabled variable has come to mean "Do we have EFI runtime
services available?". However, lack of EFI runtime services does not
mean that we should switch to using the VGA console. Provided that the
boot loader passed the dimensions of the EFI framebuffer there is no
reason we can't use efifb.

There's also no reason to check the memory type of 0xa0000 - whether
or not that memory region is EFI_CONVENTIONAL_MEMORY is immaterial -
the EFI framebuffer device will still work, and checking the EFI
memory type of a memory region on a non-EFI machine is illogical.

Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Peter Jones <pjones@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
---
 arch/x86/kernel/setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f4b9b80..29dc30a 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1021,7 +1021,7 @@ void __init setup_arch(char **cmdline_p)
 
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
-	if (!efi_enabled || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
+	if (!screen_info.lfb_base || !screen_info.lfb_size)
 		conswitchp = &vga_con;
 #elif defined(CONFIG_DUMMY_CONSOLE)
 	conswitchp = &dummy_con;
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-10 15:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-17 10:29 [PATCH] x86: Switch to vga console only if framebuffer details are missing Matt Fleming
2012-09-17 11:00 ` Alan Cox
2012-09-17 11:03   ` Matt Fleming
2012-10-10 13:43 ` Matt Fleming
2012-10-10 14:32   ` Peter Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.