[PATCH 11/11] video: Add a note about the broken implementation
Simon Glass
sjg at chromium.org
Mon Feb 6 18:12:36 CET 2023
Hi Heinrich,
On Sun, 5 Feb 2023 at 14:25, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
>
>
> Am 5. Februar 2023 20:46:27 MEZ schrieb Simon Glass <sjg at chromium.org>:
> >The cls command is broken. Previous discussion about this was at [1] and
> >[2]. For now, add a note to the source code.
> >
> >[1] https://patchwork.ozlabs.org/project/uboot/patch/
> > 20221022092058.106052-1-heinrich.schuchardt at canonical.com/
> >[2] https://patchwork.ozlabs.org/project/uboot/patch/
> > 20230106145243.411626-12-sjg at chromium.org/
> >
> >Signed-off-by: Simon Glass <sjg at chromium.org>
> >---
> >
> > cmd/cls.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> >diff --git a/cmd/cls.c b/cmd/cls.c
> >index 073ba5a6c86..1125a3f81bb 100644
> >--- a/cmd/cls.c
> >+++ b/cmd/cls.c
> >@@ -17,7 +17,13 @@ static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
> > {
> > __maybe_unused struct udevice *dev;
> >
> >- /* Send clear screen and home */
> >+ /*
> >+ * Send clear screen and home
> >+ *
> >+ * FIXME(Heinrich Schuchardt <xypron.glpk at gmx.de>): This should go
> >+ * through an API and only be written to serial terminals, not video
> >+ * displays
> >+ */
> > printf(CSI "2J" CSI "1;1H");
>
> All our console drivers understand this escape sequence as we use it in the EFI subsystem. Writing to video is just fine.
With CONFIG_VIDEO_ANSI that might be true, but for boards that want to
save the code, it is not.
In any case, my opinion has not changed on this. It needs an API, not
ad-hoc printf() all over the place :-)
Regards,
Simon
More information about the U-Boot
mailing list