summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/core
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javierm@redhat.com>2023-07-19 10:15:37 +0200
committerJavier Martinez Canillas <javierm@redhat.com>2023-07-22 12:25:04 +0200
commit55bffc8170bb5813c51a44b1f4a818ade675fe1f (patch)
treedd3dfde9a25d97bccd294d1e4dfe1f51ce10315f /drivers/video/fbdev/core
parentdf7915246e798b9ef8326df97b448efba3e9cd43 (diff)
fbdev: Split frame buffer support in FB and FB_CORE symbols
Currently the CONFIG_FB option has to be enabled even if no legacy fbdev drivers are needed (e.g: only to have support for framebuffer consoles). The DRM subsystem has a fbdev emulation layer, but depends on CONFIG_FB and so it can only be enabled if that dependency is enabled as well. That means fbdev drivers have to be explicitly disabled if users want to enable CONFIG_FB, only to use fbcon and/or the DRM fbdev emulation layer. This patch introduces a non-visible CONFIG_FB_CORE symbol that could be enabled just to have core support needed for CONFIG_DRM_FBDEV_EMULATION, allowing CONFIG_FB to be disabled (and automatically disabling all the fbdev drivers). Nothing from fb_backlight.o and fbmon.o is used by the DRM fbdev emulation layer so these two objects can be compiled out when CONFIG_FB is disabled. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Helge Deller <deller@gmx.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230719081544.741051-4-javierm@redhat.com
Diffstat (limited to 'drivers/video/fbdev/core')
-rw-r--r--drivers/video/fbdev/core/Kconfig30
-rw-r--r--drivers/video/fbdev/core/Makefile10
2 files changed, 23 insertions, 17 deletions
diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
index fd3b7f5b4b7a..528e4dd2199c 100644
--- a/drivers/video/fbdev/core/Kconfig
+++ b/drivers/video/fbdev/core/Kconfig
@@ -3,6 +3,10 @@
# fbdev core configuration
#
+config FB_CORE
+ select VIDEO_CMDLINE
+ tristate
+
config FB_NOTIFY
bool
@@ -23,7 +27,7 @@ config FIRMWARE_EDID
config FB_DEVICE
bool "Provide legacy /dev/fb* device"
- depends on FB
+ depends on FB_CORE
default y
help
Say Y here if you want the legacy /dev/fb* device file and
@@ -39,7 +43,7 @@ config FB_DDC
config FB_CFB_FILLRECT
tristate
- depends on FB
+ depends on FB_CORE
help
Include the cfb_fillrect function for generic software rectangle
filling. This is used by drivers that don't provide their own
@@ -47,7 +51,7 @@ config FB_CFB_FILLRECT
config FB_CFB_COPYAREA
tristate
- depends on FB
+ depends on FB_CORE
help
Include the cfb_copyarea function for generic software area copying.
This is used by drivers that don't provide their own (accelerated)
@@ -55,7 +59,7 @@ config FB_CFB_COPYAREA
config FB_CFB_IMAGEBLIT
tristate
- depends on FB
+ depends on FB_CORE
help
Include the cfb_imageblit function for generic software image
blitting. This is used by drivers that don't provide their own
@@ -63,7 +67,7 @@ config FB_CFB_IMAGEBLIT
config FB_CFB_REV_PIXELS_IN_BYTE
bool
- depends on FB
+ depends on FB_CORE
help
Allow generic frame-buffer functions to work on displays with 1, 2
and 4 bits per pixel depths which has opposite order of pixels in
@@ -71,7 +75,7 @@ config FB_CFB_REV_PIXELS_IN_BYTE
config FB_SYS_FILLRECT
tristate
- depends on FB
+ depends on FB_CORE
help
Include the sys_fillrect function for generic software rectangle
filling. This is used by drivers that don't provide their own
@@ -79,7 +83,7 @@ config FB_SYS_FILLRECT
config FB_SYS_COPYAREA
tristate
- depends on FB
+ depends on FB_CORE
help
Include the sys_copyarea function for generic software area copying.
This is used by drivers that don't provide their own (accelerated)
@@ -87,7 +91,7 @@ config FB_SYS_COPYAREA
config FB_SYS_IMAGEBLIT
tristate
- depends on FB
+ depends on FB_CORE
help
Include the sys_imageblit function for generic software image
blitting. This is used by drivers that don't provide their own
@@ -126,22 +130,22 @@ endchoice
config FB_SYS_FOPS
tristate
- depends on FB
+ depends on FB_CORE
config FB_DEFERRED_IO
bool
- depends on FB
+ depends on FB_CORE
config FB_IO_HELPERS
bool
- depends on FB
+ depends on FB_CORE
select FB_CFB_COPYAREA
select FB_CFB_FILLRECT
select FB_CFB_IMAGEBLIT
config FB_SYS_HELPERS
bool
- depends on FB
+ depends on FB_CORE
select FB_SYS_COPYAREA
select FB_SYS_FILLRECT
select FB_SYS_FOPS
@@ -149,7 +153,7 @@ config FB_SYS_HELPERS
config FB_SYS_HELPERS_DEFERRED
bool
- depends on FB
+ depends on FB_CORE
select FB_DEFERRED_IO
select FB_SYS_HELPERS
diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile
index 9150bafd9e89..edfde2948e5c 100644
--- a/drivers/video/fbdev/core/Makefile
+++ b/drivers/video/fbdev/core/Makefile
@@ -1,10 +1,12 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_FB_NOTIFY) += fb_notify.o
-obj-$(CONFIG_FB) += fb.o
-fb-y := fb_backlight.o \
- fb_info.o \
- fbmem.o fbmon.o fbcmap.o \
+obj-$(CONFIG_FB_CORE) += fb.o
+fb-y := fb_info.o \
+ fbmem.o fbcmap.o \
modedb.o fbcvt.o fb_cmdline.o fb_io_fops.o
+ifdef CONFIG_FB
+fb-y += fb_backlight.o fbmon.o
+endif
fb-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o
fb-$(CONFIG_FB_DEVICE) += fb_chrdev.o \
fb_procfs.o \