From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 21 Mar 2012 11:20:38 +0100 Subject: [U-Boot] [PATCH 05/14] cfb_console: Fix function console_scrollup In-Reply-To: <20120321104502.4b889595@wker> References: <1327415291-13260-1-git-send-email-pali.rohar@gmail.com> <1327415291-13260-6-git-send-email-pali.rohar@gmail.com> <20120321104502.4b889595@wker> Message-ID: <201203211120.39010.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Anatolij Gustschin, > Hi, > > On Tue, 24 Jan 2012 15:28:02 +0100 > > Pali Roh?r wrote: > > * Use correct buffer size, do not damage screen output > > > > Signed-off-by: Pali Roh?r > > --- > > > > 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