Re: [PATCH] Add new linearfb driver

Previous thread: [REPOST] Re: [PATCH] GSoC 2010 - Memory hotplug support for Xen guests - third fully working version by Daniel Kiper on Wednesday, August 25, 2010 - 7:00 am. (1 message)

Next thread: Bäste användare Com Hem webbmail by help on Wednesday, August 25, 2010 - 7:15 am. (1 message)
From: Colin Watson
Date: Wednesday, August 25, 2010 - 7:11 am

Split out linearfb from efifb so that boot loaders can program it as a
simple linear framebuffer on non-EFI systems.  This is useful for boot
loaders with their own graphics drivers, e.g. GRUB 2, since in some
cases on x86 they can set up non-VESA modes and thus can't program
vesafb.

efifb is reworked on top of this common code, and it should be possible
to do the same with some other framebuffer drivers in future.

Signed-off-by: Colin Watson <cjwatson@canonical.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Cc: Peter Jones <pjones@redhat.com>
---
 drivers/video/Kconfig       |   17 ++-
 drivers/video/Makefile      |    1 +
 drivers/video/efifb.c       |  222 +----------------------------
 drivers/video/linearfb.c    |  332 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/fb.h          |    8 +
 include/linux/screen_info.h |    2 +
 6 files changed, 364 insertions(+), 218 deletions(-)
 create mode 100644 drivers/video/linearfb.c

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 59c51d9..a7735ec 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -721,13 +721,24 @@ config FB_VESA
 	  You will get a boot time penguin logo at no additional cost. Please
 	  read <file:Documentation/fb/vesafb.txt>. If unsure, say Y.
 
-config FB_EFI
-	bool "EFI-based Framebuffer Support"
-	depends on (FB = y) && X86 && EFI
+config FB_LINEAR
+	bool "Simple linear framebuffer support"
+	depends on FB
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	help
+	  This is a simple linear frame buffer device driver. It has no
+	  hardware-specific programming capability, but must be programmed
+	  by the boot loader or by another frame buffer driver.
+
+	  If unsure, say N.
+
+config FB_EFI
+	bool "EFI-based Framebuffer Support"
+	depends on (FB = y) && X86 && EFI
+	select FB_LINEAR
+	help
 	  This is the EFI frame buffer device driver. If the firmware on
 	  your platform is EFI 1.10 or UEFI 2.0, select Y to add ...
From: Peter Jones
Date: Wednesday, August 25, 2010 - 8:03 am

Looks reasonable to me.



-- 
        Peter

I'd like to start a religion. That's where the money is.
		-- L. Ron Hubbard to Lloyd Eshbach, in 1949;
			quoted by Eshbach in _Over My Shoulder_.

01234567890123456789012345678901234567890123456789012345678901234567890123456789
--

From: Bruno Prémont
Date: Wednesday, August 25, 2010 - 10:04 am

^^^^^^^^^^^^^^^^
  Has kconfig been adjusted to process select recursively?
  If not the selects from FB_LINEAR will have to be copied here.

--

From: Peter Jones
Date: Wednesday, August 25, 2010 - 10:24 am

This could also be solved by just making it depend on FB_LINEAR instead of
using "select".

-- 
        Peter

I number the Linux folks among my personal heroes.
		-- Donald Knuth

01234567890123456789012345678901234567890123456789012345678901234567890123456789
--

From: Colin Watson
Date: Wednesday, August 25, 2010 - 10:28 am

When I start with a consistent .config with FB_CFB_FILLRECT unset, then
'make menuconfig' and enable FB_EFI, the resulting .config has
CONFIG_FB_CFB_FILLRECT=y.  That should be a sufficient test, shouldn't
it?

Thanks,

-- 
Colin Watson                                    [cjwatson@canonical.com]
--

From: Geert Uytterhoeven
Date: Wednesday, August 25, 2010 - 1:22 pm

[...]

Wouldn't it be more logical to extract this info somewhere from the
platform_device's
platform_data? Screen_info is such a legacy thing.
That way linearfb can support multiple displays as well.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--

Previous thread: [REPOST] Re: [PATCH] GSoC 2010 - Memory hotplug support for Xen guests - third fully working version by Daniel Kiper on Wednesday, August 25, 2010 - 7:00 am. (1 message)

Next thread: Bäste användare Com Hem webbmail by help on Wednesday, August 25, 2010 - 7:15 am. (1 message)