[PATCH] video: add opt out option for VIDEO_BBP selection

Anatolij Gustschin agust at denx.de
Mon Feb 3 22:48:10 CET 2020


Enable all BPP options by default to avoid empty video console
output (this was the case before commit 2cc393f32fd9 ("video: make
BPP and ANSI configs optional")). But also support optional selection
of only required VIDEO_BBP settings.

Signed-off-by: Anatolij Gustschin <agust at denx.de>
---
 drivers/video/Kconfig | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 50ab3650ee..62217fda08 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -35,9 +35,21 @@ config BACKLIGHT_GPIO
 	  it understands the standard device tree
 	  (leds/backlight/gpio-backlight.txt)
 
+config VIDEO_BPP_OPT_OUT
+	bool "Support manual selection of video console BPP"
+	depends on DM_VIDEO
+	help
+	  Enabling this option allows manual selection of the required
+	  VIDEO_BPPxx configuration. By default all BPP options are
+	  enabled to avoid empty console output. Some boards do not use
+	  all BPP options and want to avoid dead code to reduce binary
+	  image size. Let them opt out and select the needed BPP in the
+	  board defconfig file.
+
 config VIDEO_BPP8
 	bool "Support 8-bit-per-pixel displays"
 	depends on DM_VIDEO
+	default y if DM_VIDEO && !VIDEO_BPP_OPT_OUT
 	help
 	  Support drawing text and bitmaps onto a 8-bit-per-pixel display.
 	  Enabling this will include code to support this display. Without
@@ -47,6 +59,7 @@ config VIDEO_BPP8
 config VIDEO_BPP16
 	bool "Support 16-bit-per-pixel displays"
 	depends on DM_VIDEO
+	default y if DM_VIDEO && !VIDEO_BPP_OPT_OUT
 	help
 	  Support drawing text and bitmaps onto a 16-bit-per-pixel display.
 	  Enabling this will include code to support this display. Without
@@ -56,7 +69,7 @@ config VIDEO_BPP16
 config VIDEO_BPP32
 	bool "Support 32-bit-per-pixel displays"
 	depends on DM_VIDEO
-	default y if X86
+	default y if DM_VIDEO && !VIDEO_BPP_OPT_OUT
 	help
 	  Support drawing text and bitmaps onto a 32-bit-per-pixel display.
 	  Enabling this will include code to support this display. Without
-- 
2.17.1



More information about the U-Boot mailing list