[{"id":1766070,"web_url":"http://patchwork.ozlabs.org/comment/1766070/","msgid":"<CAPnjgZ2Ts67j7GkTGAtjEfzVcFZ=O_79kmXg0haqT8_2Ho7mdA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T06:18:00","subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"On 7 September 2017 at 14:28, Rob Clark <robdclark@gmail.com> wrote:\n> Really just the subset that is needed by efi_console.  Perhaps more will\n> be added later, for example color support would be useful to implement\n> efi_cout_set_attribute().\n>\n> Signed-off-by: Rob Clark <robdclark@gmail.com>\n> ---\n>  drivers/video/vidconsole-uclass.c | 112 ++++++++++++++++++++++++++++++++++++++\n>  drivers/video/video-uclass.c      |   4 +-\n>  include/video.h                   |   7 +++\n>  include/video_console.h           |  11 ++++\n>  4 files changed, 131 insertions(+), 3 deletions(-)\n>\n> diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c\n> index e081d5a0ee..7998b4cf5f 100644\n> --- a/drivers/video/vidconsole-uclass.c\n> +++ b/drivers/video/vidconsole-uclass.c\n> @@ -9,6 +9,7 @@\n>   */\n>\n>  #include <common.h>\n> +#include <linux/ctype.h>\n>  #include <dm.h>\n>  #include <video.h>\n>  #include <video_console.h>\n> @@ -107,12 +108,123 @@ static void vidconsole_newline(struct udevice *dev)\n>         video_sync(dev->parent);\n>  }\n>\n> +/*\n> + * Parse a number from string that ends in a non-numeric character..\n> + * sscanf() would be nice.  This is just enough for parsing ANSI escape\n> + * sequences.\n> + */\n> +static char *parsenum(char *s, int *num)\n\nCan you use simple_strtoul() or similar?\n\n> +{\n> +       int n = 0;\n> +\n> +       while (isdigit(*s)) {\n> +               n = (10 * n) + (*s - '0');\n> +               s++;\n> +       }\n> +\n> +       *num = n;\n> +       return s;\n> +}\n> +\n> +static void vidconsole_escape_char(struct udevice *dev, char ch)\n\nPlease add a function comment\n\n> +{\n> +       struct vidconsole_priv *priv = dev_get_uclass_priv(dev);\n> +\n> +       /* Sanity checking for bogus ESC sequences: */\n> +       if (priv->escape_len >= sizeof(priv->escape_buf))\n> +               goto error;\n> +       if (priv->escape_len == 0 && ch != '[')\n> +               goto error;\n> +\n> +       priv->escape_buf[priv->escape_len++] = ch;\n> +\n> +       /*\n> +        * Escape sequences are terminated by a letter, so keep\n> +        * accumulating until we get one:\n> +        */\n> +       if (!isalpha(ch))\n> +               return;\n> +\n> +       /*\n> +        * clear escape mode first, otherwise things will get highly\n> +        * surprising if you hit any debug prints that come back to\n> +        * this console.\n> +        */\n> +       priv->escape = 0;\n> +\n> +       switch (ch) {\n> +       case 'H':\n> +       case 'f': {\n> +               int row, col;\n> +               char *s = priv->escape_buf;\n> +\n> +               /*\n> +                * Set cursor position: [%d;%df or [%d;%dH\n> +                */\n> +               s++;    /* [ */\n> +               s = parsenum(s, &row);\n> +               s++;    /* ; */\n> +               s = parsenum(s, &col);\n> +\n> +               priv->ycur = row * priv->y_charsize;\n> +               priv->xcur_frac = priv->xstart_frac +\n> +                       VID_TO_POS(col * priv->x_charsize);\n> +\n> +               break;\n> +       }\n> +       case 'J': {\n> +               int mode;\n> +\n> +               /*\n> +                * Clear part/all screen:\n> +                *   [J or [0J - clear screen from cursor down\n> +                *   [1J       - clear screen from cursor up\n> +                *   [2J       - clear entire screen\n> +                *\n> +                * TODO we really only handle entire-screen case, others\n> +                * probably require some additions to video-uclass (and\n> +                * are not really needed yet by efi_console)\n> +                */\n> +               parsenum(priv->escape_buf + 1, &mode);\n> +\n> +               if (mode == 2) {\n> +                       video_clear(dev->parent);\n> +                       video_sync(dev->parent);\n> +                       priv->ycur = 0;\n> +                       priv->xcur_frac = priv->xstart_frac;\n> +               } else {\n> +                       debug(\"unsupported clear mode: %d\\n\", mode);\n> +               }\n> +               break;\n> +       }\n> +       default:\n> +               debug(\"unrecognized escape sequence: %*s\\n\",\n> +                     priv->escape_len, priv->escape_buf);\n> +       }\n> +\n> +       return;\n> +\n> +error:\n> +       /* something went wrong, just revert to normal mode: */\n> +       priv->escape = 0;\n> +       return;\n> +}\n> +\n>  int vidconsole_put_char(struct udevice *dev, char ch)\n>  {\n>         struct vidconsole_priv *priv = dev_get_uclass_priv(dev);\n>         int ret;\n>\n> +       if (priv->escape) {\n> +               vidconsole_escape_char(dev, ch);\n> +               return 0;\n> +       }\n\nIs it possible to add a CONFIG_VIDEO_ANSI option to enable this?\nPerhaps it could be on by default. Then:\n\nif (CONFIG_IS_ENABLED(VIDEO_ANSI) && priv-escape) {\n...\n\nThis helps to reduce base code size.\n\n> +\n>         switch (ch) {\n> +       case '\\x1b':\n> +               priv->escape_len = 0;\n> +               priv->escape = 1;\n> +               break;\n>         case '\\a':\n>                 /* beep */\n>                 break;\n> diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c\n> index dfa39b0d1b..dcaceed42c 100644\n> --- a/drivers/video/video-uclass.c\n> +++ b/drivers/video/video-uclass.c\n> @@ -87,7 +87,7 @@ int video_reserve(ulong *addrp)\n>         return 0;\n>  }\n>\n> -static int video_clear(struct udevice *dev)\n> +void video_clear(struct udevice *dev)\n>  {\n>         struct video_priv *priv = dev_get_uclass_priv(dev);\n>\n> @@ -100,8 +100,6 @@ static int video_clear(struct udevice *dev)\n>         } else {\n>                 memset(priv->fb, priv->colour_bg, priv->fb_size);\n>         }\n> -\n> -       return 0;\n>  }\n>\n>  /* Flush video activity to the caches */\n> diff --git a/include/video.h b/include/video.h\n> index 5b4e78b182..61ff653121 100644\n> --- a/include/video.h\n> +++ b/include/video.h\n> @@ -115,6 +115,13 @@ struct video_ops {\n>  int video_reserve(ulong *addrp);\n>\n>  /**\n> + * video_clear() - Clear a device's frame buffer to background color.\n> + *\n> + * @dev:       Device to clear\n> + */\n> +void video_clear(struct udevice *dev);\n> +\n> +/**\n>   * video_sync() - Sync a device's frame buffer with its hardware\n>   *\n>   * Some frame buffers are cached or have a secondary frame buffer. This\n> diff --git a/include/video_console.h b/include/video_console.h\n> index 26047934da..9dce234bd9 100644\n> --- a/include/video_console.h\n> +++ b/include/video_console.h\n> @@ -29,6 +29,9 @@\n>   * @xsize_frac:        Width of the display in fractional units\n>   * @xstart_frac:       Left margin for the text console in fractional units\n>   * @last_ch:   Last character written to the text console on this line\n> + * @escape:    TRUE if currently accumulating an ANSI escape sequence\n> + * @escape_len:        Length of accumulated escape sequence so far\n> + * @escape_buf:        Buffer to accumulate escape sequence\n>   */\n>  struct vidconsole_priv {\n>         struct stdio_dev sdev;\n> @@ -42,6 +45,14 @@ struct vidconsole_priv {\n>         int xsize_frac;\n>         int xstart_frac;\n>         int last_ch;\n> +       /*\n> +        * ANSI escape sequences are accumulated character by character,\n> +        * starting after the ESC char (0x1b) until the entire sequence\n> +        * is consumed at which point it is acted upon.\n> +        */\n> +       int escape;\n> +       int escape_len;\n> +       char escape_buf[32];\n>  };\n>\n>  /**\n> --\n> 2.13.5\n>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"N37wG+UY\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"d2bTb8L/\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrHxT0vVqz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 16:26:05 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid E7200C21ECF; Mon, 11 Sep 2017 06:21:05 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 64CB3C21DED;\n\tMon, 11 Sep 2017 06:21:02 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid A2302C21E8B; Mon, 11 Sep 2017 06:18:26 +0000 (UTC)","from mail-qt0-f175.google.com (mail-qt0-f175.google.com\n\t[209.85.216.175])\n\tby lists.denx.de (Postfix) with ESMTPS id C3C35C21E33\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 06:18:22 +0000 (UTC)","by mail-qt0-f175.google.com with SMTP id k2so17083979qte.2\n\tfor <u-boot@lists.denx.de>; Sun, 10 Sep 2017 23:18:22 -0700 (PDT)","by 10.200.37.200 with HTTP; Sun, 10 Sep 2017 23:18:00 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=fSNKVIiiOpbp5z4X2st9uXN1RYKGXE7TlO8fBxyqtbM=;\n\tb=N37wG+UYEELLr5bCrKw2db1ecBbUJCWOTDgb3sBVyHy3gI1tFwPIGcN/8qO981GxbM\n\t11K/x7L+V1AJXktxOUCjjjX2bz2MM8n9/6t9b492HP37u1zVjhcfPHvXZWBSftfsUhgn\n\tFxTf/dL95Zlfx+MSUNdk5AyqbgGdfByOqNzP/q62ktrybf8mF+4LiquEZx9FPGQ8ckWY\n\tzZz8b6HxinbwhVmUEJmRytjbBYrm6KzxTSfb/BVlxO6LLjzt8sUBk4ecSIxJBWBgr5Di\n\tFKAAOMWGfjXswPuurYbOPcjZw5bIeXoK+9vInqLZfw+PMs9FTPvzLuh780yFw9GJ0IGt\n\tHFlA==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=fSNKVIiiOpbp5z4X2st9uXN1RYKGXE7TlO8fBxyqtbM=;\n\tb=d2bTb8L/Hg/YMYaxBcIwjYsw5yQI3PP2IvR0icRuN1K1D5rbVsQ7ndr8CKmBfVAdQL\n\t6G9oH3/Vb3zB8OYh2APdAoAztTOR0jL6ctKoo2TB3ijKh2XviA6t3Mqny6YZ559E/Oth\n\tI3TPbEynDEZYZQEoG5t4zKEyG6qH6KHrkxfpQ="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=fSNKVIiiOpbp5z4X2st9uXN1RYKGXE7TlO8fBxyqtbM=;\n\tb=WxdWFZ0DreDvDWhez0MBv8VsAlopTtbkALXx4N2h2vTfudFnh0aZqxuDmspt5y7TTr\n\tHR1hXwWyrx7y1QVocfuKbNWUt2pWlJzLL2repoQ7Ld7pGu2TGzRsPMtChSBoFbZJi+WQ\n\twLDut/4cYgFy/HvChGSBZuBM2jzjBw7C7MS1Wfl2D9nrm+hIpvtrxiw/7fURFDqRz7O5\n\tVCx2uMvgvUz1GbdwaG0pn0T9n4ICaGl6YfYW13kgdEKBhjCMuoPjo4FNerk4/u2bCEEl\n\tLI30sLfyT2fFP/MvN3X+dStNNEXyEeeJW3Qk2Eswce9Bb+rmQTZAO/MnNYvRCdKY4pzx\n\tIRNw==","X-Gm-Message-State":"AHPjjUjYxrWuLrov3biWK4pIyqHHL4oDLwU+qLYemKmBsg8EfifzTfkY\n\tKt2e0UmnRiP1SlQvrP2Rx2PzR762Je0A7DkR3DfgO6E+","X-Google-Smtp-Source":"AOwi7QBDIWuzGxtKd3zTSSJHbQOnwqI6j5/RyEtrKAoG631oEgbs94NKWAZrLaeIo8zESq27EwMB7hMUdc9w8JVBP7c=","X-Received":"by 10.200.52.241 with SMTP id x46mr7139493qtb.38.1505110701427; \n\tSun, 10 Sep 2017 23:18:21 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170907202816.18765-1-robdclark@gmail.com>","References":"<20170907202816.18765-1-robdclark@gmail.com>","From":"Simon Glass <sjg@chromium.org>","Date":"Mon, 11 Sep 2017 00:18:00 -0600","X-Google-Sender-Auth":"REEa8EIWR3FFeULoUt3X4GxGFQ8","Message-ID":"<CAPnjgZ2Ts67j7GkTGAtjEfzVcFZ=O_79kmXg0haqT8_2Ho7mdA@mail.gmail.com>","To":"Rob Clark <robdclark@gmail.com>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1766177,"web_url":"http://patchwork.ozlabs.org/comment/1766177/","msgid":"<CAF6AEGvSO_+=Sk+0sNvvgHMu4KYUv6_-6LqiKeULcJhDfUoE0Q@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T09:42:01","subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/","name":"Rob Clark","email":"robdclark@gmail.com"},"content":"On Mon, Sep 11, 2017 at 2:18 AM, Simon Glass <sjg@chromium.org> wrote:\n> On 7 September 2017 at 14:28, Rob Clark <robdclark@gmail.com> wrote:\n>> Really just the subset that is needed by efi_console.  Perhaps more will\n>> be added later, for example color support would be useful to implement\n>> efi_cout_set_attribute().\n>>\n>> Signed-off-by: Rob Clark <robdclark@gmail.com>\n>> ---\n>>  drivers/video/vidconsole-uclass.c | 112 ++++++++++++++++++++++++++++++++++++++\n>>  drivers/video/video-uclass.c      |   4 +-\n>>  include/video.h                   |   7 +++\n>>  include/video_console.h           |  11 ++++\n>>  4 files changed, 131 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c\n>> index e081d5a0ee..7998b4cf5f 100644\n>> --- a/drivers/video/vidconsole-uclass.c\n>> +++ b/drivers/video/vidconsole-uclass.c\n>> @@ -9,6 +9,7 @@\n>>   */\n>>\n>>  #include <common.h>\n>> +#include <linux/ctype.h>\n>>  #include <dm.h>\n>>  #include <video.h>\n>>  #include <video_console.h>\n>> @@ -107,12 +108,123 @@ static void vidconsole_newline(struct udevice *dev)\n>>         video_sync(dev->parent);\n>>  }\n>>\n>> +/*\n>> + * Parse a number from string that ends in a non-numeric character..\n>> + * sscanf() would be nice.  This is just enough for parsing ANSI escape\n>> + * sequences.\n>> + */\n>> +static char *parsenum(char *s, int *num)\n>\n> Can you use simple_strtoul() or similar?\n\nPossibly, but I'm not sure it is a good idea.. I don't think escape\nsequences are meant to be encoded with hex or octal number strings.\nFrom a quick look, I don't see any escape code terminated with 'x', so\nmaybe it would end up working ok.. but something like ESC[0x1234m\nshould be an escape sequence terminated with x followed by normal\nchars 1234m and strtoul would get that wrong..\n\nBR,\n-R\n\n>> +{\n>> +       int n = 0;\n>> +\n>> +       while (isdigit(*s)) {\n>> +               n = (10 * n) + (*s - '0');\n>> +               s++;\n>> +       }\n>> +\n>> +       *num = n;\n>> +       return s;\n>> +}\n>> +\n>> +static void vidconsole_escape_char(struct udevice *dev, char ch)\n>\n> Please add a function comment\n>\n>> +{\n>> +       struct vidconsole_priv *priv = dev_get_uclass_priv(dev);\n>> +\n>> +       /* Sanity checking for bogus ESC sequences: */\n>> +       if (priv->escape_len >= sizeof(priv->escape_buf))\n>> +               goto error;\n>> +       if (priv->escape_len == 0 && ch != '[')\n>> +               goto error;\n>> +\n>> +       priv->escape_buf[priv->escape_len++] = ch;\n>> +\n>> +       /*\n>> +        * Escape sequences are terminated by a letter, so keep\n>> +        * accumulating until we get one:\n>> +        */\n>> +       if (!isalpha(ch))\n>> +               return;\n>> +\n>> +       /*\n>> +        * clear escape mode first, otherwise things will get highly\n>> +        * surprising if you hit any debug prints that come back to\n>> +        * this console.\n>> +        */\n>> +       priv->escape = 0;\n>> +\n>> +       switch (ch) {\n>> +       case 'H':\n>> +       case 'f': {\n>> +               int row, col;\n>> +               char *s = priv->escape_buf;\n>> +\n>> +               /*\n>> +                * Set cursor position: [%d;%df or [%d;%dH\n>> +                */\n>> +               s++;    /* [ */\n>> +               s = parsenum(s, &row);\n>> +               s++;    /* ; */\n>> +               s = parsenum(s, &col);\n>> +\n>> +               priv->ycur = row * priv->y_charsize;\n>> +               priv->xcur_frac = priv->xstart_frac +\n>> +                       VID_TO_POS(col * priv->x_charsize);\n>> +\n>> +               break;\n>> +       }\n>> +       case 'J': {\n>> +               int mode;\n>> +\n>> +               /*\n>> +                * Clear part/all screen:\n>> +                *   [J or [0J - clear screen from cursor down\n>> +                *   [1J       - clear screen from cursor up\n>> +                *   [2J       - clear entire screen\n>> +                *\n>> +                * TODO we really only handle entire-screen case, others\n>> +                * probably require some additions to video-uclass (and\n>> +                * are not really needed yet by efi_console)\n>> +                */\n>> +               parsenum(priv->escape_buf + 1, &mode);\n>> +\n>> +               if (mode == 2) {\n>> +                       video_clear(dev->parent);\n>> +                       video_sync(dev->parent);\n>> +                       priv->ycur = 0;\n>> +                       priv->xcur_frac = priv->xstart_frac;\n>> +               } else {\n>> +                       debug(\"unsupported clear mode: %d\\n\", mode);\n>> +               }\n>> +               break;\n>> +       }\n>> +       default:\n>> +               debug(\"unrecognized escape sequence: %*s\\n\",\n>> +                     priv->escape_len, priv->escape_buf);\n>> +       }\n>> +\n>> +       return;\n>> +\n>> +error:\n>> +       /* something went wrong, just revert to normal mode: */\n>> +       priv->escape = 0;\n>> +       return;\n>> +}\n>> +\n>>  int vidconsole_put_char(struct udevice *dev, char ch)\n>>  {\n>>         struct vidconsole_priv *priv = dev_get_uclass_priv(dev);\n>>         int ret;\n>>\n>> +       if (priv->escape) {\n>> +               vidconsole_escape_char(dev, ch);\n>> +               return 0;\n>> +       }\n>\n> Is it possible to add a CONFIG_VIDEO_ANSI option to enable this?\n> Perhaps it could be on by default. Then:\n>\n> if (CONFIG_IS_ENABLED(VIDEO_ANSI) && priv-escape) {\n> ...\n>\n> This helps to reduce base code size.\n>\n>> +\n>>         switch (ch) {\n>> +       case '\\x1b':\n>> +               priv->escape_len = 0;\n>> +               priv->escape = 1;\n>> +               break;\n>>         case '\\a':\n>>                 /* beep */\n>>                 break;\n>> diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c\n>> index dfa39b0d1b..dcaceed42c 100644\n>> --- a/drivers/video/video-uclass.c\n>> +++ b/drivers/video/video-uclass.c\n>> @@ -87,7 +87,7 @@ int video_reserve(ulong *addrp)\n>>         return 0;\n>>  }\n>>\n>> -static int video_clear(struct udevice *dev)\n>> +void video_clear(struct udevice *dev)\n>>  {\n>>         struct video_priv *priv = dev_get_uclass_priv(dev);\n>>\n>> @@ -100,8 +100,6 @@ static int video_clear(struct udevice *dev)\n>>         } else {\n>>                 memset(priv->fb, priv->colour_bg, priv->fb_size);\n>>         }\n>> -\n>> -       return 0;\n>>  }\n>>\n>>  /* Flush video activity to the caches */\n>> diff --git a/include/video.h b/include/video.h\n>> index 5b4e78b182..61ff653121 100644\n>> --- a/include/video.h\n>> +++ b/include/video.h\n>> @@ -115,6 +115,13 @@ struct video_ops {\n>>  int video_reserve(ulong *addrp);\n>>\n>>  /**\n>> + * video_clear() - Clear a device's frame buffer to background color.\n>> + *\n>> + * @dev:       Device to clear\n>> + */\n>> +void video_clear(struct udevice *dev);\n>> +\n>> +/**\n>>   * video_sync() - Sync a device's frame buffer with its hardware\n>>   *\n>>   * Some frame buffers are cached or have a secondary frame buffer. This\n>> diff --git a/include/video_console.h b/include/video_console.h\n>> index 26047934da..9dce234bd9 100644\n>> --- a/include/video_console.h\n>> +++ b/include/video_console.h\n>> @@ -29,6 +29,9 @@\n>>   * @xsize_frac:        Width of the display in fractional units\n>>   * @xstart_frac:       Left margin for the text console in fractional units\n>>   * @last_ch:   Last character written to the text console on this line\n>> + * @escape:    TRUE if currently accumulating an ANSI escape sequence\n>> + * @escape_len:        Length of accumulated escape sequence so far\n>> + * @escape_buf:        Buffer to accumulate escape sequence\n>>   */\n>>  struct vidconsole_priv {\n>>         struct stdio_dev sdev;\n>> @@ -42,6 +45,14 @@ struct vidconsole_priv {\n>>         int xsize_frac;\n>>         int xstart_frac;\n>>         int last_ch;\n>> +       /*\n>> +        * ANSI escape sequences are accumulated character by character,\n>> +        * starting after the ESC char (0x1b) until the entire sequence\n>> +        * is consumed at which point it is acted upon.\n>> +        */\n>> +       int escape;\n>> +       int escape_len;\n>> +       char escape_buf[32];\n>>  };\n>>\n>>  /**\n>> --\n>> 2.13.5\n>>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"SYSnEktC\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrNHp1XDqz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 19:42:14 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid C70D4C21F06; Mon, 11 Sep 2017 09:42:12 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id B1AF5C21DA9;\n\tMon, 11 Sep 2017 09:42:04 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 1A52FC21DA9; Mon, 11 Sep 2017 09:42:03 +0000 (UTC)","from mail-lf0-f66.google.com (mail-lf0-f66.google.com\n\t[209.85.215.66])\n\tby lists.denx.de (Postfix) with ESMTPS id A24ABC21C3F\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 09:42:02 +0000 (UTC)","by mail-lf0-f66.google.com with SMTP id l196so3669784lfl.3\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 02:42:02 -0700 (PDT)","by 10.46.29.20 with HTTP; Mon, 11 Sep 2017 02:42:01 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=WyYVTpcXmAuwOESu+lBWby8fM+XHYsGg91C+3Mr0CQM=;\n\tb=SYSnEktCaYG/sIqP5v7PIMjxu8xn9drH0JBq8kXWP7l/gYk5LhAID5e3N7QiR5hJ6s\n\tqew7eCoaViSVOGNPE+xWmPy52oWINoEmR4MiYOiIzyRXhxoQJFXgoVSJEZjfRTz5E4BT\n\tv/XqQIUolcC922mn7hxkitcDavnObH4fLoalcFI+pdZjLDigYE8cB0QZL9Aog5qSOtJ/\n\txm+5VCgmrmLChLU6dgoJz7MfGKX6AH1djFrnjiCFT1LPjb1KkwNzbPDT5ZOlccfAs8BC\n\t7PsUgfrWDYMAumnsJgvN1i4xKJqMc83fMoq68nr/TPH5RZG6oZcb91CQiySxVKMvvACo\n\ttFWw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=WyYVTpcXmAuwOESu+lBWby8fM+XHYsGg91C+3Mr0CQM=;\n\tb=UOudOvZYeN6ABFcK4QBUWTk3UujAHHryc8h7tUQBXkOsQkdlZ+5zo7mVwsI4WS8LxJ\n\tKOzUFw49cBFWcMriPFGn6XyQMOMF5aXMYbyNSb7LhG9MMmomG1CArYLBqbUMEp/8qE2h\n\tJundxL7DvoMtRfzeKt6wXcj9JVmuyr6wIJkCmBxQ6izEAwlAWq5oNAI9iW1IQlS30Pkc\n\ttIOgwJOlK7UhE25ybLj6zlvnKp9+gPXWAxxS/Qdf4rw+b6wxkkmArI2VMtalJOuL6nhM\n\tOleaTs83uNSuYua1z+6xcKkpHq+OToLTYC2goA/VmugKStfxgk7xRrGPv8qRIXKbtmtV\n\tWWsg==","X-Gm-Message-State":"AHPjjUglOMuLZmTJBIbX47VVo5YDH5EzgAUbY1BbMM9DduI2QXMLCTHB\n\tFfSNrk7O/gzE/POUoH0CydSuMnZVhA==","X-Google-Smtp-Source":"AOwi7QD3mRbiCa6qtPa0VGsCvhAhZrmNcccjp9QZO+pV4ZEiQf6oUjbpoGc2/yenNAd9uRajwujUM1boB3XEuqYlydY=","X-Received":"by 10.46.22.6 with SMTP id w6mr3575030ljd.52.1505122922111; Mon,\n\t11 Sep 2017 02:42:02 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CAPnjgZ2Ts67j7GkTGAtjEfzVcFZ=O_79kmXg0haqT8_2Ho7mdA@mail.gmail.com>","References":"<20170907202816.18765-1-robdclark@gmail.com>\n\t<CAPnjgZ2Ts67j7GkTGAtjEfzVcFZ=O_79kmXg0haqT8_2Ho7mdA@mail.gmail.com>","From":"Rob Clark <robdclark@gmail.com>","Date":"Mon, 11 Sep 2017 05:42:01 -0400","Message-ID":"<CAF6AEGvSO_+=Sk+0sNvvgHMu4KYUv6_-6LqiKeULcJhDfUoE0Q@mail.gmail.com>","To":"Simon Glass <sjg@chromium.org>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1766253,"web_url":"http://patchwork.ozlabs.org/comment/1766253/","msgid":"<20170911135021.4a51dcb2@karo-electronics.de>","list_archive_url":null,"date":"2017-09-11T11:50:21","subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","submitter":{"id":2554,"url":"http://patchwork.ozlabs.org/api/people/2554/","name":"Lothar Waßmann","email":"LW@KARO-electronics.de"},"content":"Hi,\n\nOn Mon, 11 Sep 2017 05:42:01 -0400 Rob Clark wrote:\n> On Mon, Sep 11, 2017 at 2:18 AM, Simon Glass <sjg@chromium.org> wrote:\n> > On 7 September 2017 at 14:28, Rob Clark <robdclark@gmail.com> wrote:\n> >> Really just the subset that is needed by efi_console.  Perhaps more will\n> >> be added later, for example color support would be useful to implement\n> >> efi_cout_set_attribute().\n> >>\n> >> Signed-off-by: Rob Clark <robdclark@gmail.com>\n> >> ---\n> >>  drivers/video/vidconsole-uclass.c | 112 ++++++++++++++++++++++++++++++++++++++\n> >>  drivers/video/video-uclass.c      |   4 +-\n> >>  include/video.h                   |   7 +++\n> >>  include/video_console.h           |  11 ++++\n> >>  4 files changed, 131 insertions(+), 3 deletions(-)\n> >>\n> >> diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c\n> >> index e081d5a0ee..7998b4cf5f 100644\n> >> --- a/drivers/video/vidconsole-uclass.c\n> >> +++ b/drivers/video/vidconsole-uclass.c\n> >> @@ -9,6 +9,7 @@\n> >>   */\n> >>\n> >>  #include <common.h>\n> >> +#include <linux/ctype.h>\n> >>  #include <dm.h>\n> >>  #include <video.h>\n> >>  #include <video_console.h>\n> >> @@ -107,12 +108,123 @@ static void vidconsole_newline(struct udevice *dev)\n> >>         video_sync(dev->parent);\n> >>  }\n> >>\n> >> +/*\n> >> + * Parse a number from string that ends in a non-numeric character..\n> >> + * sscanf() would be nice.  This is just enough for parsing ANSI escape\n> >> + * sequences.\n> >> + */\n> >> +static char *parsenum(char *s, int *num)\n> >\n> > Can you use simple_strtoul() or similar?\n> \n> Possibly, but I'm not sure it is a good idea.. I don't think escape\n> sequences are meant to be encoded with hex or octal number strings.\n> From a quick look, I don't see any escape code terminated with 'x', so\n> maybe it would end up working ok.. but something like ESC[0x1234m\n> should be an escape sequence terminated with x followed by normal\n> chars 1234m and strtoul would get that wrong..\n> \nstroul(s, NULL, 10) will only parse decimal numbers and stop at\nnon-decimal digits.\n\n\nLothar Waßmann","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrR7v4f2hz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 21:50:35 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 6BE43C21F2D; Mon, 11 Sep 2017 11:50:27 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 42725C21DFE;\n\tMon, 11 Sep 2017 11:50:25 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid BC01FC21DFE; Mon, 11 Sep 2017 11:50:23 +0000 (UTC)","from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de\n\t[80.67.31.39]) by lists.denx.de (Postfix) with ESMTPS id 683D8C21D76\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 11:50:23 +0000 (UTC)","from [89.1.81.74] (helo=ipc1.ka-ro)\n\tby smtprelay01.ispgateway.de with esmtpsa\n\t(TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89)\n\t(envelope-from <LW@KARO-electronics.de>)\n\tid 1drNEM-0008NL-SA; Mon, 11 Sep 2017 13:50:22 +0200","from lothar by ipc1.ka-ro with local (Exim 4.84_2 #2 (Debian))\n\tid 1drNEM-00033v-FS; Mon, 11 Sep 2017 13:50:22 +0200"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,\n\tSPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.0","Date":"Mon, 11 Sep 2017 13:50:21 +0200","From":"Lothar =?utf-8?q?Wa=C3=9Fmann?= <LW@KARO-electronics.de>","To":"Rob Clark <robdclark@gmail.com>","Message-ID":"<20170911135021.4a51dcb2@karo-electronics.de>","In-Reply-To":"<CAF6AEGvSO_+=Sk+0sNvvgHMu4KYUv6_-6LqiKeULcJhDfUoE0Q@mail.gmail.com>","References":"<20170907202816.18765-1-robdclark@gmail.com>\n\t<CAPnjgZ2Ts67j7GkTGAtjEfzVcFZ=O_79kmXg0haqT8_2Ho7mdA@mail.gmail.com>\n\t<CAF6AEGvSO_+=Sk+0sNvvgHMu4KYUv6_-6LqiKeULcJhDfUoE0Q@mail.gmail.com>","Organization":"Ka-Ro electronics GmbH","MIME-Version":"1.0","X-Df-Sender":"bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ==","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1766275,"web_url":"http://patchwork.ozlabs.org/comment/1766275/","msgid":"<CAF6AEGtjCsTdUs+cV8CEf_NQQagWcA3MbAA_t0M_XHr0EzUd7A@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T12:31:36","subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/","name":"Rob Clark","email":"robdclark@gmail.com"},"content":"On Mon, Sep 11, 2017 at 7:50 AM, Lothar Waßmann <LW@karo-electronics.de> wrote:\n> Hi,\n>\n> On Mon, 11 Sep 2017 05:42:01 -0400 Rob Clark wrote:\n>> On Mon, Sep 11, 2017 at 2:18 AM, Simon Glass <sjg@chromium.org> wrote:\n>> > On 7 September 2017 at 14:28, Rob Clark <robdclark@gmail.com> wrote:\n>> >> Really just the subset that is needed by efi_console.  Perhaps more will\n>> >> be added later, for example color support would be useful to implement\n>> >> efi_cout_set_attribute().\n>> >>\n>> >> Signed-off-by: Rob Clark <robdclark@gmail.com>\n>> >> ---\n>> >>  drivers/video/vidconsole-uclass.c | 112 ++++++++++++++++++++++++++++++++++++++\n>> >>  drivers/video/video-uclass.c      |   4 +-\n>> >>  include/video.h                   |   7 +++\n>> >>  include/video_console.h           |  11 ++++\n>> >>  4 files changed, 131 insertions(+), 3 deletions(-)\n>> >>\n>> >> diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c\n>> >> index e081d5a0ee..7998b4cf5f 100644\n>> >> --- a/drivers/video/vidconsole-uclass.c\n>> >> +++ b/drivers/video/vidconsole-uclass.c\n>> >> @@ -9,6 +9,7 @@\n>> >>   */\n>> >>\n>> >>  #include <common.h>\n>> >> +#include <linux/ctype.h>\n>> >>  #include <dm.h>\n>> >>  #include <video.h>\n>> >>  #include <video_console.h>\n>> >> @@ -107,12 +108,123 @@ static void vidconsole_newline(struct udevice *dev)\n>> >>         video_sync(dev->parent);\n>> >>  }\n>> >>\n>> >> +/*\n>> >> + * Parse a number from string that ends in a non-numeric character..\n>> >> + * sscanf() would be nice.  This is just enough for parsing ANSI escape\n>> >> + * sequences.\n>> >> + */\n>> >> +static char *parsenum(char *s, int *num)\n>> >\n>> > Can you use simple_strtoul() or similar?\n>>\n>> Possibly, but I'm not sure it is a good idea.. I don't think escape\n>> sequences are meant to be encoded with hex or octal number strings.\n>> From a quick look, I don't see any escape code terminated with 'x', so\n>> maybe it would end up working ok.. but something like ESC[0x1234m\n>> should be an escape sequence terminated with x followed by normal\n>> chars 1234m and strtoul would get that wrong..\n>>\n> stroul(s, NULL, 10) will only parse decimal numbers and stop at\n> non-decimal digits.\n>\n\nAnd you'd expect simple_strtoul() would too.. but that does not appear\nto be the case.  Not sure if that is intentional.\n\nBR,\n-R","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"ZWqCds1n\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrS3P0TpHz9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 22:31:44 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid C0254C21F5B; Mon, 11 Sep 2017 12:31:42 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 5DCE8C21D76;\n\tMon, 11 Sep 2017 12:31:39 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid E8C44C21D76; Mon, 11 Sep 2017 12:31:37 +0000 (UTC)","from mail-lf0-f65.google.com (mail-lf0-f65.google.com\n\t[209.85.215.65])\n\tby lists.denx.de (Postfix) with ESMTPS id 7EAEAC21C4C\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 12:31:37 +0000 (UTC)","by mail-lf0-f65.google.com with SMTP id q132so3858810lfe.4\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 05:31:37 -0700 (PDT)","by 10.46.29.20 with HTTP; Mon, 11 Sep 2017 05:31:36 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc:content-transfer-encoding;\n\tbh=2qxuM7s82aGjKNo5ldJPkA80YMPhNo8EjNoGxkXf4fY=;\n\tb=ZWqCds1nvinSvhX6D/1VQrZwZNouTrLpi0K09MOb2QhoVxd0SA+piPf8ZhBxu9/FHe\n\tJ7IJliu+5Y2j+4rXKe2UgwRvehtz16efZviFSR/XJotl675n5iK8wgVGEMnSp6IoP+pc\n\t2mBGjdVDfakqUqxJ/lV09SeKZTJX92h/p6Jr6/CUQkT3rd10MIp5vk4BBlA1wjEWCI4/\n\t93Yrg8mm77wYO6yCGkKoLxvxHu381GNqxgeUf0tZGbNW5nN02Nn+9yeACVc6ZgysHLlT\n\tKNdoXK8PX9Dx36dEKQuGex2Xoaqd3Lfxq7dyn7RbAbF4RueD4lv/0FBzdIwi5lgX609v\n\tZvKg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=2qxuM7s82aGjKNo5ldJPkA80YMPhNo8EjNoGxkXf4fY=;\n\tb=KQn7dmxrs688rAWfthPKC2TEcR4dupH9xvR8RyqgO1pR7L6fYBvL4xBWi+EMfp14wV\n\tqcokRT9ERotH1hgPV6Un9eYnWaEFfceR/YI4bc7abpbQhDdk7bQcDpLv+MD7xwBjzRs3\n\tg09jAP5EYNfKa6Pn2v7B4YTwrqx/uCV55iP7+G10vUQQVUr+5hXQhrSEZqx2WUUUOpMY\n\tA8LI2lquLkaCylkvyXLN4b/3+FEsNebbDIknd96G2OKKnAtwzoEURm8Y0UNV2OyQH4EB\n\tSqSQMb2fbnt4KIWTFBWlV7a13gyocGZeHl9aStXShbnkKxH5HoCQmwC8WdbB36/1p+Q5\n\tSQ/A==","X-Gm-Message-State":"AHPjjUhlj49wHC0HfYK0HWPDjam1TI7sDJoQAcStt7gfxJGhNgxD/i5i\n\t3SUQDYITs122obrZhuzNv6w8W4VTVQ==","X-Google-Smtp-Source":"AOwi7QDzKU76LJnHFsrPk/Cb3to1zHNxXLhsTKuF7WsK/D5H5qlkLQO5j3B760mEglEPZ95Pz8ulI3o6fuDb39lzZrk=","X-Received":"by 10.25.78.153 with SMTP id u25mr4156589lfk.111.1505133096875; \n\tMon, 11 Sep 2017 05:31:36 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170911135021.4a51dcb2@karo-electronics.de>","References":"<20170907202816.18765-1-robdclark@gmail.com>\n\t<CAPnjgZ2Ts67j7GkTGAtjEfzVcFZ=O_79kmXg0haqT8_2Ho7mdA@mail.gmail.com>\n\t<CAF6AEGvSO_+=Sk+0sNvvgHMu4KYUv6_-6LqiKeULcJhDfUoE0Q@mail.gmail.com>\n\t<20170911135021.4a51dcb2@karo-electronics.de>","From":"Rob Clark <robdclark@gmail.com>","Date":"Mon, 11 Sep 2017 08:31:36 -0400","Message-ID":"<CAF6AEGtjCsTdUs+cV8CEf_NQQagWcA3MbAA_t0M_XHr0EzUd7A@mail.gmail.com>","To":"=?utf-8?q?Lothar_Wa=C3=9Fmann?= <LW@karo-electronics.de>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1766544,"web_url":"http://patchwork.ozlabs.org/comment/1766544/","msgid":"<CAF6AEGsz6yswYpHm=OQkiAbE+s95tXF3ggnSx9P0VbDKP-3nBA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T20:42:22","subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/","name":"Rob Clark","email":"robdclark@gmail.com"},"content":"On Mon, Sep 11, 2017 at 8:31 AM, Rob Clark <robdclark@gmail.com> wrote:\n> On Mon, Sep 11, 2017 at 7:50 AM, Lothar Waßmann <LW@karo-electronics.de> wrote:\n>> Hi,\n>>\n>> On Mon, 11 Sep 2017 05:42:01 -0400 Rob Clark wrote:\n>>> On Mon, Sep 11, 2017 at 2:18 AM, Simon Glass <sjg@chromium.org> wrote:\n>>> > On 7 September 2017 at 14:28, Rob Clark <robdclark@gmail.com> wrote:\n>>> >> Really just the subset that is needed by efi_console.  Perhaps more will\n>>> >> be added later, for example color support would be useful to implement\n>>> >> efi_cout_set_attribute().\n>>> >>\n>>> >> Signed-off-by: Rob Clark <robdclark@gmail.com>\n>>> >> ---\n>>> >>  drivers/video/vidconsole-uclass.c | 112 ++++++++++++++++++++++++++++++++++++++\n>>> >>  drivers/video/video-uclass.c      |   4 +-\n>>> >>  include/video.h                   |   7 +++\n>>> >>  include/video_console.h           |  11 ++++\n>>> >>  4 files changed, 131 insertions(+), 3 deletions(-)\n>>> >>\n>>> >> diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c\n>>> >> index e081d5a0ee..7998b4cf5f 100644\n>>> >> --- a/drivers/video/vidconsole-uclass.c\n>>> >> +++ b/drivers/video/vidconsole-uclass.c\n>>> >> @@ -9,6 +9,7 @@\n>>> >>   */\n>>> >>\n>>> >>  #include <common.h>\n>>> >> +#include <linux/ctype.h>\n>>> >>  #include <dm.h>\n>>> >>  #include <video.h>\n>>> >>  #include <video_console.h>\n>>> >> @@ -107,12 +108,123 @@ static void vidconsole_newline(struct udevice *dev)\n>>> >>         video_sync(dev->parent);\n>>> >>  }\n>>> >>\n>>> >> +/*\n>>> >> + * Parse a number from string that ends in a non-numeric character..\n>>> >> + * sscanf() would be nice.  This is just enough for parsing ANSI escape\n>>> >> + * sequences.\n>>> >> + */\n>>> >> +static char *parsenum(char *s, int *num)\n>>> >\n>>> > Can you use simple_strtoul() or similar?\n>>>\n>>> Possibly, but I'm not sure it is a good idea.. I don't think escape\n>>> sequences are meant to be encoded with hex or octal number strings.\n>>> From a quick look, I don't see any escape code terminated with 'x', so\n>>> maybe it would end up working ok.. but something like ESC[0x1234m\n>>> should be an escape sequence terminated with x followed by normal\n>>> chars 1234m and strtoul would get that wrong..\n>>>\n>> stroul(s, NULL, 10) will only parse decimal numbers and stop at\n>> non-decimal digits.\n>>\n>\n> And you'd expect simple_strtoul() would too.. but that does not appear\n> to be the case.  Not sure if that is intentional.\n>\n\nSo I double checked simple_strtoul() in upstream kernel, and (apart\nfrom being re-written) it seems to have fixed this bug.  So I'm\nguessing the u-boot copied a buggy version from the linux kernel src\nand never got a fix.  I'll send a patch for that.  It will be easy\nenough to drop parsenum() once the fix is merged.\n\nBR,\n-R","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"pdQ5lZXR\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrfxh27Fbz9s7B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 06:42:32 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 017DDC21E64; Mon, 11 Sep 2017 20:42:28 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 50460C21E4B;\n\tMon, 11 Sep 2017 20:42:26 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 6FFE6C21E4B; Mon, 11 Sep 2017 20:42:24 +0000 (UTC)","from mail-lf0-f67.google.com (mail-lf0-f67.google.com\n\t[209.85.215.67])\n\tby lists.denx.de (Postfix) with ESMTPS id 05532C21E01\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 20:42:24 +0000 (UTC)","by mail-lf0-f67.google.com with SMTP id c8so4455912lfe.2\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 13:42:24 -0700 (PDT)","by 10.46.29.20 with HTTP; Mon, 11 Sep 2017 13:42:22 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc:content-transfer-encoding;\n\tbh=Y0qQdB68pyOHxNyCfJXckD3FgOP4/QrdC0W6VVhZ59o=;\n\tb=pdQ5lZXR30ug4Rs9OYCg4fCk15a1tKrjGTjNR0albkBPZ0CGxMrsISZdE7kihPzVdj\n\tVK6hsyS6u/VWJyN0qNZJ5M49UbNz+SyEPMGAU3LPbMmOlvmpMuLRghOVmujWqosEIO7r\n\tOX2Lu/YhR0Bvrq7PY5HkQsavB5uxdQhBHrH+nhZE5lOuXa3OFPyNRRVAO3fnGcSthCfB\n\tCfjwXZAJIGD77WJcdM5A1OFJfIglfBtnrD0dxbZpJ1veOSJyrP7YrdHhcD0Wd2iOw2Vr\n\tPshPwyqS7OQCSK5BNJfDizRkWhUcpvkvHpRtbPUDyo/8id+M3LySSivmrUITcijCEQAx\n\tZk3g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=Y0qQdB68pyOHxNyCfJXckD3FgOP4/QrdC0W6VVhZ59o=;\n\tb=fzBTqWKTiBJh5yA+x/tVzd2gYICCkyqeG2xuQrCxBY1b6CGQI0ekQouBWr4qUrVDaT\n\tQLyHzFwST3W/mvJOEIinmeDvDZsB+dZgWmGKAucvdUquVdMlm/EfKH1gJix4gxyEX5Ke\n\tC0kf9jthY6pAsrX8xQxCnKQkiEsXYgoMuKdSyzhDRBhRgUU7o0Qpe95v0uZ+PTYyueK7\n\tvazeweo25+begYUIHBjFuyfLYNM2y0G5+zoASmFd7k7oXH5dBEo4ks3PL+Q5vPVexmgX\n\tFijiRa+5U2sy/NRcfO9Ngnocg3FdseDK4uL/LG+QxaL2LTjI1yuQ0uNIn0XZxGNZpGEc\n\taZew==","X-Gm-Message-State":"AHPjjUhXNujAG1nj4aJnCQbIiOh3l6DRuhyNwCIKWakFFB40Wy+cTuSu\n\tyr3t3KODe4vF8gdPXDsB8E3Xn2Rvlw==","X-Google-Smtp-Source":"AOwi7QAJuBNE5Nkr/5/8eMIEHbY+xKfrVRgHa251m0xKjVHHkbFW5DFOyTfET/DWje3lcwUFvV/TBOf7gLT+lVN283M=","X-Received":"by 10.25.43.80 with SMTP id r77mr4678538lfr.130.1505162543435;\n\tMon, 11 Sep 2017 13:42:23 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CAF6AEGtjCsTdUs+cV8CEf_NQQagWcA3MbAA_t0M_XHr0EzUd7A@mail.gmail.com>","References":"<20170907202816.18765-1-robdclark@gmail.com>\n\t<CAPnjgZ2Ts67j7GkTGAtjEfzVcFZ=O_79kmXg0haqT8_2Ho7mdA@mail.gmail.com>\n\t<CAF6AEGvSO_+=Sk+0sNvvgHMu4KYUv6_-6LqiKeULcJhDfUoE0Q@mail.gmail.com>\n\t<20170911135021.4a51dcb2@karo-electronics.de>\n\t<CAF6AEGtjCsTdUs+cV8CEf_NQQagWcA3MbAA_t0M_XHr0EzUd7A@mail.gmail.com>","From":"Rob Clark <robdclark@gmail.com>","Date":"Mon, 11 Sep 2017 16:42:22 -0400","Message-ID":"<CAF6AEGsz6yswYpHm=OQkiAbE+s95tXF3ggnSx9P0VbDKP-3nBA@mail.gmail.com>","To":"=?utf-8?q?Lothar_Wa=C3=9Fmann?= <LW@karo-electronics.de>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1766652,"web_url":"http://patchwork.ozlabs.org/comment/1766652/","msgid":"<CAPnjgZ19BPFXjgUa10GptwEMYmik=gmJ4iLE=sCQ8kNsSfeReg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-12T02:44:30","subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"Hi Rob,\n\nOn 11 September 2017 at 06:31, Rob Clark <robdclark@gmail.com> wrote:\n> On Mon, Sep 11, 2017 at 7:50 AM, Lothar Waßmann <LW@karo-electronics.de> wrote:\n>> Hi,\n>>\n>> On Mon, 11 Sep 2017 05:42:01 -0400 Rob Clark wrote:\n>>> On Mon, Sep 11, 2017 at 2:18 AM, Simon Glass <sjg@chromium.org> wrote:\n>>> > On 7 September 2017 at 14:28, Rob Clark <robdclark@gmail.com> wrote:\n>>> >> Really just the subset that is needed by efi_console.  Perhaps more will\n>>> >> be added later, for example color support would be useful to implement\n>>> >> efi_cout_set_attribute().\n>>> >>\n>>> >> Signed-off-by: Rob Clark <robdclark@gmail.com>\n>>> >> ---\n>>> >>  drivers/video/vidconsole-uclass.c | 112 ++++++++++++++++++++++++++++++++++++++\n>>> >>  drivers/video/video-uclass.c      |   4 +-\n>>> >>  include/video.h                   |   7 +++\n>>> >>  include/video_console.h           |  11 ++++\n>>> >>  4 files changed, 131 insertions(+), 3 deletions(-)\n>>> >>\n>>> >> diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c\n>>> >> index e081d5a0ee..7998b4cf5f 100644\n>>> >> --- a/drivers/video/vidconsole-uclass.c\n>>> >> +++ b/drivers/video/vidconsole-uclass.c\n>>> >> @@ -9,6 +9,7 @@\n>>> >>   */\n>>> >>\n>>> >>  #include <common.h>\n>>> >> +#include <linux/ctype.h>\n>>> >>  #include <dm.h>\n>>> >>  #include <video.h>\n>>> >>  #include <video_console.h>\n>>> >> @@ -107,12 +108,123 @@ static void vidconsole_newline(struct udevice *dev)\n>>> >>         video_sync(dev->parent);\n>>> >>  }\n>>> >>\n>>> >> +/*\n>>> >> + * Parse a number from string that ends in a non-numeric character..\n>>> >> + * sscanf() would be nice.  This is just enough for parsing ANSI escape\n>>> >> + * sequences.\n>>> >> + */\n>>> >> +static char *parsenum(char *s, int *num)\n>>> >\n>>> > Can you use simple_strtoul() or similar?\n>>>\n>>> Possibly, but I'm not sure it is a good idea.. I don't think escape\n>>> sequences are meant to be encoded with hex or octal number strings.\n>>> From a quick look, I don't see any escape code terminated with 'x', so\n>>> maybe it would end up working ok.. but something like ESC[0x1234m\n>>> should be an escape sequence terminated with x followed by normal\n>>> chars 1234m and strtoul would get that wrong..\n>>>\n>> stroul(s, NULL, 10) will only parse decimal numbers and stop at\n>> non-decimal digits.\n>>\n>\n> And you'd expect simple_strtoul() would too.. but that does not appear\n> to be the case.  Not sure if that is intentional.\n\nThat looks like a bug to me although there is no documentation or\ntests for that function. The while loop should stop at any character\nbeyond base I think.\n\n>\n> BR,\n> -R\n\nRegards,\nSimon","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"HDmwrON0\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"eFi6KlF7\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrpzy2XNnz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 12:45:02 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 19D83C21F46; Tue, 12 Sep 2017 02:44:57 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id AC00BC21E05;\n\tTue, 12 Sep 2017 02:44:54 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid E784CC21DED; Tue, 12 Sep 2017 02:44:52 +0000 (UTC)","from mail-qk0-f180.google.com (mail-qk0-f180.google.com\n\t[209.85.220.180])\n\tby lists.denx.de (Postfix) with ESMTPS id 5338EC21D76\n\tfor <u-boot@lists.denx.de>; Tue, 12 Sep 2017 02:44:52 +0000 (UTC)","by mail-qk0-f180.google.com with SMTP id a128so22529454qkc.5\n\tfor <u-boot@lists.denx.de>; Mon, 11 Sep 2017 19:44:52 -0700 (PDT)","by 10.200.37.200 with HTTP; Mon, 11 Sep 2017 19:44:30 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc:content-transfer-encoding;\n\tbh=yQjBSuYlhVLJExOSZZioMoJnyKdJDq23GJdnUMM6+yU=;\n\tb=HDmwrON080EdWSg09w+Q4lDlxnZy9AQ2mMbFcfBo9TGbos8NVQSDxXEyM8Rc6lusgc\n\tCgfTU1wvJaX9a8p5FatBOUIPc0KFPp46Ryk8Uvzrj44Eat+fdWVpQfO/Kw7CLoz4do/R\n\tQo7inRtJPaKguopvyovs7/JKRbzBvk5pE1M+N4zdKyfLsJA0Ux58TNQxWeTtngJsTIzY\n\teyobjlPaDsxO9noUiv+gM7nIYWynNEEo850/QJmpRgxJ/ukjcw1LM2lW9lBaP+PVVcPg\n\toMOYZGwUWW9/V5g25xi2DmFK/R4z3cUrV6KeW0tI4QNqWIg6rE7LCC3UrV0tOcNURhum\n\twEOw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc:content-transfer-encoding;\n\tbh=yQjBSuYlhVLJExOSZZioMoJnyKdJDq23GJdnUMM6+yU=;\n\tb=eFi6KlF7sCkcl01oanRZmbg7zOfAyiqutYTn+olHSdYR0KhbSeu1znxyD6QgmnuhJs\n\tJLfPvoE1n8oGjl/qAyIUpd7WkdL5RbbLx9qs5Hw3VZsXy/+oMXhCz006L4ApuPNJIwb5\n\tpndzW1Dw/cFQ5lD9LNV1WmPnrhZv2lrnafSpo="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=yQjBSuYlhVLJExOSZZioMoJnyKdJDq23GJdnUMM6+yU=;\n\tb=eXl+pRy7Lutcd2Z0uU8TIgX3vqnpilxw/BN1tWP2ViNvXRWHqmGTWqTwVB74WnKgok\n\t6SLCaz+lDThVoxFepFDgaXtfjPT0NZOrUxTehFjBcOe4+yjcKv54IjC5ih9upEG8ZBY9\n\tzNV+jyl20XB/JzBVJR/dwzg7I4abWsJ/IYwuAQC822aI4ApYXvfo9RiwNHdgXH3UEeVq\n\tBkNUuxpPti4EgzEUtFZ61vDM4A4yAhWSYWQrEcpLZi/urXQ2hDBaseMM0MZpFMjYxVtx\n\tdhUZO3sXy3VWvrWwViaLhnz4Op507GHL8oMBmNVh3LuEgWVQ2e9S/QzFIyP4xqkack13\n\tXfew==","X-Gm-Message-State":"AHPjjUglx33Q8c3Hiub9GMO+e4B7UHKngXO2JqRu+Ca1/+2WS/hHdFyv\n\trHBVZjFW5RC0rxRAJaedA58SomWW/7NEurl2M61HnQ==","X-Google-Smtp-Source":"AOwi7QBala+QwYmg4/ZjD3UrQK0h2eFhI5aaq0S7ADXOf/K0gKn6AHnl9yIV3pEXia92H6Ogffn2SSI/bV/W/yYm5w4=","X-Received":"by 10.55.81.215 with SMTP id f206mr16597074qkb.188.1505184290663;\n\tMon, 11 Sep 2017 19:44:50 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CAF6AEGtjCsTdUs+cV8CEf_NQQagWcA3MbAA_t0M_XHr0EzUd7A@mail.gmail.com>","References":"<20170907202816.18765-1-robdclark@gmail.com>\n\t<CAPnjgZ2Ts67j7GkTGAtjEfzVcFZ=O_79kmXg0haqT8_2Ho7mdA@mail.gmail.com>\n\t<CAF6AEGvSO_+=Sk+0sNvvgHMu4KYUv6_-6LqiKeULcJhDfUoE0Q@mail.gmail.com>\n\t<20170911135021.4a51dcb2@karo-electronics.de>\n\t<CAF6AEGtjCsTdUs+cV8CEf_NQQagWcA3MbAA_t0M_XHr0EzUd7A@mail.gmail.com>","From":"Simon Glass <sjg@chromium.org>","Date":"Mon, 11 Sep 2017 20:44:30 -0600","X-Google-Sender-Auth":"0HUoLb6O6jAl04xcIKYc27mRaRU","Message-ID":"<CAPnjgZ19BPFXjgUa10GptwEMYmik=gmJ4iLE=sCQ8kNsSfeReg@mail.gmail.com>","To":"Rob Clark <robdclark@gmail.com>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH] dm: video: Add basic ANSI escape sequence\n\tsupport","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]