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

Tom Rini trini at konsulko.com
Tue Feb 4 17:49:59 CET 2020


On Mon, Feb 03, 2020 at 10:48:10PM +0100, Anatolij Gustschin wrote:

> 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

I think this is more complex than it needs to be, honestly.  The old
behavior was that all of these options were essentially "default y" but
it also wasn't possible to remove them (in some cases?).  Now that we
can let boards pick what they want, I think we should just go back to
the old behavior of in essence "default y" (and they already have
depends on DM_VIDEO).  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200204/a29fe779/attachment.sig>


More information about the U-Boot mailing list