From: "Arnd Bergmann" <arnd@arndb.de>
To: "Javier Martinez Canillas" <javierm@redhat.com>,
linux-kernel@vger.kernel.org
Cc: "Thomas Zimmermann" <tzimmermann@suse.de>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Borislav Petkov" <bp@alien8.de>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"H. Peter Anvin" <hpa@zytor.com>, "Helge Deller" <deller@gmx.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
x86@kernel.org
Subject: Re: [PATCH v2 1/2] fbdev: Split frame buffer support in FB and FB_CORE symbols
Date: Sun, 02 Jul 2023 00:24:49 +0200 [thread overview]
Message-ID: <393ca142-5226-4779-a963-c34fb0464c59@app.fastmail.com> (raw)
In-Reply-To: <20230701214503.550549-2-javierm@redhat.com>
On Sat, Jul 1, 2023, at 23:44, Javier Martinez Canillas wrote:
> 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>
> ---
I found two more things now:
>
> +menuconfig FB_CORE
> + tristate "Core support for frame buffer devices"
> +
This is not actually a hidden option, since you left the prompt
after the 'tristate' keyword. There is also no pointn in having
it as a menu, just use the simpler
config FB_CORE
tristate
or (as in my other email)
config FB_CORE
def_tristate FB || (DRM && DRM_FBDEV_EMULATION)
> @@ -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
> default y
> help
> Say Y here if you want the legacy /dev/fb* device file and
These are now the only user visible sub-options when CONFIG_FB is
disabled. I missed FIRMWARE_EDID earlier, but this also looks like
it can clearly be left as depending on FB since nothing else calls
fb_firmware_edid. In fact, it looks like all of fbmon.c could be
left out since none of its exported symbols are needed for DRM.
That would leave CONFIG_FB_DEVICE as the only user visible option
for DRM-only configs, which is slightly odd for the menuconfig,
so I still wonder if that could be done differently.
Is there actually a point in configurations for kernels with FB=y,
DRM=n and FB_DEVICE=n? If we don't expect that to be a useful
configuration, an easier way would be to have CONFIG_FB turn it
on implicitly and instead have a user-visible Kconfig option
below CONFIG_DRM_FBDEV_EMULATION that allows controlling the
creation of /dev/fb*.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Javier Martinez Canillas" <javierm@redhat.com>,
linux-kernel@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Helge Deller <deller@gmx.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, 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: Sun, 02 Jul 2023 00:24:49 +0200 [thread overview]
Message-ID: <393ca142-5226-4779-a963-c34fb0464c59@app.fastmail.com> (raw)
In-Reply-To: <20230701214503.550549-2-javierm@redhat.com>
On Sat, Jul 1, 2023, at 23:44, Javier Martinez Canillas wrote:
> 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>
> ---
I found two more things now:
>
> +menuconfig FB_CORE
> + tristate "Core support for frame buffer devices"
> +
This is not actually a hidden option, since you left the prompt
after the 'tristate' keyword. There is also no pointn in having
it as a menu, just use the simpler
config FB_CORE
tristate
or (as in my other email)
config FB_CORE
def_tristate FB || (DRM && DRM_FBDEV_EMULATION)
> @@ -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
> default y
> help
> Say Y here if you want the legacy /dev/fb* device file and
These are now the only user visible sub-options when CONFIG_FB is
disabled. I missed FIRMWARE_EDID earlier, but this also looks like
it can clearly be left as depending on FB since nothing else calls
fb_firmware_edid. In fact, it looks like all of fbmon.c could be
left out since none of its exported symbols are needed for DRM.
That would leave CONFIG_FB_DEVICE as the only user visible option
for DRM-only configs, which is slightly odd for the menuconfig,
so I still wonder if that could be done differently.
Is there actually a point in configurations for kernels with FB=y,
DRM=n and FB_DEVICE=n? If we don't expect that to be a useful
configuration, an easier way would be to have CONFIG_FB turn it
on implicitly and instead have a user-visible Kconfig option
below CONFIG_DRM_FBDEV_EMULATION that allows controlling the
creation of /dev/fb*.
Arnd
next prev parent reply other threads:[~2023-07-01 22:25 UTC|newest]
Thread overview: 28+ 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 ` 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 21:44 ` Javier Martinez Canillas
2023-07-01 22:20 ` Randy Dunlap
2023-07-01 22:20 ` Randy Dunlap
2023-07-01 22:24 ` Arnd Bergmann [this message]
2023-07-01 22:24 ` Arnd Bergmann
2023-07-02 9:07 ` Geert Uytterhoeven
2023-07-02 9:07 ` Geert Uytterhoeven
2023-07-02 10:19 ` Javier Martinez Canillas
2023-07-02 10:19 ` Javier Martinez Canillas
2023-07-03 6:53 ` Thomas Zimmermann
2023-07-03 6:53 ` Thomas Zimmermann
2023-07-03 7:46 ` Javier Martinez Canillas
2023-07-03 7:46 ` Javier Martinez Canillas
2023-07-03 7:52 ` Thomas Zimmermann
2023-07-03 7:52 ` Thomas Zimmermann
2023-07-03 8:49 ` Javier Martinez Canillas
2023-07-03 8:49 ` Javier Martinez Canillas
2023-07-01 21:44 ` [PATCH v2 2/2] drm: Make fbdev emulation select FB_CORE instead of depends on FB Javier Martinez Canillas
2023-07-01 21:44 ` Javier Martinez Canillas
2023-07-01 22:06 ` Arnd Bergmann
2023-07-01 22:06 ` Arnd Bergmann
2023-07-02 9:04 ` Geert Uytterhoeven
2023-07-02 9:04 ` Geert Uytterhoeven
2023-07-02 10:17 ` Javier Martinez Canillas
2023-07-02 10:17 ` 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=393ca142-5226-4779-a963-c34fb0464c59@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bp@alien8.de \
--cc=daniel@ffwll.ch \
--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=tzimmermann@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.