> Why should a user set this up? only if user need it! by default is 0 no limit
EFI console not usable for some cases: big screen sizes + mux with serial console for example EFI console - fullscreen (1080P) vidconsole - SLUGGISH FRAMERATES AND NOT USABLE CONFIG_CONSOLE_MUX=y CONFIG_CONSOLE_NORMAL=y CONFIG_EFI_CONSOLE_MAX_ROWS=0 CONFIG_EFI_CONSOLE_MAX_COLS=0 https://dl.khadas.com/test/uboot_efi_examples/media/07-EFI_console_example_normal_vidconsole_and_serial_multiplex_adaptation_utf_safe_SLOW_NOT_USABLE.mp4 EFI console - vidconsole with row and column limits - USABLE FRAMERATES CONFIG_CONSOLE_MUX=y CONFIG_CONSOLE_NORMAL=y CONFIG_EFI_CONSOLE_MAX_ROWS=90 CONFIG_EFI_CONSOLE_MAX_COLS=25 https://dl.khadas.com/test/uboot_efi_examples/media/06-EFI_console_example_normal_vidconsole_and_serial_multiplex_adaptation_utf_safe_and_max_cols_90_limit_USABLE.mp4 Please check more information and examples about this + https://dl.khadas.com/test/uboot_efi_examples/#readme On Thu, Aug 5, 2021 at 7:59 PM Heinrich Schuchardt <xypron.g...@gmx.de> wrote: > > On 8/4/21 12:22 PM, Artem Lapkin wrote: > > Setup the max rows and columns limit for the EFI console output. > > Why should a user set this up? > > The size of serial console depends on the remote computers console > windows size. > > The size of a video console depends on the attached monitor. > > So we have to detect the size dynamically. Hardcoding it does not make > any sense. > > Best regards > > Heinrich > > > > > Signed-off-by: Artem Lapkin <a...@khadas.com> > > --- > > lib/efi_loader/Kconfig | 12 ++++++++++++ > > lib/efi_loader/efi_console.c | 5 +++++ > > 2 files changed, 17 insertions(+) > > > > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig > > index dacc3b5881..7d00d6cde5 100644 > > --- a/lib/efi_loader/Kconfig > > +++ b/lib/efi_loader/Kconfig > > @@ -381,4 +381,16 @@ config EFI_ESRT > > help > > Enabling this option creates the ESRT UEFI system table. > > > > +config EFI_CONSOLE_MAX_ROWS > > + int "setup console max rows" > > + default 0 > > + help > > + Set console max rows limit or set to zero to disable limit. > > + > > +config EFI_CONSOLE_MAX_COLS > > + int "setup console max cols" > > + default 0 > > + help > > + Set console max rows limit or set to zero to disable limit. > > + > > endif > > diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c > > index 847069212e..b5d79d788f 100644 > > --- a/lib/efi_loader/efi_console.c > > +++ b/lib/efi_loader/efi_console.c > > @@ -351,6 +351,11 @@ static void query_console_size(void) > > } else if (query_console_serial(&rows, &cols)) > > return; > > > > + if (CONFIG_EFI_CONSOLE_MAX_ROWS > 0) > > + rows = min(rows, CONFIG_EFI_CONSOLE_MAX_ROWS); > > + if (CONFIG_EFI_CONSOLE_MAX_COLS > 0) > > + cols = min(cols, CONFIG_EFI_CONSOLE_MAX_COLS); > > + > > /* Test if we can have Mode 1 */ > > if (cols >= 80 && rows >= 50) { > > efi_cout_modes[1].present = 1; > > >