[U-Boot] [PATCH 3/5] lcd: Call lcd_sync() after completing the scroll

Simon Glass sjg at chromium.org
Wed Apr 22 20:01:36 CEST 2015


Hi,

On 19 April 2015 at 07:21, Simon Glass <sjg at chromium.org> wrote:
> On sandbox, if you add a printf() to malloc() for debugging, the output will
> eventually cause the screen to scroll. Since lcd_sync() calls SDL functions
> which allocate memory, and this happens before we have updated
> console_curr_row, U-Boot gets locked in an infinite loop.
>
> Flip the order of the two statements to avoid this.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  common/lcd_console.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/lcd_console.c b/common/lcd_console.c
> index 8bf83b9..ab48fd6 100644
> --- a/common/lcd_console.c
> +++ b/common/lcd_console.c
> @@ -120,8 +120,8 @@ static void console_scrollup(void)
>                 *ppix++ = bg_color;
>         }
>  #endif
> -       lcd_sync();
>         console_curr_row -= rows;
> +       lcd_sync();
>  }
>
>  static inline void console_back(void)
> --
> 2.2.0.rc0.207.ga3a616c
>

This patch is obsolete now since this problem is fixed by an earlier
patch, now applied.

I am dropping it.

Regards,
Simon


More information about the U-Boot mailing list