mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 23:34:00 -04:00
Add Kconfig option CONFIG_FB_DEVICE and make the virtual fbdev
device optional. If the new option has not been selected, fbdev
does not create files in devfs, sysfs or procfs.
Most modern Linux systems run a DRM-based graphics stack that uses
the kernel's framebuffer console, but has otherwise deprecated fbdev
support. Yet fbdev userspace interfaces are still present.
The option makes it possible to use the fbdev subsystem as console
implementation without support for userspace. This closes potential
entry points to manipulate kernel or I/O memory via framebuffers. It
also prevents the execution of driver code via ioctl or sysfs, both
of which might allow malicious software to exploit bugs in the fbdev
code.
A small number of fbdev drivers require struct fbinfo.dev to be
initialized, usually for the support of sysfs interface. Make these
drivers depend on FB_DEVICE. They can later be fixed if necessary.
v3:
* effect -> affect in Kconfig help (Daniel)
v2:
* set FB_DEVICE default to y (Geert)
* comment on {get,put}_device() (Sam)
* Kconfig fixes (Sam)
* add TODO item about FB_DEVICE dependencies (Sam)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-39-tzimmermann@suse.de
42 lines
949 B
Plaintext
42 lines
949 B
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config OMAP2_VRFB
|
|
bool
|
|
|
|
menuconfig FB_OMAP2
|
|
tristate "OMAP2+ frame buffer support"
|
|
depends on FB
|
|
depends on FB_DEVICE
|
|
depends on DRM_OMAP = n
|
|
depends on GPIOLIB
|
|
select FB_OMAP2_DSS
|
|
select OMAP2_VRFB if ARCH_OMAP2 || ARCH_OMAP3
|
|
select FB_CFB_FILLRECT
|
|
select FB_CFB_COPYAREA
|
|
select FB_CFB_IMAGEBLIT
|
|
help
|
|
Frame buffer driver for OMAP2+ based boards.
|
|
|
|
if FB_OMAP2
|
|
|
|
config FB_OMAP2_DEBUG_SUPPORT
|
|
bool "Debug support for OMAP2+ FB"
|
|
default y
|
|
depends on FB_OMAP2
|
|
help
|
|
Support for debug output. You have to enable the actual printing
|
|
with 'debug' module parameter.
|
|
|
|
config FB_OMAP2_NUM_FBS
|
|
int "Number of framebuffers"
|
|
range 1 10
|
|
default 3
|
|
depends on FB_OMAP2
|
|
help
|
|
Select the number of framebuffers created. OMAP2/3 has 3 overlays
|
|
so normally this would be 3.
|
|
|
|
source "drivers/video/fbdev/omap2/omapfb/dss/Kconfig"
|
|
source "drivers/video/fbdev/omap2/omapfb/displays/Kconfig"
|
|
|
|
endif
|