linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
	linux-kernel@vger.kernel.org
Cc: x86@kernel.org, linux-fbdev@vger.kernel.org,
	Randy Dunlap <rdunlap@infradead.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Helge Deller <deller@gmx.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	dri-devel@lists.freedesktop.org, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [PATCH v2 1/2] fbdev: Split frame buffer support in FB and FB_CORE symbols
Date: Mon, 3 Jul 2023 08:53:22 +0200	[thread overview]
Message-ID: <e83eab26-a8fe-b151-6bd4-7a7db6ceee1f@suse.de> (raw)
In-Reply-To: <20230701214503.550549-2-javierm@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 8189 bytes --]

Hi

Am 01.07.23 um 23:44 schrieb Javier Martinez Canillas:
> 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).
> 
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
> 
> Changes in v2:
> - Keep "depends on FB" for FB_DDC, FB_HECUBA, FB_SVGALIB, FB_MACMODES,
>    FB_BACKLIGHT, FB_MODE_HELPERS and FB_TILEBLITTING (Arnd Bergmann).
> - Don't change the fb.o object name (Arnd Bergmann).
> - Make FB_CORE a non-visible Kconfig symbol instead (Thomas Zimmermann).
> 
>   arch/x86/Makefile                 |  2 +-
>   arch/x86/video/Makefile           |  2 +-
>   drivers/video/console/Kconfig     |  2 +-
>   drivers/video/fbdev/Kconfig       | 40 +++++++++++++++++++------------
>   drivers/video/fbdev/core/Makefile |  2 +-
>   5 files changed, 29 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index b39975977c03..89a02e69be5f 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -259,7 +259,7 @@ drivers-$(CONFIG_PCI)            += arch/x86/pci/
>   # suspend and hibernation support
>   drivers-$(CONFIG_PM) += arch/x86/power/
>   
> -drivers-$(CONFIG_FB) += arch/x86/video/
> +drivers-$(CONFIG_FB_CORE) += arch/x86/video/
>   
>   ####
>   # boot loader support. Several targets are kept for legacy purposes
> diff --git a/arch/x86/video/Makefile b/arch/x86/video/Makefile
> index 11640c116115..5ebe48752ffc 100644
> --- a/arch/x86/video/Makefile
> +++ b/arch/x86/video/Makefile
> @@ -1,2 +1,2 @@
>   # SPDX-License-Identifier: GPL-2.0-only
> -obj-$(CONFIG_FB)               += fbdev.o
> +obj-$(CONFIG_FB_CORE)		+= fbdev.o
> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> index a2a88d42edf0..1b5a319971ed 100644
> --- a/drivers/video/console/Kconfig
> +++ b/drivers/video/console/Kconfig
> @@ -72,7 +72,7 @@ config DUMMY_CONSOLE_ROWS
>   
>   config FRAMEBUFFER_CONSOLE
>   	bool "Framebuffer Console support"
> -	depends on FB && !UML
> +	depends on FB_CORE && !UML
>   	select VT_HW_CONSOLE_BINDING
>   	select CRC32
>   	select FONT_SUPPORT
> diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> index cecf15418632..da6f7d588f17 100644
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -6,8 +6,12 @@
>   config FB_NOTIFY
>   	bool
>   
> +menuconfig FB_CORE
> +	tristate "Core support for frame buffer devices"

With the text, this is visible; as others noted.

> +
>   menuconfig FB
> -	tristate "Support for frame buffer devices"
> +	tristate "Support for frame buffer device drivers"

Just keep the text as-is.

> +	select FB_CORE
>   	select FB_NOTIFY
>   	select VIDEO_CMDLINE
>   	help
> @@ -33,6 +37,12 @@ menuconfig FB
>   	  <http://www.munted.org.uk/programming/Framebuffer-HOWTO-1.3.html> for more
>   	  information.
>   
> +	  This enables support for native frame buffer device (fbdev) drivers.
> +
> +	  The DRM subsystem provides support for emulated frame buffer devices
> +	  on top of KMS drivers, but this option allows legacy fbdev drivers to
> +	  be enabled as well.
> +
>   	  Say Y here and to the driver for your graphics board below if you
>   	  are compiling a kernel for a non-x86 architecture.
>   
> @@ -44,7 +54,7 @@ menuconfig FB
>   
>   config FIRMWARE_EDID
>   	bool "Enable firmware EDID"
> -	depends on FB
> +	depends on FB_CORE
>   	help
>   	  This enables access to the EDID transferred from the firmware.
>   	  On the i386, this is from the Video BIOS. Enable this if DDC/I2C
> @@ -59,7 +69,7 @@ config FIRMWARE_EDID
>   
>   config FB_DEVICE
>   	bool "Provide legacy /dev/fb* device"
> -	depends on FB
> +	select FB_CORE

This should depend on FB_CORE.

Best regards
Thomas

>   	default y
>   	help
>   	  Say Y here if you want the legacy /dev/fb* device file and
> @@ -75,7 +85,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
> @@ -83,7 +93,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)
> @@ -91,7 +101,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
> @@ -99,7 +109,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
> @@ -107,7 +117,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
> @@ -115,7 +125,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)
> @@ -123,7 +133,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
> @@ -162,22 +172,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
> @@ -185,7 +195,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..4c2e4a026d12 100644
> --- a/drivers/video/fbdev/core/Makefile
> +++ b/drivers/video/fbdev/core/Makefile
> @@ -1,6 +1,6 @@
>   # SPDX-License-Identifier: GPL-2.0
>   obj-$(CONFIG_FB_NOTIFY)           += fb_notify.o
> -obj-$(CONFIG_FB)                  += fb.o
> +obj-$(CONFIG_FB_CORE)             += fb.o
>   fb-y                              := fb_backlight.o \
>                                        fb_info.o \
>                                        fbmem.o fbmon.o fbcmap.o \

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  parent reply	other threads:[~2023-07-03  6:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-01 21:44 [PATCH v2 0/2] Allow disabling all native fbdev drivers and only keeping DRM emulation Javier Martinez Canillas
2023-07-01 21:44 ` [PATCH v2 1/2] fbdev: Split frame buffer support in FB and FB_CORE symbols Javier Martinez Canillas
2023-07-01 22:20   ` Randy Dunlap
2023-07-01 22:24   ` Arnd Bergmann
2023-07-02  9:07     ` Geert Uytterhoeven
2023-07-02 10:19       ` Javier Martinez Canillas
2023-07-03  6:53   ` Thomas Zimmermann [this message]
2023-07-03  7:46     ` Javier Martinez Canillas
2023-07-03  7:52       ` Thomas Zimmermann
2023-07-03  8:49         ` Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e83eab26-a8fe-b151-6bd4-7a7db6ceee1f@suse.de \
    --to=tzimmermann@suse.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).