Re: [U-Boot] [PATCH 4/8] video/console: Implement ANSI clear line command

2019-04-09 Thread Anatolij Gustschin
On Sat, 23 Mar 2019 01:29:58 +
Andre Przywara andre.przyw...@arm.com wrote:

> There is a standard ANSI terminal escape sequence to clear a whole line
> of text. So far the DM_VIDEO console was missing this code.
> 
> Detect the sequence and use vidconsole_set_row with the background
> colour to fix this omission.
> 
> Signed-off-by: Andre Przywara 
> ---
>  drivers/video/vidconsole-uclass.c | 19 +++
>  1 file changed, 19 insertions(+)

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

--
Anatolij
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 4/8] video/console: Implement ANSI clear line command

2019-03-30 Thread Simon Glass
On Fri, 22 Mar 2019 at 19:32, Andre Przywara  wrote:
>
> There is a standard ANSI terminal escape sequence to clear a whole line
> of text. So far the DM_VIDEO console was missing this code.
>
> Detect the sequence and use vidconsole_set_row with the background
> colour to fix this omission.
>
> Signed-off-by: Andre Przywara 
> ---
>  drivers/video/vidconsole-uclass.c | 19 +++
>  1 file changed, 19 insertions(+)
>

Reviewed-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 4/8] video/console: Implement ANSI clear line command

2019-03-22 Thread Andre Przywara
There is a standard ANSI terminal escape sequence to clear a whole line
of text. So far the DM_VIDEO console was missing this code.

Detect the sequence and use vidconsole_set_row with the background
colour to fix this omission.

Signed-off-by: Andre Przywara 
---
 drivers/video/vidconsole-uclass.c | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/drivers/video/vidconsole-uclass.c 
b/drivers/video/vidconsole-uclass.c
index cbd63f0ce8..7d914ed5ca 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -346,6 +346,25 @@ static void vidconsole_escape_char(struct udevice *dev, 
char ch)
}
break;
}
+   case 'K': {
+   struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
+   int mode;
+
+   /*
+* Clear (parts of) current line
+*   [0K   - clear line to end
+*   [2K   - clear entire line
+*/
+   parsenum(priv->escape_buf + 1, );
+
+   if (mode == 2) {
+   int row, col;
+
+   get_cursor_position(priv, , );
+   vidconsole_set_row(dev, row, vid_priv->colour_bg);
+   }
+   break;
+   }
case 'm': {
struct video_priv *vid_priv = dev_get_uclass_priv(dev->parent);
char *s = priv->escape_buf;
-- 
2.14.5

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot