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

* Re: [PATCH] x86: Switch to vga console only if framebuffer details are missing
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Cox @ 2012-09-17 11:00 UTC (permalink / raw)
  To: Matt Fleming
  Cc: linux-kernel, linux-efi, Matt Fleming, H. Peter Anvin,
	Matthew Garrett, Olof Johansson, Peter Jones, Ingo Molnar

On Mon, 17 Sep 2012 11:29:08 +0100
Matt Fleming <matt@console-pimps.org> wrote:

> 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.

Speed is the obvious one. vga con is fast, efifb is not

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

* Re: [PATCH] x86: Switch to vga console only if framebuffer details are missing
  2012-09-17 11:00 ` Alan Cox
@ 2012-09-17 11:03   ` Matt Fleming
  0 siblings, 0 replies; 5+ messages in thread
From: Matt Fleming @ 2012-09-17 11:03 UTC (permalink / raw)
  To: Alan Cox
  Cc: linux-kernel, linux-efi, H. Peter Anvin, Matthew Garrett,
	Olof Johansson, Peter Jones, Ingo Molnar

On Mon, 2012-09-17 at 12:00 +0100, Alan Cox wrote:
> On Mon, 17 Sep 2012 11:29:08 +0100
> Matt Fleming <matt@console-pimps.org> wrote:
> 
> > 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.
> 
> Speed is the obvious one. vga con is fast, efifb is not

Right, and that's an entirely valid reason for wanting vga con over
efifb, but in that case users should just disable the efifb driver.

-- 
Matt Fleming, Intel Open Source Technology Center


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

* Re: [PATCH] x86: Switch to vga console only if framebuffer details are missing
  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-10-10 13:43 ` Matt Fleming
  2012-10-10 14:32   ` Peter Jones
  1 sibling, 1 reply; 5+ messages in thread
From: Matt Fleming @ 2012-10-10 13:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-efi, H. Peter Anvin, Matthew Garrett, Olof Johansson,
	Peter Jones, Ingo Molnar, Alan Cox

On Mon, 2012-09-17 at 11:29 +0100, Matt Fleming wrote:
> 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(-)

Ping? Anybody got an opinion on this one?


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

* Re: [PATCH] x86: Switch to vga console only if framebuffer details are missing
  2012-10-10 13:43 ` Matt Fleming
@ 2012-10-10 14:32   ` Peter Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Jones @ 2012-10-10 14:32 UTC (permalink / raw)
  To: Matt Fleming
  Cc: linux-kernel, linux-efi, H. Peter Anvin, Matthew Garrett,
	Olof Johansson, Ingo Molnar, Alan Cox

On Wed, Oct 10, 2012 at 02:43:07PM +0100, Matt Fleming wrote:
> On Mon, 2012-09-17 at 11:29 +0100, Matt Fleming wrote:
> > 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(-)
> 
> Ping? Anybody got an opinion on this one?

Provided "video=vga" still works to circumvent Alan's objection, I'm all
for it.

-- 
        Peter

^ permalink raw reply	[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.