Skip to contentSkip to conversation

firmware: sysfb: Remove CONFIG_SYSFB_SIMPLEFB

PATCH In review Thomas Zimmermann 2 participants 2 messages Nov 17

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 firmware: sysfb: Remove CONFIG_SYSFB_SIMPLEFB

Enabling SYSFB_SIMPLEFB creates a system-framebuffer device on top of a firmware-provided UEFI or VESA framebuffer. It is inflexible and lacks support for various features, such as EDID and color LUTs. Therefore commit cc79eaf8ee25 ("firmware: sysfb: Mark CONFIG_SYSFB_SIMPLEFB as deprecated") marked CONFIG_SYSFB_SIMPLEFB as deprecated.

Remove CONFIG_SYSFB_SIMPLEFB and the related code. Remaining users are advised to upgrade to efi-framebuffer and vesa-framebuffer with efidrm and vesadrm on top. Also remove the outdated comment from sysfb.c.

Note that this change does not affect DeviceTree simple-framebuffer. The kernel still parses them and creates a simple-framebuffer device for each.

The MIPS architecture code creates a simple-framebuffer device for the display output on the Nintendo N64. Removing CONFIG_SYSFB_SIMPLEFB does not affect this code either.

---
 drivers/firmware/Kconfig          |  16 ----
 drivers/firmware/Makefile         |   1 -
 drivers/firmware/sysfb.c          |  33 -------
 drivers/firmware/sysfb_simplefb.c | 140 ------------------------------
 drivers/gpu/drm/sysfb/Kconfig     |   4 +-
 include/linux/sysfb.h             |  25 ------
 6 files changed, 2 insertions(+), 217 deletions(-)
 delete mode 100644 drivers/firmware/sysfb_simplefb.c
drivers/firmware/Kconfig +0 -16
index 43e2e2a64594..ab76a6f7f0ab 100644
@@ -210,22 +210,6 @@ config SYSFB
 	select BOOT_VESA_SUPPORT
 	select SCREEN_INFO
 
-config SYSFB_SIMPLEFB
-	bool "Mark VGA/VBE/EFI FB as generic system framebuffer (deprecated)"
-	depends on X86 || EFI
-	select SYSFB
-	help
-	  Firmware often provides initial graphics framebuffers so the BIOS,
-	  bootloader or kernel can show basic video-output during boot for
-	  user-guidance and debugging.
-
-	  This option, if enabled, marks VBE/EFI framebuffers as system
-	  framebuffers so the generic simpledrm driver can be used.
-
-	  This option is deprecated and will be removed in the near future. If
-	  unsure, say N and select efidrm, vesadrm instead. The dedicated DRM
-	  drivers provide the same functionality plus additional features.
-
 config TH1520_AON_PROTOCOL
 	tristate "Always-On firmware protocol"
 	depends on ARCH_THEAD || COMPILE_TEST
drivers/firmware/Makefile +0 -1
index 50b338313152..6a9413454d10 100644
@@ -19,7 +19,6 @@ obj-$(CONFIG_RASPBERRYPI_FIRMWARE) += raspberrypi.o
 obj-$(CONFIG_FW_CFG_SYSFS)	+= qemu_fw_cfg.o
 obj-$(CONFIG_FW_ATTR_CLASS)	+= firmware_attributes_class.o
 obj-$(CONFIG_SYSFB)		+= sysfb.o
-obj-$(CONFIG_SYSFB_SIMPLEFB)	+= sysfb_simplefb.o
 obj-$(CONFIG_TH1520_AON_PROTOCOL) += thead,th1520-aon.o
 obj-$(CONFIG_TI_SCI_PROTOCOL)	+= ti_sci.o
 obj-$(CONFIG_TRUSTED_FOUNDATIONS) += trusted_foundations.o
drivers/firmware/sysfb.c +0 -33
index 8833582c1883..07738b9e89c5 100644
@@ -4,33 +4,11 @@
  * Copyright (c) 2012-2013 David Herrmann <[email protected]>
  */
 
-/*
- * Simple-Framebuffer support
- * Create a platform-device for any available boot framebuffer. The
- * simple-framebuffer platform device is already available on DT systems, so
- * this module parses the global "screen_info" object and creates a suitable
- * platform device compatible with the "simple-framebuffer" DT object. If
- * the framebuffer is incompatible, we instead create a legacy
- * "vesa-framebuffer", "efi-framebuffer" or "platform-framebuffer" device and
- * pass the screen_info as platform_data. This allows legacy drivers
- * to pick these devices up without messing with simple-framebuffer drivers.
- * The global "screen_info" is still valid at all times.
- *
- * If CONFIG_SYSFB_SIMPLEFB is not selected, never register "simple-framebuffer"
- * platform devices, but only use legacy framebuffer devices for
- * backwards compatibility.
- *
- * TODO: We set the dev_id field of all platform-devices to 0. This allows
- * other OF/DT parsers to create such devices, too. However, they must
- * start at offset 1 for this to work.
- */
-
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/pci.h>
-#include <linux/platform_data/simplefb.h>
 #include <linux/platform_device.h>
 #include <linux/screen_info.h>
 #include <linux/sysfb.h>
@@ -145,9 +123,7 @@ static __init int sysfb_init(void)
 	struct screen_info *si = &dpy->screen;
 	struct device *parent;
 	unsigned int type;
-	struct simplefb_platform_data mode;
 	const char *name;
-	bool compatible;
 	int ret = 0;
 
 	screen_info_apply_fixups();
@@ -164,17 +140,8 @@ static __init int sysfb_init(void)
 		goto unlock_mutex;
 	}
 
-	/* try to create a simple-framebuffer device */
-	compatible = sysfb_parse_mode(si, &mode);
-	if (compatible) {
-		pd = sysfb_create_simplefb(si, &mode, parent);
-		if (!IS_ERR(pd))
-			goto put_device;
-	}
-
 	type = screen_info_video_type(si);
 
-	/* if the FB is incompatible, create a legacy framebuffer device */
 	switch (type) {
 	case VIDEO_TYPE_EGAC:
 		name = "ega-framebuffer";
drivers/firmware/sysfb_simplefb.c deleted +0 -140

140 lines not on this page · raw message

drivers/gpu/drm/sysfb/Kconfig +2 -2
index f7e48178885e..05d4b3ab4d08 100644
@@ -25,7 +25,7 @@ config DRM_COREBOOTDRM
 
 config DRM_EFIDRM
 	tristate "EFI framebuffer driver"
-	depends on DRM && MMU && EFI && (!SYSFB_SIMPLEFB || COMPILE_TEST)
+	depends on DRM && MMU && EFI
 	select APERTURE_HELPERS
 	select DRM_CLIENT_SELECTION
 	select DRM_GEM_SHMEM_HELPER
@@ -72,7 +72,7 @@ config DRM_SIMPLEDRM
 
 config DRM_VESADRM
 	tristate "VESA framebuffer driver"
-	depends on DRM && MMU && X86 && (!SYSFB_SIMPLEFB || COMPILE_TEST)
+	depends on DRM && MMU && X86
 	select APERTURE_HELPERS
 	select DRM_CLIENT_SELECTION
 	select DRM_GEM_SHMEM_HELPER
include/linux/sysfb.h +0 -25
index ed23d6516223..611c8f0d13da 100644
@@ -110,29 +110,4 @@ static inline void sysfb_set_efifb_fwnode(const struct screen_info *si,
 
 #endif /* CONFIG_EFI */
 
-#ifdef CONFIG_SYSFB_SIMPLEFB
-
-bool sysfb_parse_mode(const struct screen_info *si,
-		      struct simplefb_platform_data *mode);
-struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
-					      const struct simplefb_platform_data *mode,
-					      struct device *parent);
-
-#else /* CONFIG_SYSFB_SIMPLEFB */
-
-static inline bool sysfb_parse_mode(const struct screen_info *si,
-				    struct simplefb_platform_data *mode)
-{
-	return false;
-}
-
-static inline struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
-							    const struct simplefb_platform_data *mode,
-							    struct device *parent)
-{
-	return ERR_PTR(-EINVAL);
-}
-
-#endif /* CONFIG_SYSFB_SIMPLEFB */
-
 #endif /* _LINUX_SYSFB_H */
Signature · 1 line
2.56.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Thomas Zimmermann

Enabling SYSFB_SIMPLEFB creates a system-framebuffer device on top of a firmware-provided UEFI or VESA framebuffer. It is inflexible and lacks support for various features, such as EDID and color LUTs. Therefore commit cc79eaf8ee25 ("firmware: sysfb: Mark CONFIG_SYSFB_SIMPLEFB as deprecated") marked CONFIG_SYSFB_SIMPLEFB as deprecated.

Remove CONFIG_SYSFB_SIMPLEFB and the related code. Remaining users are advised to upgrade to efi-framebuffer and vesa-framebuffer with efidrm and vesadrm on top. Also remove the outdated comment from sysfb.c.

Note that this change does not affect DeviceTree simple-framebuffer. The kernel still parses them and creates a simple-framebuffer device for each.

Quoted 6 lines

The MIPS architecture code creates a simple-framebuffer device for the display output on the Nintendo N64. Removing CONFIG_SYSFB_SIMPLEFB does not affect this code either.

---

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat