public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] video: make vidconsole commands optional
@ 2020-05-25 19:47 Anatolij Gustschin
  2020-05-25 21:37 ` Simon Glass
  2020-06-19 13:50 ` Anatolij Gustschin
  0 siblings, 2 replies; 5+ messages in thread
From: Anatolij Gustschin @ 2020-05-25 19:47 UTC (permalink / raw)
  To: u-boot

Converting some boards to DM_VIDEO results in build breakage due
to increased code size. Make video console specific commands
optional to recude binary size.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/video/Kconfig             | 8 ++++++++
 drivers/video/vidconsole-uclass.c | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 28c22fe525..eb5e26644a 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -35,6 +35,14 @@ config BACKLIGHT_GPIO
 	  it understands the standard device tree
 	  (leds/backlight/gpio-backlight.txt)
 
+config CMD_VIDCONSOLE
+	bool "Enable vidconsole commands lcdputs and setcurs"
+	depends on DM_VIDEO
+	default y
+	help
+	  Enabling this will provide 'setcurs' and 'lcdputs' commands which
+	  support cursor positioning and drawing strings on video framebuffer.
+
 config VIDEO_BPP8
 	bool "Support 8-bit-per-pixel displays"
 	depends on DM_VIDEO
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index d30e6db6f6..901347c467 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -613,6 +613,7 @@ UCLASS_DRIVER(vidconsole) = {
 	.per_device_auto_alloc_size	= sizeof(struct vidconsole_priv),
 };
 
+#if CONFIG_IS_ENABLED(CMD_VIDCONSOLE)
 void vidconsole_position_cursor(struct udevice *dev, unsigned col, unsigned row)
 {
 	struct vidconsole_priv *priv = dev_get_uclass_priv(dev);
@@ -673,3 +674,4 @@ U_BOOT_CMD(
 	"print string on video framebuffer",
 	"    <string>"
 );
+#endif /* CONFIG_IS_ENABLED(CMD_VIDCONSOLE) */
-- 
2.17.1

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

* [PATCH] video: make vidconsole commands optional
  2020-05-25 19:47 [PATCH] video: make vidconsole commands optional Anatolij Gustschin
@ 2020-05-25 21:37 ` Simon Glass
  2020-05-25 21:45   ` Anatolij Gustschin
  2020-06-19 13:50 ` Anatolij Gustschin
  1 sibling, 1 reply; 5+ messages in thread
From: Simon Glass @ 2020-05-25 21:37 UTC (permalink / raw)
  To: u-boot

Hi Anatolij,

On Mon, 25 May 2020 at 13:47, Anatolij Gustschin <agust@denx.de> wrote:
>
> Converting some boards to DM_VIDEO results in build breakage due
> to increased code size. Make video console specific commands
> optional to recude binary size.

reduce

Which board is this? I'd just like to check that it is expected.

>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  drivers/video/Kconfig             | 8 ++++++++
>  drivers/video/vidconsole-uclass.c | 2 ++
>  2 files changed, 10 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Regards,
Simon

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

* [PATCH] video: make vidconsole commands optional
  2020-05-25 21:37 ` Simon Glass
@ 2020-05-25 21:45   ` Anatolij Gustschin
  2020-05-25 21:49     ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Anatolij Gustschin @ 2020-05-25 21:45 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Mon, 25 May 2020 15:37:33 -0600
Simon Glass sjg at chromium.org wrote:
...
> > optional to recude binary size.  
> 
> reduce

I'll fix it in v2, thanks!

> Which board is this? I'd just like to check that it is expected.

this is tbs2910 board which makes most trouble currently.
I'm trying to make backlight, panel and simple panel code optional as
well, this could save us a few more bytes.

...
> >  drivers/video/Kconfig             | 8 ++++++++
> >  drivers/video/vidconsole-uclass.c | 2 ++
> >  2 files changed, 10 insertions(+)  
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>

Thanks!

--
Anatolij

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

* [PATCH] video: make vidconsole commands optional
  2020-05-25 21:45   ` Anatolij Gustschin
@ 2020-05-25 21:49     ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2020-05-25 21:49 UTC (permalink / raw)
  To: u-boot

Hi Anatolij,

On Mon, 25 May 2020 at 15:45, Anatolij Gustschin <agust@denx.de> wrote:
>
> Hi Simon,
>
> On Mon, 25 May 2020 15:37:33 -0600
> Simon Glass sjg at chromium.org wrote:
> ...
> > > optional to recude binary size.
> >
> > reduce
>
> I'll fix it in v2, thanks!
>
> > Which board is this? I'd just like to check that it is expected.
>
> this is tbs2910 board which makes most trouble currently.
> I'm trying to make backlight, panel and simple panel code optional as
> well, this could save us a few more bytes.

OK I see. Yes, those definitely increase the size.

Regards,
Simon

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

* [PATCH] video: make vidconsole commands optional
  2020-05-25 19:47 [PATCH] video: make vidconsole commands optional Anatolij Gustschin
  2020-05-25 21:37 ` Simon Glass
@ 2020-06-19 13:50 ` Anatolij Gustschin
  1 sibling, 0 replies; 5+ messages in thread
From: Anatolij Gustschin @ 2020-06-19 13:50 UTC (permalink / raw)
  To: u-boot

On Mon, 25 May 2020 21:47:19 +0200
Anatolij Gustschin agust at denx.de wrote:

> Converting some boards to DM_VIDEO results in build breakage due
> to increased code size. Make video console specific commands
> optional to recude binary size.
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  drivers/video/Kconfig             | 8 ++++++++
>  drivers/video/vidconsole-uclass.c | 2 ++
>  2 files changed, 10 insertions(+)

Applied to u-boot-video/next, thanks!

--
Anatolij

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

end of thread, other threads:[~2020-06-19 13:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-25 19:47 [PATCH] video: make vidconsole commands optional Anatolij Gustschin
2020-05-25 21:37 ` Simon Glass
2020-05-25 21:45   ` Anatolij Gustschin
2020-05-25 21:49     ` Simon Glass
2020-06-19 13:50 ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox