All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Allow disabling all native fbdev drivers and only keeping DRM emulation
@ 2023-07-03 23:05 ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fbdev, Dave Hansen, Liviu Dudau, dri-devel, H. Peter Anvin,
	Sam Ravnborg, Nipun Gupta, Helge Deller, x86,
	Javier Martinez Canillas, Ingo Molnar, Geert Uytterhoeven,
	Thomas Zimmermann, Arnd Bergmann, Maxime Ripard, Borislav Petkov,
	Jacek Lawrynowicz, Thomas Gleixner, Andy Shevchenko,
	Greg Kroah-Hartman, Oded Gabbay, Randy Dunlap

This patch series splits the fbdev core support in two different Kconfig
symbols: FB and FB_CORE. The motivation for this is to allow CONFIG_FB to
be disabled, while still having the the core fbdev support needed for the
CONFIG_DRM_FBDEV_EMULATION to be enabled. The motivation is automatically
disabling all fbdev drivers instead of having to be disabled individually.

The reason for doing this is that now with simpledrm, there's no need for
the legacy fbdev (e.g: efifb or vesafb) drivers anymore and many distros
now disable them. But it would simplify the config a lot fo have a single
Kconfig symbol to disable all fbdev drivers.

I've built tested with possible combinations of CONFIG_FB, CONFIG_FB_CORE,
CONFIG_DRM_FBDEV_EMULATION and CONFIG_FB_DEVICE symbols set to 'y' or 'n'.

Patch #1, #2 and #3 are cleanups to the "Graphics support" Kconfig menu,
patch #4 does the FB symbol split and introduces the FB_CORE symbol and
finally patch #5 makes the DRM symbol to select FB_CORE if the DRM fbdev
emualtion support was enabled.

Since this series touches three subsystems (auxdisplay, fbdev and DRM),
I would like to merge it through DRM with the acks of these maintainers.

This is a v4 of the patch-set that addresses issues pointed out by Arnd
Bergmann, Thomas Zimmermann and Geert Uytterhoeven in the previous v3:

https://lists.freedesktop.org/archives/dri-devel/2023-July/411689.html

Changes in v4:
- Fix menuconfig hierarchy that was broken in v3 (Arnd Bergmann).

Changes in v3:
- Really make a hidden symbol by removing the prompt (Arnd Bergmann).
- Change FB_CORE to config instead of menuconfig (Arnd Bergmann).
- Keep "depends on FB" for FIRMWARE_EDID (Arnd Bergmann).
- Compile out fb_backlight.o and fbmon.o that are only needed for FB
  (Arnd Bergmann).
- Make FB_DEVICE to depend on FB_CORE instead of selecting it.
- Make the DRM symbol to select FB_CORE if DRM_FBDEV_EMULATION is
  enabled (Arnd Bergmann).
- Also make DRM select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
- Make DRM_FBDEV_EMULATION to depend on DRM instead of DRM_KMS_HELPER.

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).
- Make CONFIG_DRM_FBDEV_EMULATION to select FB_CORE (Thomas Zimmermann).

Javier Martinez Canillas (5):
  video: Add auxiliary display drivers to Graphics support menu
  fbdev: Move core fbdev symbols to a separate Kconfig file
  drm/arm: Make ARM devices menu depend on DRM
  fbdev: Split frame buffer support in FB and FB_CORE symbols
  drm: Make FB_CORE to be selected if DRM fbdev emulation is enabled

 arch/x86/Makefile                 |   2 +-
 arch/x86/video/Makefile           |   2 +-
 drivers/Kconfig                   |   2 -
 drivers/gpu/drm/Kconfig           |   7 +-
 drivers/gpu/drm/arm/Kconfig       |   1 +
 drivers/video/Kconfig             |   2 +
 drivers/video/console/Kconfig     |   2 +-
 drivers/video/fbdev/Kconfig       | 213 ++----------------------------
 drivers/video/fbdev/core/Kconfig  | 206 +++++++++++++++++++++++++++++
 drivers/video/fbdev/core/Makefile |   8 +-
 10 files changed, 230 insertions(+), 215 deletions(-)
 create mode 100644 drivers/video/fbdev/core/Kconfig

-- 
2.41.0


^ permalink raw reply	[flat|nested] 34+ messages in thread

* [PATCH v4 0/5] Allow disabling all native fbdev drivers and only keeping DRM emulation
@ 2023-07-03 23:05 ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geert Uytterhoeven, Thomas Zimmermann, Arnd Bergmann,
	Javier Martinez Canillas, Andy Shevchenko, Borislav Petkov,
	Daniel Vetter, Dave Hansen, David Airlie, Greg Kroah-Hartman,
	H. Peter Anvin, Helge Deller, Ingo Molnar, Jacek Lawrynowicz,
	Liviu Dudau, Maarten Lankhorst, Maxime Ripard, Nipun Gupta,
	Oded Gabbay, Randy Dunlap, Sam Ravnborg, Thomas Gleixner,
	dri-devel, linux-fbdev, x86

This patch series splits the fbdev core support in two different Kconfig
symbols: FB and FB_CORE. The motivation for this is to allow CONFIG_FB to
be disabled, while still having the the core fbdev support needed for the
CONFIG_DRM_FBDEV_EMULATION to be enabled. The motivation is automatically
disabling all fbdev drivers instead of having to be disabled individually.

The reason for doing this is that now with simpledrm, there's no need for
the legacy fbdev (e.g: efifb or vesafb) drivers anymore and many distros
now disable them. But it would simplify the config a lot fo have a single
Kconfig symbol to disable all fbdev drivers.

I've built tested with possible combinations of CONFIG_FB, CONFIG_FB_CORE,
CONFIG_DRM_FBDEV_EMULATION and CONFIG_FB_DEVICE symbols set to 'y' or 'n'.

Patch #1, #2 and #3 are cleanups to the "Graphics support" Kconfig menu,
patch #4 does the FB symbol split and introduces the FB_CORE symbol and
finally patch #5 makes the DRM symbol to select FB_CORE if the DRM fbdev
emualtion support was enabled.

Since this series touches three subsystems (auxdisplay, fbdev and DRM),
I would like to merge it through DRM with the acks of these maintainers.

This is a v4 of the patch-set that addresses issues pointed out by Arnd
Bergmann, Thomas Zimmermann and Geert Uytterhoeven in the previous v3:

https://lists.freedesktop.org/archives/dri-devel/2023-July/411689.html

Changes in v4:
- Fix menuconfig hierarchy that was broken in v3 (Arnd Bergmann).

Changes in v3:
- Really make a hidden symbol by removing the prompt (Arnd Bergmann).
- Change FB_CORE to config instead of menuconfig (Arnd Bergmann).
- Keep "depends on FB" for FIRMWARE_EDID (Arnd Bergmann).
- Compile out fb_backlight.o and fbmon.o that are only needed for FB
  (Arnd Bergmann).
- Make FB_DEVICE to depend on FB_CORE instead of selecting it.
- Make the DRM symbol to select FB_CORE if DRM_FBDEV_EMULATION is
  enabled (Arnd Bergmann).
- Also make DRM select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
- Make DRM_FBDEV_EMULATION to depend on DRM instead of DRM_KMS_HELPER.

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).
- Make CONFIG_DRM_FBDEV_EMULATION to select FB_CORE (Thomas Zimmermann).

Javier Martinez Canillas (5):
  video: Add auxiliary display drivers to Graphics support menu
  fbdev: Move core fbdev symbols to a separate Kconfig file
  drm/arm: Make ARM devices menu depend on DRM
  fbdev: Split frame buffer support in FB and FB_CORE symbols
  drm: Make FB_CORE to be selected if DRM fbdev emulation is enabled

 arch/x86/Makefile                 |   2 +-
 arch/x86/video/Makefile           |   2 +-
 drivers/Kconfig                   |   2 -
 drivers/gpu/drm/Kconfig           |   7 +-
 drivers/gpu/drm/arm/Kconfig       |   1 +
 drivers/video/Kconfig             |   2 +
 drivers/video/console/Kconfig     |   2 +-
 drivers/video/fbdev/Kconfig       | 213 ++----------------------------
 drivers/video/fbdev/core/Kconfig  | 206 +++++++++++++++++++++++++++++
 drivers/video/fbdev/core/Makefile |   8 +-
 10 files changed, 230 insertions(+), 215 deletions(-)
 create mode 100644 drivers/video/fbdev/core/Kconfig

-- 
2.41.0


^ permalink raw reply	[flat|nested] 34+ messages in thread

* [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
  2023-07-03 23:05 ` Javier Martinez Canillas
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fbdev, Arnd Bergmann, Nipun Gupta, Greg Kroah-Hartman,
	Helge Deller, Javier Martinez Canillas, dri-devel,
	Geert Uytterhoeven, Jacek Lawrynowicz, Thomas Zimmermann,
	Oded Gabbay

The drivers in this subsystem are for character-based LCD displays, which
can fall into the same category of the DRM/KMS and fbdev drivers that are
located under the "Graphics support" menu. Add auxdisplay there as well.

Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v1)

 drivers/Kconfig       | 2 --
 drivers/video/Kconfig | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/Kconfig b/drivers/Kconfig
index 514ae6b24cb2..496ca02ee18f 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -129,8 +129,6 @@ source "drivers/dma-buf/Kconfig"
 
 source "drivers/dca/Kconfig"
 
-source "drivers/auxdisplay/Kconfig"
-
 source "drivers/uio/Kconfig"
 
 source "drivers/vfio/Kconfig"
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 8b2b9ac37c3d..acf02863ac7d 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -30,6 +30,8 @@ if HAS_IOMEM
 config HAVE_FB_ATMEL
 	bool
 
+source "drivers/auxdisplay/Kconfig"
+
 source "drivers/char/agp/Kconfig"
 
 source "drivers/gpu/vga/Kconfig"
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geert Uytterhoeven, Thomas Zimmermann, Arnd Bergmann,
	Javier Martinez Canillas, Greg Kroah-Hartman, Helge Deller,
	Jacek Lawrynowicz, Nipun Gupta, Oded Gabbay, dri-devel,
	linux-fbdev

The drivers in this subsystem are for character-based LCD displays, which
can fall into the same category of the DRM/KMS and fbdev drivers that are
located under the "Graphics support" menu. Add auxdisplay there as well.

Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v1)

 drivers/Kconfig       | 2 --
 drivers/video/Kconfig | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/Kconfig b/drivers/Kconfig
index 514ae6b24cb2..496ca02ee18f 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -129,8 +129,6 @@ source "drivers/dma-buf/Kconfig"
 
 source "drivers/dca/Kconfig"
 
-source "drivers/auxdisplay/Kconfig"
-
 source "drivers/uio/Kconfig"
 
 source "drivers/vfio/Kconfig"
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 8b2b9ac37c3d..acf02863ac7d 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -30,6 +30,8 @@ if HAS_IOMEM
 config HAVE_FB_ATMEL
 	bool
 
+source "drivers/auxdisplay/Kconfig"
+
 source "drivers/char/agp/Kconfig"
 
 source "drivers/gpu/vga/Kconfig"
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 2/5] fbdev: Move core fbdev symbols to a separate Kconfig file
  2023-07-03 23:05 ` Javier Martinez Canillas
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Arnd Bergmann, Helge Deller,
	Randy Dunlap, Javier Martinez Canillas, dri-devel,
	Geert Uytterhoeven, Andy Shevchenko, Sam Ravnborg

The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and
core fbdev symbols, that can be enabled independently of the fbdev drivers.

Split the Kconfig in two, one that only has the symbols for fbdev drivers
and another one that contains the fbdev core symbols.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v1)

 drivers/video/fbdev/Kconfig      | 203 +------------------------------
 drivers/video/fbdev/core/Kconfig | 202 ++++++++++++++++++++++++++++++
 2 files changed, 204 insertions(+), 201 deletions(-)
 create mode 100644 drivers/video/fbdev/core/Kconfig

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index cecf15418632..06199f044546 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -3,9 +3,6 @@
 # fbdev configuration
 #
 
-config FB_NOTIFY
-	bool
-
 menuconfig FB
 	tristate "Support for frame buffer devices"
 	select FB_NOTIFY
@@ -42,204 +39,6 @@ menuconfig FB
 	  (e.g. an accelerated X server) and that are not frame buffer
 	  device-aware may cause unexpected results. If unsure, say N.
 
-config FIRMWARE_EDID
-	bool "Enable firmware EDID"
-	depends on FB
-	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
-	  transfers do not work for your driver and if you are using
-	  nvidiafb, i810fb or savagefb.
-
-	  In general, choosing Y for this option is safe.  If you
-	  experience extremely long delays while booting before you get
-	  something on your display, try setting this to N.  Matrox cards in
-	  combination with certain motherboards and monitors are known to
-	  suffer from this problem.
-
-config FB_DEVICE
-	bool "Provide legacy /dev/fb* device"
-	depends on FB
-	default y
-	help
-	  Say Y here if you want the legacy /dev/fb* device file and
-	  interfaces within sysfs anc procfs. It is only required if you
-	  have userspace programs that depend on fbdev for graphics output.
-	  This does not affect the framebuffer console. If unsure, say N.
-
-config FB_DDC
-	tristate
-	depends on FB
-	select I2C_ALGOBIT
-	select I2C
-
-config FB_CFB_FILLRECT
-	tristate
-	depends on FB
-	help
-	  Include the cfb_fillrect function for generic software rectangle
-	  filling. This is used by drivers that don't provide their own
-	  (accelerated) version.
-
-config FB_CFB_COPYAREA
-	tristate
-	depends on FB
-	help
-	  Include the cfb_copyarea function for generic software area copying.
-	  This is used by drivers that don't provide their own (accelerated)
-	  version.
-
-config FB_CFB_IMAGEBLIT
-	tristate
-	depends on FB
-	help
-	  Include the cfb_imageblit function for generic software image
-	  blitting. This is used by drivers that don't provide their own
-	  (accelerated) version.
-
-config FB_CFB_REV_PIXELS_IN_BYTE
-	bool
-	depends on FB
-	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
-	  byte order to bytes in long order.
-
-config FB_SYS_FILLRECT
-	tristate
-	depends on FB
-	help
-	  Include the sys_fillrect function for generic software rectangle
-	  filling. This is used by drivers that don't provide their own
-	  (accelerated) version and the framebuffer is in system RAM.
-
-config FB_SYS_COPYAREA
-	tristate
-	depends on FB
-	help
-	  Include the sys_copyarea function for generic software area copying.
-	  This is used by drivers that don't provide their own (accelerated)
-	  version and the framebuffer is in system RAM.
-
-config FB_SYS_IMAGEBLIT
-	tristate
-	depends on FB
-	help
-	  Include the sys_imageblit function for generic software image
-	  blitting. This is used by drivers that don't provide their own
-	  (accelerated) version and the framebuffer is in system RAM.
-
-config FB_PROVIDE_GET_FB_UNMAPPED_AREA
-	bool
-	depends on FB
-	help
-	  Allow generic frame-buffer to provide get_fb_unmapped_area
-	  function to provide shareable character device support on nommu.
-
-menuconfig FB_FOREIGN_ENDIAN
-	bool "Framebuffer foreign endianness support"
-	depends on FB
-	help
-	  This menu will let you enable support for the framebuffers with
-	  non-native endianness (e.g. Little-Endian framebuffer on a
-	  Big-Endian machine). Most probably you don't have such hardware,
-	  so it's safe to say "n" here.
-
-choice
-	prompt "Choice endianness support"
-	depends on FB_FOREIGN_ENDIAN
-
-config FB_BOTH_ENDIAN
-	bool "Support for Big- and Little-Endian framebuffers"
-
-config FB_BIG_ENDIAN
-	bool "Support for Big-Endian framebuffers only"
-
-config FB_LITTLE_ENDIAN
-	bool "Support for Little-Endian framebuffers only"
-
-endchoice
-
-config FB_SYS_FOPS
-	tristate
-	depends on FB
-
-config FB_DEFERRED_IO
-	bool
-	depends on FB
-
-config FB_IO_HELPERS
-	bool
-	depends on FB
-	select FB_CFB_COPYAREA
-	select FB_CFB_FILLRECT
-	select FB_CFB_IMAGEBLIT
-
-config FB_SYS_HELPERS
-	bool
-	depends on FB
-	select FB_SYS_COPYAREA
-	select FB_SYS_FILLRECT
-	select FB_SYS_FOPS
-	select FB_SYS_IMAGEBLIT
-
-config FB_SYS_HELPERS_DEFERRED
-	bool
-	depends on FB
-	select FB_DEFERRED_IO
-	select FB_SYS_HELPERS
-
-config FB_HECUBA
-	tristate
-	depends on FB
-	depends on FB_DEFERRED_IO
-
-config FB_SVGALIB
-	tristate
-	depends on FB
-	help
-	  Common utility functions useful to fbdev drivers of VGA-based
-	  cards.
-
-config FB_MACMODES
-	tristate
-	depends on FB
-
-config FB_BACKLIGHT
-	tristate
-	depends on FB
-	select BACKLIGHT_CLASS_DEVICE
-
-config FB_MODE_HELPERS
-	bool "Enable Video Mode Handling Helpers"
-	depends on FB
-	help
-	  This enables functions for handling video modes using the
-	  Generalized Timing Formula and the EDID parser. A few drivers rely
-	  on this feature such as the radeonfb, rivafb, and the i810fb. If
-	  your driver does not take advantage of this feature, choosing Y will
-	  just increase the kernel size by about 5K.
-
-config FB_TILEBLITTING
-	bool "Enable Tile Blitting Support"
-	depends on FB
-	help
-	  This enables tile blitting.  Tile blitting is a drawing technique
-	  where the screen is divided into rectangular sections (tiles), whereas
-	  the standard blitting divides the screen into pixels. Because the
-	  default drawing element is a tile, drawing functions will be passed
-	  parameters in terms of number of tiles instead of number of pixels.
-	  For example, to draw a single character, instead of using bitmaps,
-	  an index to an array of bitmaps will be used.  To clear or move a
-	  rectangular section of a screen, the rectangle will be described in
-	  terms of number of tiles in the x- and y-axis.
-
-	  This is particularly important to one driver, matroxfb.  If
-	  unsure, say N.
-
-comment "Frame buffer hardware drivers"
-	depends on FB
-
 config FB_GRVGA
 	tristate "Aeroflex Gaisler framebuffer support"
 	depends on FB && SPARC
@@ -2244,3 +2043,5 @@ config FB_SM712
 source "drivers/video/fbdev/omap/Kconfig"
 source "drivers/video/fbdev/omap2/Kconfig"
 source "drivers/video/fbdev/mmp/Kconfig"
+
+source "drivers/video/fbdev/core/Kconfig"
diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
new file mode 100644
index 000000000000..8e308d12c57b
--- /dev/null
+++ b/drivers/video/fbdev/core/Kconfig
@@ -0,0 +1,202 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# fbdev core configuration
+#
+
+config FB_NOTIFY
+	bool
+
+config FIRMWARE_EDID
+	bool "Enable firmware EDID"
+	depends on FB
+	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
+	  transfers do not work for your driver and if you are using
+	  nvidiafb, i810fb or savagefb.
+
+	  In general, choosing Y for this option is safe.  If you
+	  experience extremely long delays while booting before you get
+	  something on your display, try setting this to N.  Matrox cards in
+	  combination with certain motherboards and monitors are known to
+	  suffer from this problem.
+
+config FB_DEVICE
+	bool "Provide legacy /dev/fb* device"
+	depends on FB
+	default y
+	help
+	  Say Y here if you want the legacy /dev/fb* device file and
+	  interfaces within sysfs anc procfs. It is only required if you
+	  have userspace programs that depend on fbdev for graphics output.
+	  This does not affect the framebuffer console. If unsure, say N.
+
+config FB_DDC
+	tristate
+	depends on FB
+	select I2C_ALGOBIT
+	select I2C
+
+config FB_CFB_FILLRECT
+	tristate
+	depends on FB
+	help
+	  Include the cfb_fillrect function for generic software rectangle
+	  filling. This is used by drivers that don't provide their own
+	  (accelerated) version.
+
+config FB_CFB_COPYAREA
+	tristate
+	depends on FB
+	help
+	  Include the cfb_copyarea function for generic software area copying.
+	  This is used by drivers that don't provide their own (accelerated)
+	  version.
+
+config FB_CFB_IMAGEBLIT
+	tristate
+	depends on FB
+	help
+	  Include the cfb_imageblit function for generic software image
+	  blitting. This is used by drivers that don't provide their own
+	  (accelerated) version.
+
+config FB_CFB_REV_PIXELS_IN_BYTE
+	bool
+	depends on FB
+	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
+	  byte order to bytes in long order.
+
+config FB_SYS_FILLRECT
+	tristate
+	depends on FB
+	help
+	  Include the sys_fillrect function for generic software rectangle
+	  filling. This is used by drivers that don't provide their own
+	  (accelerated) version and the framebuffer is in system RAM.
+
+config FB_SYS_COPYAREA
+	tristate
+	depends on FB
+	help
+	  Include the sys_copyarea function for generic software area copying.
+	  This is used by drivers that don't provide their own (accelerated)
+	  version and the framebuffer is in system RAM.
+
+config FB_SYS_IMAGEBLIT
+	tristate
+	depends on FB
+	help
+	  Include the sys_imageblit function for generic software image
+	  blitting. This is used by drivers that don't provide their own
+	  (accelerated) version and the framebuffer is in system RAM.
+
+config FB_PROVIDE_GET_FB_UNMAPPED_AREA
+	bool
+	depends on FB
+	help
+	  Allow generic frame-buffer to provide get_fb_unmapped_area
+	  function to provide shareable character device support on nommu.
+
+menuconfig FB_FOREIGN_ENDIAN
+	bool "Framebuffer foreign endianness support"
+	depends on FB
+	help
+	  This menu will let you enable support for the framebuffers with
+	  non-native endianness (e.g. Little-Endian framebuffer on a
+	  Big-Endian machine). Most probably you don't have such hardware,
+	  so it's safe to say "n" here.
+
+choice
+	prompt "Choice endianness support"
+	depends on FB_FOREIGN_ENDIAN
+
+config FB_BOTH_ENDIAN
+	bool "Support for Big- and Little-Endian framebuffers"
+
+config FB_BIG_ENDIAN
+	bool "Support for Big-Endian framebuffers only"
+
+config FB_LITTLE_ENDIAN
+	bool "Support for Little-Endian framebuffers only"
+
+endchoice
+
+config FB_SYS_FOPS
+	tristate
+	depends on FB
+
+config FB_DEFERRED_IO
+	bool
+	depends on FB
+
+config FB_IO_HELPERS
+	bool
+	depends on FB
+	select FB_CFB_COPYAREA
+	select FB_CFB_FILLRECT
+	select FB_CFB_IMAGEBLIT
+
+config FB_SYS_HELPERS
+	bool
+	depends on FB
+	select FB_SYS_COPYAREA
+	select FB_SYS_FILLRECT
+	select FB_SYS_FOPS
+	select FB_SYS_IMAGEBLIT
+
+config FB_SYS_HELPERS_DEFERRED
+	bool
+	depends on FB
+	select FB_DEFERRED_IO
+	select FB_SYS_HELPERS
+
+config FB_HECUBA
+	tristate
+	depends on FB
+	depends on FB_DEFERRED_IO
+
+config FB_SVGALIB
+	tristate
+	depends on FB
+	help
+	  Common utility functions useful to fbdev drivers of VGA-based
+	  cards.
+
+config FB_MACMODES
+	tristate
+	depends on FB
+
+config FB_BACKLIGHT
+	tristate
+	depends on FB
+	select BACKLIGHT_CLASS_DEVICE
+
+config FB_MODE_HELPERS
+	bool "Enable Video Mode Handling Helpers"
+	depends on FB
+	help
+	  This enables functions for handling video modes using the
+	  Generalized Timing Formula and the EDID parser. A few drivers rely
+	  on this feature such as the radeonfb, rivafb, and the i810fb. If
+	  your driver does not take advantage of this feature, choosing Y will
+	  just increase the kernel size by about 5K.
+
+config FB_TILEBLITTING
+	bool "Enable Tile Blitting Support"
+	depends on FB
+	help
+	  This enables tile blitting.  Tile blitting is a drawing technique
+	  where the screen is divided into rectangular sections (tiles), whereas
+	  the standard blitting divides the screen into pixels. Because the
+	  default drawing element is a tile, drawing functions will be passed
+	  parameters in terms of number of tiles instead of number of pixels.
+	  For example, to draw a single character, instead of using bitmaps,
+	  an index to an array of bitmaps will be used.  To clear or move a
+	  rectangular section of a screen, the rectangle will be described in
+	  terms of number of tiles in the x- and y-axis.
+
+	  This is particularly important to one driver, matroxfb.  If
+	  unsure, say N.
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 2/5] fbdev: Move core fbdev symbols to a separate Kconfig file
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geert Uytterhoeven, Thomas Zimmermann, Arnd Bergmann,
	Javier Martinez Canillas, Andy Shevchenko, Daniel Vetter,
	Helge Deller, Randy Dunlap, Sam Ravnborg, dri-devel, linux-fbdev

The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and
core fbdev symbols, that can be enabled independently of the fbdev drivers.

Split the Kconfig in two, one that only has the symbols for fbdev drivers
and another one that contains the fbdev core symbols.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v1)

 drivers/video/fbdev/Kconfig      | 203 +------------------------------
 drivers/video/fbdev/core/Kconfig | 202 ++++++++++++++++++++++++++++++
 2 files changed, 204 insertions(+), 201 deletions(-)
 create mode 100644 drivers/video/fbdev/core/Kconfig

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index cecf15418632..06199f044546 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -3,9 +3,6 @@
 # fbdev configuration
 #
 
-config FB_NOTIFY
-	bool
-
 menuconfig FB
 	tristate "Support for frame buffer devices"
 	select FB_NOTIFY
@@ -42,204 +39,6 @@ menuconfig FB
 	  (e.g. an accelerated X server) and that are not frame buffer
 	  device-aware may cause unexpected results. If unsure, say N.
 
-config FIRMWARE_EDID
-	bool "Enable firmware EDID"
-	depends on FB
-	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
-	  transfers do not work for your driver and if you are using
-	  nvidiafb, i810fb or savagefb.
-
-	  In general, choosing Y for this option is safe.  If you
-	  experience extremely long delays while booting before you get
-	  something on your display, try setting this to N.  Matrox cards in
-	  combination with certain motherboards and monitors are known to
-	  suffer from this problem.
-
-config FB_DEVICE
-	bool "Provide legacy /dev/fb* device"
-	depends on FB
-	default y
-	help
-	  Say Y here if you want the legacy /dev/fb* device file and
-	  interfaces within sysfs anc procfs. It is only required if you
-	  have userspace programs that depend on fbdev for graphics output.
-	  This does not affect the framebuffer console. If unsure, say N.
-
-config FB_DDC
-	tristate
-	depends on FB
-	select I2C_ALGOBIT
-	select I2C
-
-config FB_CFB_FILLRECT
-	tristate
-	depends on FB
-	help
-	  Include the cfb_fillrect function for generic software rectangle
-	  filling. This is used by drivers that don't provide their own
-	  (accelerated) version.
-
-config FB_CFB_COPYAREA
-	tristate
-	depends on FB
-	help
-	  Include the cfb_copyarea function for generic software area copying.
-	  This is used by drivers that don't provide their own (accelerated)
-	  version.
-
-config FB_CFB_IMAGEBLIT
-	tristate
-	depends on FB
-	help
-	  Include the cfb_imageblit function for generic software image
-	  blitting. This is used by drivers that don't provide their own
-	  (accelerated) version.
-
-config FB_CFB_REV_PIXELS_IN_BYTE
-	bool
-	depends on FB
-	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
-	  byte order to bytes in long order.
-
-config FB_SYS_FILLRECT
-	tristate
-	depends on FB
-	help
-	  Include the sys_fillrect function for generic software rectangle
-	  filling. This is used by drivers that don't provide their own
-	  (accelerated) version and the framebuffer is in system RAM.
-
-config FB_SYS_COPYAREA
-	tristate
-	depends on FB
-	help
-	  Include the sys_copyarea function for generic software area copying.
-	  This is used by drivers that don't provide their own (accelerated)
-	  version and the framebuffer is in system RAM.
-
-config FB_SYS_IMAGEBLIT
-	tristate
-	depends on FB
-	help
-	  Include the sys_imageblit function for generic software image
-	  blitting. This is used by drivers that don't provide their own
-	  (accelerated) version and the framebuffer is in system RAM.
-
-config FB_PROVIDE_GET_FB_UNMAPPED_AREA
-	bool
-	depends on FB
-	help
-	  Allow generic frame-buffer to provide get_fb_unmapped_area
-	  function to provide shareable character device support on nommu.
-
-menuconfig FB_FOREIGN_ENDIAN
-	bool "Framebuffer foreign endianness support"
-	depends on FB
-	help
-	  This menu will let you enable support for the framebuffers with
-	  non-native endianness (e.g. Little-Endian framebuffer on a
-	  Big-Endian machine). Most probably you don't have such hardware,
-	  so it's safe to say "n" here.
-
-choice
-	prompt "Choice endianness support"
-	depends on FB_FOREIGN_ENDIAN
-
-config FB_BOTH_ENDIAN
-	bool "Support for Big- and Little-Endian framebuffers"
-
-config FB_BIG_ENDIAN
-	bool "Support for Big-Endian framebuffers only"
-
-config FB_LITTLE_ENDIAN
-	bool "Support for Little-Endian framebuffers only"
-
-endchoice
-
-config FB_SYS_FOPS
-	tristate
-	depends on FB
-
-config FB_DEFERRED_IO
-	bool
-	depends on FB
-
-config FB_IO_HELPERS
-	bool
-	depends on FB
-	select FB_CFB_COPYAREA
-	select FB_CFB_FILLRECT
-	select FB_CFB_IMAGEBLIT
-
-config FB_SYS_HELPERS
-	bool
-	depends on FB
-	select FB_SYS_COPYAREA
-	select FB_SYS_FILLRECT
-	select FB_SYS_FOPS
-	select FB_SYS_IMAGEBLIT
-
-config FB_SYS_HELPERS_DEFERRED
-	bool
-	depends on FB
-	select FB_DEFERRED_IO
-	select FB_SYS_HELPERS
-
-config FB_HECUBA
-	tristate
-	depends on FB
-	depends on FB_DEFERRED_IO
-
-config FB_SVGALIB
-	tristate
-	depends on FB
-	help
-	  Common utility functions useful to fbdev drivers of VGA-based
-	  cards.
-
-config FB_MACMODES
-	tristate
-	depends on FB
-
-config FB_BACKLIGHT
-	tristate
-	depends on FB
-	select BACKLIGHT_CLASS_DEVICE
-
-config FB_MODE_HELPERS
-	bool "Enable Video Mode Handling Helpers"
-	depends on FB
-	help
-	  This enables functions for handling video modes using the
-	  Generalized Timing Formula and the EDID parser. A few drivers rely
-	  on this feature such as the radeonfb, rivafb, and the i810fb. If
-	  your driver does not take advantage of this feature, choosing Y will
-	  just increase the kernel size by about 5K.
-
-config FB_TILEBLITTING
-	bool "Enable Tile Blitting Support"
-	depends on FB
-	help
-	  This enables tile blitting.  Tile blitting is a drawing technique
-	  where the screen is divided into rectangular sections (tiles), whereas
-	  the standard blitting divides the screen into pixels. Because the
-	  default drawing element is a tile, drawing functions will be passed
-	  parameters in terms of number of tiles instead of number of pixels.
-	  For example, to draw a single character, instead of using bitmaps,
-	  an index to an array of bitmaps will be used.  To clear or move a
-	  rectangular section of a screen, the rectangle will be described in
-	  terms of number of tiles in the x- and y-axis.
-
-	  This is particularly important to one driver, matroxfb.  If
-	  unsure, say N.
-
-comment "Frame buffer hardware drivers"
-	depends on FB
-
 config FB_GRVGA
 	tristate "Aeroflex Gaisler framebuffer support"
 	depends on FB && SPARC
@@ -2244,3 +2043,5 @@ config FB_SM712
 source "drivers/video/fbdev/omap/Kconfig"
 source "drivers/video/fbdev/omap2/Kconfig"
 source "drivers/video/fbdev/mmp/Kconfig"
+
+source "drivers/video/fbdev/core/Kconfig"
diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
new file mode 100644
index 000000000000..8e308d12c57b
--- /dev/null
+++ b/drivers/video/fbdev/core/Kconfig
@@ -0,0 +1,202 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# fbdev core configuration
+#
+
+config FB_NOTIFY
+	bool
+
+config FIRMWARE_EDID
+	bool "Enable firmware EDID"
+	depends on FB
+	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
+	  transfers do not work for your driver and if you are using
+	  nvidiafb, i810fb or savagefb.
+
+	  In general, choosing Y for this option is safe.  If you
+	  experience extremely long delays while booting before you get
+	  something on your display, try setting this to N.  Matrox cards in
+	  combination with certain motherboards and monitors are known to
+	  suffer from this problem.
+
+config FB_DEVICE
+	bool "Provide legacy /dev/fb* device"
+	depends on FB
+	default y
+	help
+	  Say Y here if you want the legacy /dev/fb* device file and
+	  interfaces within sysfs anc procfs. It is only required if you
+	  have userspace programs that depend on fbdev for graphics output.
+	  This does not affect the framebuffer console. If unsure, say N.
+
+config FB_DDC
+	tristate
+	depends on FB
+	select I2C_ALGOBIT
+	select I2C
+
+config FB_CFB_FILLRECT
+	tristate
+	depends on FB
+	help
+	  Include the cfb_fillrect function for generic software rectangle
+	  filling. This is used by drivers that don't provide their own
+	  (accelerated) version.
+
+config FB_CFB_COPYAREA
+	tristate
+	depends on FB
+	help
+	  Include the cfb_copyarea function for generic software area copying.
+	  This is used by drivers that don't provide their own (accelerated)
+	  version.
+
+config FB_CFB_IMAGEBLIT
+	tristate
+	depends on FB
+	help
+	  Include the cfb_imageblit function for generic software image
+	  blitting. This is used by drivers that don't provide their own
+	  (accelerated) version.
+
+config FB_CFB_REV_PIXELS_IN_BYTE
+	bool
+	depends on FB
+	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
+	  byte order to bytes in long order.
+
+config FB_SYS_FILLRECT
+	tristate
+	depends on FB
+	help
+	  Include the sys_fillrect function for generic software rectangle
+	  filling. This is used by drivers that don't provide their own
+	  (accelerated) version and the framebuffer is in system RAM.
+
+config FB_SYS_COPYAREA
+	tristate
+	depends on FB
+	help
+	  Include the sys_copyarea function for generic software area copying.
+	  This is used by drivers that don't provide their own (accelerated)
+	  version and the framebuffer is in system RAM.
+
+config FB_SYS_IMAGEBLIT
+	tristate
+	depends on FB
+	help
+	  Include the sys_imageblit function for generic software image
+	  blitting. This is used by drivers that don't provide their own
+	  (accelerated) version and the framebuffer is in system RAM.
+
+config FB_PROVIDE_GET_FB_UNMAPPED_AREA
+	bool
+	depends on FB
+	help
+	  Allow generic frame-buffer to provide get_fb_unmapped_area
+	  function to provide shareable character device support on nommu.
+
+menuconfig FB_FOREIGN_ENDIAN
+	bool "Framebuffer foreign endianness support"
+	depends on FB
+	help
+	  This menu will let you enable support for the framebuffers with
+	  non-native endianness (e.g. Little-Endian framebuffer on a
+	  Big-Endian machine). Most probably you don't have such hardware,
+	  so it's safe to say "n" here.
+
+choice
+	prompt "Choice endianness support"
+	depends on FB_FOREIGN_ENDIAN
+
+config FB_BOTH_ENDIAN
+	bool "Support for Big- and Little-Endian framebuffers"
+
+config FB_BIG_ENDIAN
+	bool "Support for Big-Endian framebuffers only"
+
+config FB_LITTLE_ENDIAN
+	bool "Support for Little-Endian framebuffers only"
+
+endchoice
+
+config FB_SYS_FOPS
+	tristate
+	depends on FB
+
+config FB_DEFERRED_IO
+	bool
+	depends on FB
+
+config FB_IO_HELPERS
+	bool
+	depends on FB
+	select FB_CFB_COPYAREA
+	select FB_CFB_FILLRECT
+	select FB_CFB_IMAGEBLIT
+
+config FB_SYS_HELPERS
+	bool
+	depends on FB
+	select FB_SYS_COPYAREA
+	select FB_SYS_FILLRECT
+	select FB_SYS_FOPS
+	select FB_SYS_IMAGEBLIT
+
+config FB_SYS_HELPERS_DEFERRED
+	bool
+	depends on FB
+	select FB_DEFERRED_IO
+	select FB_SYS_HELPERS
+
+config FB_HECUBA
+	tristate
+	depends on FB
+	depends on FB_DEFERRED_IO
+
+config FB_SVGALIB
+	tristate
+	depends on FB
+	help
+	  Common utility functions useful to fbdev drivers of VGA-based
+	  cards.
+
+config FB_MACMODES
+	tristate
+	depends on FB
+
+config FB_BACKLIGHT
+	tristate
+	depends on FB
+	select BACKLIGHT_CLASS_DEVICE
+
+config FB_MODE_HELPERS
+	bool "Enable Video Mode Handling Helpers"
+	depends on FB
+	help
+	  This enables functions for handling video modes using the
+	  Generalized Timing Formula and the EDID parser. A few drivers rely
+	  on this feature such as the radeonfb, rivafb, and the i810fb. If
+	  your driver does not take advantage of this feature, choosing Y will
+	  just increase the kernel size by about 5K.
+
+config FB_TILEBLITTING
+	bool "Enable Tile Blitting Support"
+	depends on FB
+	help
+	  This enables tile blitting.  Tile blitting is a drawing technique
+	  where the screen is divided into rectangular sections (tiles), whereas
+	  the standard blitting divides the screen into pixels. Because the
+	  default drawing element is a tile, drawing functions will be passed
+	  parameters in terms of number of tiles instead of number of pixels.
+	  For example, to draw a single character, instead of using bitmaps,
+	  an index to an array of bitmaps will be used.  To clear or move a
+	  rectangular section of a screen, the rectangle will be described in
+	  terms of number of tiles in the x- and y-axis.
+
+	  This is particularly important to one driver, matroxfb.  If
+	  unsure, say N.
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 3/5] drm/arm: Make ARM devices menu depend on DRM
  2023-07-03 23:05 ` Javier Martinez Canillas
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Zimmermann, Arnd Bergmann, Liviu Dudau,
	Javier Martinez Canillas, dri-devel, Geert Uytterhoeven

Otherwise if CONFIG_DRM is disabled, menuconfig will show an empty menu.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v1)

 drivers/gpu/drm/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig
index c1b89274d2a4..ddf20708370f 100644
--- a/drivers/gpu/drm/arm/Kconfig
+++ b/drivers/gpu/drm/arm/Kconfig
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 menu "ARM devices"
+	depends on DRM
 
 config DRM_HDLCD
 	tristate "ARM HDLCD"
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 3/5] drm/arm: Make ARM devices menu depend on DRM
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geert Uytterhoeven, Thomas Zimmermann, Arnd Bergmann,
	Javier Martinez Canillas, Daniel Vetter, David Airlie,
	Liviu Dudau, dri-devel

Otherwise if CONFIG_DRM is disabled, menuconfig will show an empty menu.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v1)

 drivers/gpu/drm/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig
index c1b89274d2a4..ddf20708370f 100644
--- a/drivers/gpu/drm/arm/Kconfig
+++ b/drivers/gpu/drm/arm/Kconfig
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 menu "ARM devices"
+	depends on DRM
 
 config DRM_HDLCD
 	tristate "ARM HDLCD"
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols
  2023-07-03 23:05 ` Javier Martinez Canillas
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: x86, linux-fbdev, Randy Dunlap, Arnd Bergmann,
	Greg Kroah-Hartman, Helge Deller, Dave Hansen,
	Javier Martinez Canillas, dri-devel, Ingo Molnar,
	Borislav Petkov, Thomas Zimmermann, H. Peter Anvin,
	Geert Uytterhoeven, Thomas Gleixner, Andy Shevchenko,
	Sam Ravnborg

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>
---

Changes in v4:
- Fix menuconfig hierarchy that was broken in v3 (Arnd Bergmann).

Changes in v3:
- Really make a hidden symbol by removing the prompt (Arnd Bergmann).
- Change FB_CORE to config instead of menuconfig (Arnd Bergmann).
- Keep "depends on FB" for FIRMWARE_EDID (Arnd Bergmann).
- Compile out fb_backlight.o and fbmon.o that are only needed for FB
  (Arnd Bergmann).
- Make FB_DEVICE to depend on FB_CORE instead of selecting it.

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       | 10 ++++++++--
 drivers/video/fbdev/core/Kconfig  | 30 +++++++++++++++++-------------
 drivers/video/fbdev/core/Makefile |  8 ++++----
 6 files changed, 32 insertions(+), 22 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 06199f044546..179e728aff5d 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -4,9 +4,9 @@
 #
 
 menuconfig FB
-	tristate "Support for frame buffer devices"
+	tristate "Support for frame buffer device drivers"
+	select FB_CORE
 	select FB_NOTIFY
-	select VIDEO_CMDLINE
 	help
 	  The frame buffer device provides an abstraction for the graphics
 	  hardware. It represents the frame buffer of some video hardware and
@@ -30,6 +30,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.
 
diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
index 8e308d12c57b..15ce529d579a 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..2cd213716c12 100644
--- a/drivers/video/fbdev/core/Makefile
+++ b/drivers/video/fbdev/core/Makefile
@@ -1,10 +1,10 @@
 # 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
+fb-$(CONFIG_FB)                   += fb_backlight.o fbmon.o
 fb-$(CONFIG_FB_DEFERRED_IO)       += fb_defio.o
 fb-$(CONFIG_FB_DEVICE)            += fb_chrdev.o \
                                      fb_procfs.o \
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geert Uytterhoeven, Thomas Zimmermann, Arnd Bergmann,
	Javier Martinez Canillas, Andy Shevchenko, Borislav Petkov,
	Daniel Vetter, Dave Hansen, Greg Kroah-Hartman, H. Peter Anvin,
	Helge Deller, Ingo Molnar, Randy Dunlap, Sam Ravnborg,
	Thomas Gleixner, dri-devel, linux-fbdev, x86

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>
---

Changes in v4:
- Fix menuconfig hierarchy that was broken in v3 (Arnd Bergmann).

Changes in v3:
- Really make a hidden symbol by removing the prompt (Arnd Bergmann).
- Change FB_CORE to config instead of menuconfig (Arnd Bergmann).
- Keep "depends on FB" for FIRMWARE_EDID (Arnd Bergmann).
- Compile out fb_backlight.o and fbmon.o that are only needed for FB
  (Arnd Bergmann).
- Make FB_DEVICE to depend on FB_CORE instead of selecting it.

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       | 10 ++++++++--
 drivers/video/fbdev/core/Kconfig  | 30 +++++++++++++++++-------------
 drivers/video/fbdev/core/Makefile |  8 ++++----
 6 files changed, 32 insertions(+), 22 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 06199f044546..179e728aff5d 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -4,9 +4,9 @@
 #
 
 menuconfig FB
-	tristate "Support for frame buffer devices"
+	tristate "Support for frame buffer device drivers"
+	select FB_CORE
 	select FB_NOTIFY
-	select VIDEO_CMDLINE
 	help
 	  The frame buffer device provides an abstraction for the graphics
 	  hardware. It represents the frame buffer of some video hardware and
@@ -30,6 +30,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.
 
diff --git a/drivers/video/fbdev/core/Kconfig b/drivers/video/fbdev/core/Kconfig
index 8e308d12c57b..15ce529d579a 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..2cd213716c12 100644
--- a/drivers/video/fbdev/core/Makefile
+++ b/drivers/video/fbdev/core/Makefile
@@ -1,10 +1,10 @@
 # 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
+fb-$(CONFIG_FB)                   += fb_backlight.o fbmon.o
 fb-$(CONFIG_FB_DEFERRED_IO)       += fb_defio.o
 fb-$(CONFIG_FB_DEVICE)            += fb_chrdev.o \
                                      fb_procfs.o \
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 5/5] drm: Make FB_CORE to be selected if DRM fbdev emulation is enabled
  2023-07-03 23:05 ` Javier Martinez Canillas
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Zimmermann, Arnd Bergmann, Javier Martinez Canillas,
	Maxime Ripard, Geert Uytterhoeven, dri-devel

Now that fbdev core has been split in FB_CORE and FB, make the DRM symbol
to select the FB_CORE option if the DRM fbdev emulation layer is enabled.

This allows to disable the CONFIG_FB option if is not needed, which will
avoid the need to explicitly disable each of the legacy fbdev drivers.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v3)

Changes in v3:
- Make the DRM symbol to select FB_CORE if DRM_FBDEV_EMULATION is
  enabled (Arnd Bergmann).
- Also make DRM select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
- Make DRM_FBDEV_EMULATION to depend on DRM instead of DRM_KMS_HELPER.

Changes in v2:
- Make CONFIG_DRM_FBDEV_EMULATION to select FB_CORE (Thomas Zimmermann).

 drivers/gpu/drm/Kconfig | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index afb3b2f5f425..775564558152 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -9,6 +9,9 @@ menuconfig DRM
 	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
 	depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
 	select DRM_PANEL_ORIENTATION_QUIRKS
+	select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
+	select FB_CORE if DRM_FBDEV_EMULATION
+	select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
 	select HDMI
 	select I2C
 	select DMA_SHARED_BUFFER
@@ -95,7 +98,6 @@ config DRM_KUNIT_TEST
 config DRM_KMS_HELPER
 	tristate
 	depends on DRM
-	select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
 	help
 	  CRTC helpers for KMS drivers.
 
@@ -131,8 +133,7 @@ config DRM_DEBUG_MODESET_LOCK
 
 config DRM_FBDEV_EMULATION
 	bool "Enable legacy fbdev support for your modesetting driver"
-	depends on DRM_KMS_HELPER
-	depends on FB=y || FB=DRM_KMS_HELPER
+	depends on DRM
 	select FRAMEBUFFER_CONSOLE if !EXPERT
 	select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
 	default y
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [PATCH v4 5/5] drm: Make FB_CORE to be selected if DRM fbdev emulation is enabled
@ 2023-07-03 23:05   ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-03 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geert Uytterhoeven, Thomas Zimmermann, Arnd Bergmann,
	Javier Martinez Canillas, Daniel Vetter, David Airlie,
	Maarten Lankhorst, Maxime Ripard, dri-devel

Now that fbdev core has been split in FB_CORE and FB, make the DRM symbol
to select the FB_CORE option if the DRM fbdev emulation layer is enabled.

This allows to disable the CONFIG_FB option if is not needed, which will
avoid the need to explicitly disable each of the legacy fbdev drivers.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v3)

Changes in v3:
- Make the DRM symbol to select FB_CORE if DRM_FBDEV_EMULATION is
  enabled (Arnd Bergmann).
- Also make DRM select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
- Make DRM_FBDEV_EMULATION to depend on DRM instead of DRM_KMS_HELPER.

Changes in v2:
- Make CONFIG_DRM_FBDEV_EMULATION to select FB_CORE (Thomas Zimmermann).

 drivers/gpu/drm/Kconfig | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index afb3b2f5f425..775564558152 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -9,6 +9,9 @@ menuconfig DRM
 	tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
 	depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
 	select DRM_PANEL_ORIENTATION_QUIRKS
+	select DRM_KMS_HELPER if DRM_FBDEV_EMULATION
+	select FB_CORE if DRM_FBDEV_EMULATION
+	select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
 	select HDMI
 	select I2C
 	select DMA_SHARED_BUFFER
@@ -95,7 +98,6 @@ config DRM_KUNIT_TEST
 config DRM_KMS_HELPER
 	tristate
 	depends on DRM
-	select FB_SYS_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
 	help
 	  CRTC helpers for KMS drivers.
 
@@ -131,8 +133,7 @@ config DRM_DEBUG_MODESET_LOCK
 
 config DRM_FBDEV_EMULATION
 	bool "Enable legacy fbdev support for your modesetting driver"
-	depends on DRM_KMS_HELPER
-	depends on FB=y || FB=DRM_KMS_HELPER
+	depends on DRM
 	select FRAMEBUFFER_CONSOLE if !EXPERT
 	select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
 	default y
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 2/5] fbdev: Move core fbdev symbols to a separate Kconfig file
  2023-07-03 23:05   ` Javier Martinez Canillas
@ 2023-07-04  7:17     ` Andy Shevchenko
  -1 siblings, 0 replies; 34+ messages in thread
From: Andy Shevchenko @ 2023-07-04  7:17 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Geert Uytterhoeven, Thomas Zimmermann,
	Arnd Bergmann, Daniel Vetter, Helge Deller, Randy Dunlap,
	Sam Ravnborg, dri-devel, linux-fbdev

On Tue, Jul 04, 2023 at 01:05:26AM +0200, Javier Martinez Canillas wrote:
> The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and
> core fbdev symbols, that can be enabled independently of the fbdev drivers.
> 
> Split the Kconfig in two, one that only has the symbols for fbdev drivers
> and another one that contains the fbdev core symbols.

...

>  source "drivers/video/fbdev/omap/Kconfig"
>  source "drivers/video/fbdev/omap2/Kconfig"
>  source "drivers/video/fbdev/mmp/Kconfig"
> +
> +source "drivers/video/fbdev/core/Kconfig"

Hmm... Shan't we start Kconfig from core options?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 2/5] fbdev: Move core fbdev symbols to a separate Kconfig file
@ 2023-07-04  7:17     ` Andy Shevchenko
  0 siblings, 0 replies; 34+ messages in thread
From: Andy Shevchenko @ 2023-07-04  7:17 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-fbdev, Thomas Zimmermann, Arnd Bergmann, Helge Deller,
	Randy Dunlap, linux-kernel, dri-devel, Geert Uytterhoeven,
	Sam Ravnborg

On Tue, Jul 04, 2023 at 01:05:26AM +0200, Javier Martinez Canillas wrote:
> The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and
> core fbdev symbols, that can be enabled independently of the fbdev drivers.
> 
> Split the Kconfig in two, one that only has the symbols for fbdev drivers
> and another one that contains the fbdev core symbols.

...

>  source "drivers/video/fbdev/omap/Kconfig"
>  source "drivers/video/fbdev/omap2/Kconfig"
>  source "drivers/video/fbdev/mmp/Kconfig"
> +
> +source "drivers/video/fbdev/core/Kconfig"

Hmm... Shan't we start Kconfig from core options?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols
  2023-07-03 23:05   ` Javier Martinez Canillas
@ 2023-07-04  7:20     ` Andy Shevchenko
  -1 siblings, 0 replies; 34+ messages in thread
From: Andy Shevchenko @ 2023-07-04  7:20 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Geert Uytterhoeven, Thomas Zimmermann,
	Arnd Bergmann, Borislav Petkov, Daniel Vetter, Dave Hansen,
	Greg Kroah-Hartman, H. Peter Anvin, Helge Deller, Ingo Molnar,
	Randy Dunlap, Sam Ravnborg, Thomas Gleixner, dri-devel,
	linux-fbdev, x86

On Tue, Jul 04, 2023 at 01:05:28AM +0200, 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).
> 
> 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.

...

Wondering if

  if FB_CORE
  ...
  endif

makes Kconfig looking better instead of replacing all these "depends on" lines.

>  config FB_DEVICE
>  	bool "Provide legacy /dev/fb* device"
> -	depends on FB
> +	depends on FB_CORE
>  	default y

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols
@ 2023-07-04  7:20     ` Andy Shevchenko
  0 siblings, 0 replies; 34+ messages in thread
From: Andy Shevchenko @ 2023-07-04  7:20 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: x86, linux-fbdev, Randy Dunlap, Thomas Zimmermann, Arnd Bergmann,
	Greg Kroah-Hartman, Helge Deller, Dave Hansen, linux-kernel,
	dri-devel, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Geert Uytterhoeven, Thomas Gleixner, Sam Ravnborg

On Tue, Jul 04, 2023 at 01:05:28AM +0200, 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).
> 
> 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.

...

Wondering if

  if FB_CORE
  ...
  endif

makes Kconfig looking better instead of replacing all these "depends on" lines.

>  config FB_DEVICE
>  	bool "Provide legacy /dev/fb* device"
> -	depends on FB
> +	depends on FB_CORE
>  	default y

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols
  2023-07-04  7:20     ` Andy Shevchenko
@ 2023-07-04  7:21       ` Andy Shevchenko
  -1 siblings, 0 replies; 34+ messages in thread
From: Andy Shevchenko @ 2023-07-04  7:21 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: x86, linux-fbdev, Randy Dunlap, Thomas Zimmermann, Arnd Bergmann,
	Greg Kroah-Hartman, Helge Deller, Dave Hansen, linux-kernel,
	dri-devel, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Geert Uytterhoeven, Thomas Gleixner, Sam Ravnborg

On Tue, Jul 04, 2023 at 10:20:35AM +0300, Andy Shevchenko wrote:
> On Tue, Jul 04, 2023 at 01:05:28AM +0200, Javier Martinez Canillas wrote:

...

> Wondering if
> 
>   if FB_CORE
>   ...
>   endif
> 
> makes Kconfig looking better instead of replacing all these "depends on" lines.

I meant user visible effect (via `make *config` and in the source code.

> >  config FB_DEVICE
> >  	bool "Provide legacy /dev/fb* device"
> > -	depends on FB
> > +	depends on FB_CORE
> >  	default y

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols
@ 2023-07-04  7:21       ` Andy Shevchenko
  0 siblings, 0 replies; 34+ messages in thread
From: Andy Shevchenko @ 2023-07-04  7:21 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Geert Uytterhoeven, Thomas Zimmermann,
	Arnd Bergmann, Borislav Petkov, Daniel Vetter, Dave Hansen,
	Greg Kroah-Hartman, H. Peter Anvin, Helge Deller, Ingo Molnar,
	Randy Dunlap, Sam Ravnborg, Thomas Gleixner, dri-devel,
	linux-fbdev, x86

On Tue, Jul 04, 2023 at 10:20:35AM +0300, Andy Shevchenko wrote:
> On Tue, Jul 04, 2023 at 01:05:28AM +0200, Javier Martinez Canillas wrote:

...

> Wondering if
> 
>   if FB_CORE
>   ...
>   endif
> 
> makes Kconfig looking better instead of replacing all these "depends on" lines.

I meant user visible effect (via `make *config` and in the source code.

> >  config FB_DEVICE
> >  	bool "Provide legacy /dev/fb* device"
> > -	depends on FB
> > +	depends on FB_CORE
> >  	default y

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
  2023-07-03 23:05   ` Javier Martinez Canillas
@ 2023-07-04  7:37     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2023-07-04  7:37 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Thomas Zimmermann, Arnd Bergmann,
	Greg Kroah-Hartman, Helge Deller, Jacek Lawrynowicz, Nipun Gupta,
	Oded Gabbay, dri-devel, linux-fbdev

Hi Javier,

On Tue, Jul 4, 2023 at 1:05 AM Javier Martinez Canillas
<javierm@redhat.com> wrote:
> The drivers in this subsystem are for character-based LCD displays, which
> can fall into the same category of the DRM/KMS and fbdev drivers that are
> located under the "Graphics support" menu. Add auxdisplay there as well.
>
> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

Thanks for your patch!

> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -30,6 +30,8 @@ if HAS_IOMEM
>  config HAVE_FB_ATMEL
>         bool
>
> +source "drivers/auxdisplay/Kconfig"

This is inside the "if HAS_IOMEM" section, while there was no
such limitation before.

> +
>  source "drivers/char/agp/Kconfig"
>
>  source "drivers/gpu/vga/Kconfig"

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
@ 2023-07-04  7:37     ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2023-07-04  7:37 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-fbdev, Arnd Bergmann, Nipun Gupta, Greg Kroah-Hartman,
	Helge Deller, linux-kernel, dri-devel, Jacek Lawrynowicz,
	Thomas Zimmermann, Oded Gabbay

Hi Javier,

On Tue, Jul 4, 2023 at 1:05 AM Javier Martinez Canillas
<javierm@redhat.com> wrote:
> The drivers in this subsystem are for character-based LCD displays, which
> can fall into the same category of the DRM/KMS and fbdev drivers that are
> located under the "Graphics support" menu. Add auxdisplay there as well.
>
> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

Thanks for your patch!

> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -30,6 +30,8 @@ if HAS_IOMEM
>  config HAVE_FB_ATMEL
>         bool
>
> +source "drivers/auxdisplay/Kconfig"

This is inside the "if HAS_IOMEM" section, while there was no
such limitation before.

> +
>  source "drivers/char/agp/Kconfig"
>
>  source "drivers/gpu/vga/Kconfig"

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
  2023-07-04  7:37     ` Geert Uytterhoeven
@ 2023-07-04  7:54       ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-04  7:54 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-fbdev, Arnd Bergmann, Nipun Gupta, Greg Kroah-Hartman,
	Helge Deller, linux-kernel, dri-devel, Jacek Lawrynowicz,
	Thomas Zimmermann, Oded Gabbay

Geert Uytterhoeven <geert@linux-m68k.org> writes:

Hello Geert,

> Hi Javier,
>
> On Tue, Jul 4, 2023 at 1:05 AM Javier Martinez Canillas
> <javierm@redhat.com> wrote:
>> The drivers in this subsystem are for character-based LCD displays, which
>> can fall into the same category of the DRM/KMS and fbdev drivers that are
>> located under the "Graphics support" menu. Add auxdisplay there as well.
>>
>> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
>
> Thanks for your patch!
>
>> --- a/drivers/video/Kconfig
>> +++ b/drivers/video/Kconfig
>> @@ -30,6 +30,8 @@ if HAS_IOMEM
>>  config HAVE_FB_ATMEL
>>         bool
>>
>> +source "drivers/auxdisplay/Kconfig"
>
> This is inside the "if HAS_IOMEM" section, while there was no
> such limitation before.
>

Gah, I missed that. Thanks a lot for pointing it out.

If I move the source outside of the if block, are you OK with this patch?

I think Thomas is correct and would make sense to put the character-based
drivers next to the DRM and fbdev drivers since all these are for display.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
@ 2023-07-04  7:54       ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-04  7:54 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-kernel, Thomas Zimmermann, Arnd Bergmann,
	Greg Kroah-Hartman, Helge Deller, Jacek Lawrynowicz, Nipun Gupta,
	Oded Gabbay, dri-devel, linux-fbdev

Geert Uytterhoeven <geert@linux-m68k.org> writes:

Hello Geert,

> Hi Javier,
>
> On Tue, Jul 4, 2023 at 1:05 AM Javier Martinez Canillas
> <javierm@redhat.com> wrote:
>> The drivers in this subsystem are for character-based LCD displays, which
>> can fall into the same category of the DRM/KMS and fbdev drivers that are
>> located under the "Graphics support" menu. Add auxdisplay there as well.
>>
>> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
>
> Thanks for your patch!
>
>> --- a/drivers/video/Kconfig
>> +++ b/drivers/video/Kconfig
>> @@ -30,6 +30,8 @@ if HAS_IOMEM
>>  config HAVE_FB_ATMEL
>>         bool
>>
>> +source "drivers/auxdisplay/Kconfig"
>
> This is inside the "if HAS_IOMEM" section, while there was no
> such limitation before.
>

Gah, I missed that. Thanks a lot for pointing it out.

If I move the source outside of the if block, are you OK with this patch?

I think Thomas is correct and would make sense to put the character-based
drivers next to the DRM and fbdev drivers since all these are for display.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols
  2023-07-04  7:20     ` Andy Shevchenko
@ 2023-07-04  7:56       ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-04  7:56 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, Geert Uytterhoeven, Thomas Zimmermann,
	Arnd Bergmann, Borislav Petkov, Daniel Vetter, Dave Hansen,
	Greg Kroah-Hartman, H. Peter Anvin, Helge Deller, Ingo Molnar,
	Randy Dunlap, Sam Ravnborg, Thomas Gleixner, dri-devel,
	linux-fbdev, x86


Hello Andy,

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> On Tue, Jul 04, 2023 at 01:05:28AM +0200, 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).
>> 
>> 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.
>
> ...
>
> Wondering if
>
>   if FB_CORE
>   ...
>   endif
>
> makes Kconfig looking better instead of replacing all these "depends on" lines.
>

Yes, I discussed that with Arnd and he said that the if / endif is just
syntax sugar so I didn't do that change to keep the patches simpler. But
is something that you could change as a follow-up if you prefer that way.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols
@ 2023-07-04  7:56       ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-04  7:56 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: x86, linux-fbdev, Randy Dunlap, Thomas Zimmermann, Arnd Bergmann,
	Greg Kroah-Hartman, Helge Deller, Dave Hansen, linux-kernel,
	dri-devel, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Geert Uytterhoeven, Thomas Gleixner, Sam Ravnborg


Hello Andy,

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> On Tue, Jul 04, 2023 at 01:05:28AM +0200, 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).
>> 
>> 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.
>
> ...
>
> Wondering if
>
>   if FB_CORE
>   ...
>   endif
>
> makes Kconfig looking better instead of replacing all these "depends on" lines.
>

Yes, I discussed that with Arnd and he said that the if / endif is just
syntax sugar so I didn't do that change to keep the patches simpler. But
is something that you could change as a follow-up if you prefer that way.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 2/5] fbdev: Move core fbdev symbols to a separate Kconfig file
  2023-07-04  7:17     ` Andy Shevchenko
@ 2023-07-04  7:58       ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-04  7:58 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, Geert Uytterhoeven, Thomas Zimmermann,
	Arnd Bergmann, Daniel Vetter, Helge Deller, Randy Dunlap,
	Sam Ravnborg, dri-devel, linux-fbdev

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> On Tue, Jul 04, 2023 at 01:05:26AM +0200, Javier Martinez Canillas wrote:
>> The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and
>> core fbdev symbols, that can be enabled independently of the fbdev drivers.
>> 
>> Split the Kconfig in two, one that only has the symbols for fbdev drivers
>> and another one that contains the fbdev core symbols.
>
> ...
>
>>  source "drivers/video/fbdev/omap/Kconfig"
>>  source "drivers/video/fbdev/omap2/Kconfig"
>>  source "drivers/video/fbdev/mmp/Kconfig"
>> +
>> +source "drivers/video/fbdev/core/Kconfig"
>
> Hmm... Shan't we start Kconfig from core options?
>

I added after the drivers because Geert said that preferred that way
(unless I misunderstood him from our conversations in IRC).

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 2/5] fbdev: Move core fbdev symbols to a separate Kconfig file
@ 2023-07-04  7:58       ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-04  7:58 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-fbdev, Thomas Zimmermann, Arnd Bergmann, Helge Deller,
	Randy Dunlap, linux-kernel, dri-devel, Geert Uytterhoeven,
	Sam Ravnborg

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> On Tue, Jul 04, 2023 at 01:05:26AM +0200, Javier Martinez Canillas wrote:
>> The drivers/video/fbdev/Kconfig defines both symbols for fbdev drivers and
>> core fbdev symbols, that can be enabled independently of the fbdev drivers.
>> 
>> Split the Kconfig in two, one that only has the symbols for fbdev drivers
>> and another one that contains the fbdev core symbols.
>
> ...
>
>>  source "drivers/video/fbdev/omap/Kconfig"
>>  source "drivers/video/fbdev/omap2/Kconfig"
>>  source "drivers/video/fbdev/mmp/Kconfig"
>> +
>> +source "drivers/video/fbdev/core/Kconfig"
>
> Hmm... Shan't we start Kconfig from core options?
>

I added after the drivers because Geert said that preferred that way
(unless I misunderstood him from our conversations in IRC).

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
  2023-07-04  7:54       ` Javier Martinez Canillas
@ 2023-07-04  8:01         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2023-07-04  8:01 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Thomas Zimmermann, Arnd Bergmann,
	Greg Kroah-Hartman, Helge Deller, Jacek Lawrynowicz, Nipun Gupta,
	Oded Gabbay, dri-devel, linux-fbdev

Hi Javier,

On Tue, Jul 4, 2023 at 9:54 AM Javier Martinez Canillas
<javierm@redhat.com> wrote:
> Geert Uytterhoeven <geert@linux-m68k.org> writes:
> > On Tue, Jul 4, 2023 at 1:05 AM Javier Martinez Canillas
> > <javierm@redhat.com> wrote:
> >> The drivers in this subsystem are for character-based LCD displays, which
> >> can fall into the same category of the DRM/KMS and fbdev drivers that are
> >> located under the "Graphics support" menu. Add auxdisplay there as well.
> >>
> >> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
> >> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> >
> > Thanks for your patch!
> >
> >> --- a/drivers/video/Kconfig
> >> +++ b/drivers/video/Kconfig
> >> @@ -30,6 +30,8 @@ if HAS_IOMEM
> >>  config HAVE_FB_ATMEL
> >>         bool
> >>
> >> +source "drivers/auxdisplay/Kconfig"
> >
> > This is inside the "if HAS_IOMEM" section, while there was no
> > such limitation before.
> >
>
> Gah, I missed that. Thanks a lot for pointing it out.
>
> If I move the source outside of the if block, are you OK with this patch?
>
> I think Thomas is correct and would make sense to put the character-based
> drivers next to the DRM and fbdev drivers since all these are for display.

Yes, makes sense to me.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
@ 2023-07-04  8:01         ` Geert Uytterhoeven
  0 siblings, 0 replies; 34+ messages in thread
From: Geert Uytterhoeven @ 2023-07-04  8:01 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-fbdev, Arnd Bergmann, Nipun Gupta, Greg Kroah-Hartman,
	Helge Deller, linux-kernel, dri-devel, Jacek Lawrynowicz,
	Thomas Zimmermann, Oded Gabbay

Hi Javier,

On Tue, Jul 4, 2023 at 9:54 AM Javier Martinez Canillas
<javierm@redhat.com> wrote:
> Geert Uytterhoeven <geert@linux-m68k.org> writes:
> > On Tue, Jul 4, 2023 at 1:05 AM Javier Martinez Canillas
> > <javierm@redhat.com> wrote:
> >> The drivers in this subsystem are for character-based LCD displays, which
> >> can fall into the same category of the DRM/KMS and fbdev drivers that are
> >> located under the "Graphics support" menu. Add auxdisplay there as well.
> >>
> >> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
> >> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> >
> > Thanks for your patch!
> >
> >> --- a/drivers/video/Kconfig
> >> +++ b/drivers/video/Kconfig
> >> @@ -30,6 +30,8 @@ if HAS_IOMEM
> >>  config HAVE_FB_ATMEL
> >>         bool
> >>
> >> +source "drivers/auxdisplay/Kconfig"
> >
> > This is inside the "if HAS_IOMEM" section, while there was no
> > such limitation before.
> >
>
> Gah, I missed that. Thanks a lot for pointing it out.
>
> If I move the source outside of the if block, are you OK with this patch?
>
> I think Thomas is correct and would make sense to put the character-based
> drivers next to the DRM and fbdev drivers since all these are for display.

Yes, makes sense to me.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
  2023-07-04  8:01         ` Geert Uytterhoeven
@ 2023-07-04  8:05           ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-04  8:05 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-kernel, Thomas Zimmermann, Arnd Bergmann,
	Greg Kroah-Hartman, Helge Deller, Jacek Lawrynowicz, Nipun Gupta,
	Oded Gabbay, dri-devel, linux-fbdev

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> Hi Javier,

[...]

>> > This is inside the "if HAS_IOMEM" section, while there was no
>> > such limitation before.
>> >
>>
>> Gah, I missed that. Thanks a lot for pointing it out.
>>
>> If I move the source outside of the if block, are you OK with this patch?
>>
>> I think Thomas is correct and would make sense to put the character-based
>> drivers next to the DRM and fbdev drivers since all these are for display.
>
> Yes, makes sense to me.
>

Good to know. Thanks!

> Gr{oetje,eeting}s,

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu
@ 2023-07-04  8:05           ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-04  8:05 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-fbdev, Arnd Bergmann, Nipun Gupta, Greg Kroah-Hartman,
	Helge Deller, linux-kernel, dri-devel, Jacek Lawrynowicz,
	Thomas Zimmermann, Oded Gabbay

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> Hi Javier,

[...]

>> > This is inside the "if HAS_IOMEM" section, while there was no
>> > such limitation before.
>> >
>>
>> Gah, I missed that. Thanks a lot for pointing it out.
>>
>> If I move the source outside of the if block, are you OK with this patch?
>>
>> I think Thomas is correct and would make sense to put the character-based
>> drivers next to the DRM and fbdev drivers since all these are for display.
>
> Yes, makes sense to me.
>

Good to know. Thanks!

> Gr{oetje,eeting}s,

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 3/5] drm/arm: Make ARM devices menu depend on DRM
  2023-07-03 23:05   ` Javier Martinez Canillas
@ 2023-07-04 16:12     ` Liviu Dudau
  -1 siblings, 0 replies; 34+ messages in thread
From: Liviu Dudau @ 2023-07-04 16:12 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Geert Uytterhoeven, Thomas Zimmermann,
	Arnd Bergmann, Daniel Vetter, David Airlie, dri-devel

On Tue, Jul 04, 2023 at 01:05:27AM +0200, Javier Martinez Canillas wrote:
> Otherwise if CONFIG_DRM is disabled, menuconfig will show an empty menu.
> 
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
> 
> (no changes since v1)
> 
>  drivers/gpu/drm/arm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig
> index c1b89274d2a4..ddf20708370f 100644
> --- a/drivers/gpu/drm/arm/Kconfig
> +++ b/drivers/gpu/drm/arm/Kconfig
> @@ -1,5 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0
>  menu "ARM devices"
> +	depends on DRM
>  
>  config DRM_HDLCD
>  	tristate "ARM HDLCD"
> -- 
> 2.41.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 3/5] drm/arm: Make ARM devices menu depend on DRM
@ 2023-07-04 16:12     ` Liviu Dudau
  0 siblings, 0 replies; 34+ messages in thread
From: Liviu Dudau @ 2023-07-04 16:12 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Zimmermann, Arnd Bergmann, linux-kernel, dri-devel,
	Geert Uytterhoeven

On Tue, Jul 04, 2023 at 01:05:27AM +0200, Javier Martinez Canillas wrote:
> Otherwise if CONFIG_DRM is disabled, menuconfig will show an empty menu.
> 
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
> 
> (no changes since v1)
> 
>  drivers/gpu/drm/arm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig
> index c1b89274d2a4..ddf20708370f 100644
> --- a/drivers/gpu/drm/arm/Kconfig
> +++ b/drivers/gpu/drm/arm/Kconfig
> @@ -1,5 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0
>  menu "ARM devices"
> +	depends on DRM
>  
>  config DRM_HDLCD
>  	tristate "ARM HDLCD"
> -- 
> 2.41.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 3/5] drm/arm: Make ARM devices menu depend on DRM
  2023-07-04 16:12     ` Liviu Dudau
@ 2023-07-10 16:57       ` Javier Martinez Canillas
  -1 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-10 16:57 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: dri-devel, Geert Uytterhoeven, Arnd Bergmann, Thomas Zimmermann,
	linux-kernel

Liviu Dudau <liviu.dudau@arm.com> writes:

Hello Liviu,

> On Tue, Jul 04, 2023 at 01:05:27AM +0200, Javier Martinez Canillas wrote:
>> Otherwise if CONFIG_DRM is disabled, menuconfig will show an empty menu.
>> 
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
>
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>
>

Thanks! I've pushed this to drm-misc-next since is really a fix that's
independent of the other patches in the set.

> Best regards,
> Liviu
>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [PATCH v4 3/5] drm/arm: Make ARM devices menu depend on DRM
@ 2023-07-10 16:57       ` Javier Martinez Canillas
  0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2023-07-10 16:57 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Thomas Zimmermann, Arnd Bergmann, linux-kernel, dri-devel,
	Geert Uytterhoeven

Liviu Dudau <liviu.dudau@arm.com> writes:

Hello Liviu,

> On Tue, Jul 04, 2023 at 01:05:27AM +0200, Javier Martinez Canillas wrote:
>> Otherwise if CONFIG_DRM is disabled, menuconfig will show an empty menu.
>> 
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
>
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>
>

Thanks! I've pushed this to drm-misc-next since is really a fix that's
independent of the other patches in the set.

> Best regards,
> Liviu
>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2023-07-10 16:58 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 23:05 [PATCH v4 0/5] Allow disabling all native fbdev drivers and only keeping DRM emulation Javier Martinez Canillas
2023-07-03 23:05 ` Javier Martinez Canillas
2023-07-03 23:05 ` [PATCH v4 1/5] video: Add auxiliary display drivers to Graphics support menu Javier Martinez Canillas
2023-07-03 23:05   ` Javier Martinez Canillas
2023-07-04  7:37   ` Geert Uytterhoeven
2023-07-04  7:37     ` Geert Uytterhoeven
2023-07-04  7:54     ` Javier Martinez Canillas
2023-07-04  7:54       ` Javier Martinez Canillas
2023-07-04  8:01       ` Geert Uytterhoeven
2023-07-04  8:01         ` Geert Uytterhoeven
2023-07-04  8:05         ` Javier Martinez Canillas
2023-07-04  8:05           ` Javier Martinez Canillas
2023-07-03 23:05 ` [PATCH v4 2/5] fbdev: Move core fbdev symbols to a separate Kconfig file Javier Martinez Canillas
2023-07-03 23:05   ` Javier Martinez Canillas
2023-07-04  7:17   ` Andy Shevchenko
2023-07-04  7:17     ` Andy Shevchenko
2023-07-04  7:58     ` Javier Martinez Canillas
2023-07-04  7:58       ` Javier Martinez Canillas
2023-07-03 23:05 ` [PATCH v4 3/5] drm/arm: Make ARM devices menu depend on DRM Javier Martinez Canillas
2023-07-03 23:05   ` Javier Martinez Canillas
2023-07-04 16:12   ` Liviu Dudau
2023-07-04 16:12     ` Liviu Dudau
2023-07-10 16:57     ` Javier Martinez Canillas
2023-07-10 16:57       ` Javier Martinez Canillas
2023-07-03 23:05 ` [PATCH v4 4/5] fbdev: Split frame buffer support in FB and FB_CORE symbols Javier Martinez Canillas
2023-07-03 23:05   ` Javier Martinez Canillas
2023-07-04  7:20   ` Andy Shevchenko
2023-07-04  7:20     ` Andy Shevchenko
2023-07-04  7:21     ` Andy Shevchenko
2023-07-04  7:21       ` Andy Shevchenko
2023-07-04  7:56     ` Javier Martinez Canillas
2023-07-04  7:56       ` Javier Martinez Canillas
2023-07-03 23:05 ` [PATCH v4 5/5] drm: Make FB_CORE to be selected if DRM fbdev emulation is enabled Javier Martinez Canillas
2023-07-03 23:05   ` Javier Martinez Canillas

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.