[U-Boot] [PATCH 43/45] video: at91: Adjust vidconsole_position_cursor() to use char pos
Simon Glass
sjg at chromium.org
Tue Oct 9 03:41:12 UTC 2018
Hi Anatolij,
On 1 October 2018 at 14:22, Anatolij Gustschin <agust at denx.de> wrote:
> Hi Simon,
>
> On Mon, 1 Oct 2018 12:22:47 -0600
> Simon Glass sjg at chromium.org wrote:
>
>> At present this function uses pixels but it seems more useful for it to
>> position in terms of characters on the screen. This also matches the
>> comment to the function. Update this.
>>
>> Unfortunately there is one user of this function (at91). Have a crack at
>> fixing this, since I cannot test it.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>
> Reviewed-by: Anatolij Gustschin <agust at denx.de>
>
>> ---
>>
>> board/atmel/common/video_display.c | 5 ++++-
>> drivers/video/vidconsole-uclass.c | 2 ++
>> 2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c
>> index 7dd7b85556e..e02cb00f866 100644
>> --- a/board/atmel/common/video_display.c
>> +++ b/board/atmel/common/video_display.c
>> @@ -18,6 +18,7 @@ DECLARE_GLOBAL_DATA_PTR;
>>
>> int at91_video_show_board_info(void)
>> {
>> + struct vidconsole_priv *priv;
>> ulong dram_size, nand_size;
>> int i;
>> u32 len = 0;
>> @@ -63,7 +64,9 @@ int at91_video_show_board_info(void)
>> if (ret)
>> return ret;
>>
>> - vidconsole_position_cursor(con, 0, logo_info.logo_height);
>> + priv = dev_get_uclass_priv(con);
>> + vidconsole_position_cursor(con, 0, (logo_info.logo_height +
>> + con->y_charsize - 1) / con->y_charsize);
>
> Shouldn't it be priv->y_charsize? 'con' is struct udevice * and doesn't
> have y_charsize.
Yes thanks, I will fix that when I apply this.
Regards,
Simon
>
>
> --
> Anatolij
More information about the U-Boot
mailing list