diff mbox series

[v2,20/27] video: Allow use without CONFIG_CMDLINE

Message ID 20231007231255.277623-21-sjg@chromium.org
State Changes Requested
Delegated to: Tom Rini
Headers show
Series Tidy up use of CONFIG_CMDLINE | expand

Commit Message

Simon Glass Oct. 7, 2023, 11:12 p.m. UTC
Provide a fallback for when CONFIG_SYS_CBSIZE is not provided, so that
the console can still be used.

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

(no changes since v1)

 drivers/video/console_truetype.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c
index 0f9bb49e44f7..8186b5b49f0b 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -124,7 +124,11 @@  struct pos_info {
  * Allow one for each character on the command line plus one for each newline.
  * This is just an estimate, but it should not be exceeded.
  */
+#ifdef CONFIG_SYS_CBSIZE
 #define POS_HISTORY_SIZE	(CONFIG_SYS_CBSIZE * 11 / 10)
+#else
+#define POS_HISTORY_SIZE	(250 * 11 / 10)
+#endif
 
 /**
  * struct console_tt_metrics - Information about a font / size combination