[U-Boot] [PATCH 05/14] cfb_console: Fix function console_scrollup
Marek Vasut
marex at denx.de
Wed Mar 21 11:20:38 CET 2012
Dear Anatolij Gustschin,
> Hi,
>
> On Tue, 24 Jan 2012 15:28:02 +0100
>
> Pali Rohár <pali.rohar at gmail.com> wrote:
> > * Use correct buffer size, do not damage screen output
> >
> > Signed-off-by: Pali Rohár <pali.rohar at gmail.com>
> > ---
> >
> > Changes since original version:
> > - Fixed commit message
> >
> > drivers/video/cfb_console.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
> > index 904caf7..9092399 100644
> > --- a/drivers/video/cfb_console.c
> > +++ b/drivers/video/cfb_console.c
> > @@ -701,7 +701,7 @@ static void console_scrollup(void)
> >
> > );
> >
> > #else
> >
> > memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND,
> >
> > - CONSOLE_SCROLL_SIZE >> 2);
> > + CONSOLE_SCROLL_SIZE);
>
> NAK. This change is wrong. CONSOLE_SCROLL_SIZE is the size of the
> visible frame buffer - size of one row in bytes. We are using memcpyl()
> here, so the division by 4 (size >> 2) is correct. With your change
> we end up copying 4 times more data then needed.
What kind of a problem are we fixing here? And what are the symptoms of it?
>
> Thanks,
> Anatolij
Best regards,
Marek Vasut
More information about the U-Boot
mailing list