Re: [U-Boot] [PATCH v2 04/22] x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINES

2015-01-23 Thread Simon Glass
On 20 January 2015 at 00:44, Anatolij Gustschin ag...@denx.de wrote:
 Hi Simon,

 On Mon, 19 Jan 2015 17:33:08 -0700
 Simon Glass s...@chromium.org wrote:

 Hi Anatolij,

 On 1 January 2015 at 16:17, Simon Glass s...@chromium.org wrote:
  Some machines are very slow to scroll their displays. To cope with this,
  support the CONFIG_CONSOLE_SCROLL_LINES option. Setting this to 5 allows
  the display to operate at an acceptable speed by scrolling 5 lines at
  a time.
 
  This same option is available for LCDs so when these systems are unified
  this code can be unified also.
 
  Signed-off-by: Simon Glass s...@chromium.org

 Are you happy with this patch? If so, is it OK for me to pick it up via x86?

 yes, it is OK for me.

Thanks.

Applied to u-boot-x86.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 04/22] x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINES

2015-01-19 Thread Simon Glass
Hi Anatolij,

On 1 January 2015 at 16:17, Simon Glass s...@chromium.org wrote:
 Some machines are very slow to scroll their displays. To cope with this,
 support the CONFIG_CONSOLE_SCROLL_LINES option. Setting this to 5 allows
 the display to operate at an acceptable speed by scrolling 5 lines at
 a time.

 This same option is available for LCDs so when these systems are unified
 this code can be unified also.

 Signed-off-by: Simon Glass s...@chromium.org

Are you happy with this patch? If so, is it OK for me to pick it up via x86?

 ---

 Changes in v2: None

  drivers/video/cfb_console.c | 26 +-
  1 file changed, 17 insertions(+), 9 deletions(-)

 diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
 index a653bb4..75cdf61 100644
 --- a/drivers/video/cfb_console.c
 +++ b/drivers/video/cfb_console.c
 @@ -312,7 +312,11 @@ void console_cursor(int state);
  #define CONSOLE_ROW_SECOND (video_console_address + CONSOLE_ROW_SIZE)
  #define CONSOLE_ROW_LAST   (video_console_address + CONSOLE_SIZE - 
 CONSOLE_ROW_SIZE)
  #define CONSOLE_SIZE   (CONSOLE_ROW_SIZE * CONSOLE_ROWS)
 -#define CONSOLE_SCROLL_SIZE(CONSOLE_SIZE - CONSOLE_ROW_SIZE)
 +
 +/* By default we scroll by a single line */
 +#ifndef CONFIG_CONSOLE_SCROLL_LINES
 +#define CONFIG_CONSOLE_SCROLL_LINES 1
 +#endif

  /* Macros */
  #ifdef VIDEO_FB_LITTLE_ENDIAN
 @@ -753,26 +757,33 @@ static void console_clear_line(int line, int begin, int 
 end)

  static void console_scrollup(void)
  {
 +   const int rows = CONFIG_CONSOLE_SCROLL_LINES;
 +   int i;
 +
 /* copy up rows ignoring the first one */

  #ifdef VIDEO_HW_BITBLT
 video_hw_bitblt(VIDEO_PIXEL_SIZE,   /* bytes per pixel */
 0,  /* source pos x */
 video_logo_height +
 -   VIDEO_FONT_HEIGHT, /* source pos y */
 +   VIDEO_FONT_HEIGHT * rows, /* source pos y */
 0,  /* dest pos x */
 video_logo_height,  /* dest pos y */
 VIDEO_VISIBLE_COLS, /* frame width */
 VIDEO_VISIBLE_ROWS
 - video_logo_height
 -   - VIDEO_FONT_HEIGHT /* frame height */
 +   - VIDEO_FONT_HEIGHT * rows  /* frame height */
 );
  #else
 -   memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND,
 -   CONSOLE_SCROLL_SIZE  2);
 +   memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_FIRST + rows * 
 CONSOLE_ROW_SIZE,
 +   (CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows)  2);
  #endif
 /* clear the last one */
 -   console_clear_line(CONSOLE_ROWS - 1, 0, CONSOLE_COLS - 1);
 +   for (i = 1; i = rows; i++)
 +   console_clear_line(CONSOLE_ROWS - i, 0, CONSOLE_COLS - 1);
 +
 +   /* Decrement row number */
 +   console_row -= rows;
  }

  static void console_back(void)
 @@ -884,9 +895,6 @@ static void console_newline(int n)
 if (console_row = CONSOLE_ROWS) {
 /* Scroll everything up */
 console_scrollup();
 -
 -   /* Decrement row number */
 -   console_row = CONSOLE_ROWS - 1;
 }
  }

 --
 2.2.0.rc0.207.ga3a616c


Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 04/22] x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINES

2015-01-19 Thread Anatolij Gustschin
On Thu,  1 Jan 2015 16:17:57 -0700
Simon Glass s...@chromium.org wrote:

 Some machines are very slow to scroll their displays. To cope with this,
 support the CONFIG_CONSOLE_SCROLL_LINES option. Setting this to 5 allows
 the display to operate at an acceptable speed by scrolling 5 lines at
 a time.
 
 This same option is available for LCDs so when these systems are unified
 this code can be unified also.
 
 Signed-off-by: Simon Glass s...@chromium.org
 ---
 
 Changes in v2: None
 
  drivers/video/cfb_console.c | 26 +-
  1 file changed, 17 insertions(+), 9 deletions(-)

Acked-by: Anatolij Gustschin ag...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 04/22] x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINES

2015-01-19 Thread Anatolij Gustschin
Hi Simon,

On Mon, 19 Jan 2015 17:33:08 -0700
Simon Glass s...@chromium.org wrote:

 Hi Anatolij,
 
 On 1 January 2015 at 16:17, Simon Glass s...@chromium.org wrote:
  Some machines are very slow to scroll their displays. To cope with this,
  support the CONFIG_CONSOLE_SCROLL_LINES option. Setting this to 5 allows
  the display to operate at an acceptable speed by scrolling 5 lines at
  a time.
 
  This same option is available for LCDs so when these systems are unified
  this code can be unified also.
 
  Signed-off-by: Simon Glass s...@chromium.org
 
 Are you happy with this patch? If so, is it OK for me to pick it up via x86?

yes, it is OK for me.

Thanks,

Anatolij
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 04/22] x86: video: Add support for CONFIG_CONSOLE_SCROLL_LINES

2015-01-01 Thread Simon Glass
Some machines are very slow to scroll their displays. To cope with this,
support the CONFIG_CONSOLE_SCROLL_LINES option. Setting this to 5 allows
the display to operate at an acceptable speed by scrolling 5 lines at
a time.

This same option is available for LCDs so when these systems are unified
this code can be unified also.

Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v2: None

 drivers/video/cfb_console.c | 26 +-
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index a653bb4..75cdf61 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -312,7 +312,11 @@ void console_cursor(int state);
 #define CONSOLE_ROW_SECOND (video_console_address + CONSOLE_ROW_SIZE)
 #define CONSOLE_ROW_LAST   (video_console_address + CONSOLE_SIZE - 
CONSOLE_ROW_SIZE)
 #define CONSOLE_SIZE   (CONSOLE_ROW_SIZE * CONSOLE_ROWS)
-#define CONSOLE_SCROLL_SIZE(CONSOLE_SIZE - CONSOLE_ROW_SIZE)
+
+/* By default we scroll by a single line */
+#ifndef CONFIG_CONSOLE_SCROLL_LINES
+#define CONFIG_CONSOLE_SCROLL_LINES 1
+#endif
 
 /* Macros */
 #ifdef VIDEO_FB_LITTLE_ENDIAN
@@ -753,26 +757,33 @@ static void console_clear_line(int line, int begin, int 
end)
 
 static void console_scrollup(void)
 {
+   const int rows = CONFIG_CONSOLE_SCROLL_LINES;
+   int i;
+
/* copy up rows ignoring the first one */
 
 #ifdef VIDEO_HW_BITBLT
video_hw_bitblt(VIDEO_PIXEL_SIZE,   /* bytes per pixel */
0,  /* source pos x */
video_logo_height +
-   VIDEO_FONT_HEIGHT, /* source pos y */
+   VIDEO_FONT_HEIGHT * rows, /* source pos y */
0,  /* dest pos x */
video_logo_height,  /* dest pos y */
VIDEO_VISIBLE_COLS, /* frame width */
VIDEO_VISIBLE_ROWS
- video_logo_height
-   - VIDEO_FONT_HEIGHT /* frame height */
+   - VIDEO_FONT_HEIGHT * rows  /* frame height */
);
 #else
-   memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND,
-   CONSOLE_SCROLL_SIZE  2);
+   memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_FIRST + rows * CONSOLE_ROW_SIZE,
+   (CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows)  2);
 #endif
/* clear the last one */
-   console_clear_line(CONSOLE_ROWS - 1, 0, CONSOLE_COLS - 1);
+   for (i = 1; i = rows; i++)
+   console_clear_line(CONSOLE_ROWS - i, 0, CONSOLE_COLS - 1);
+
+   /* Decrement row number */
+   console_row -= rows;
 }
 
 static void console_back(void)
@@ -884,9 +895,6 @@ static void console_newline(int n)
if (console_row = CONSOLE_ROWS) {
/* Scroll everything up */
console_scrollup();
-
-   /* Decrement row number */
-   console_row = CONSOLE_ROWS - 1;
}
 }
 
-- 
2.2.0.rc0.207.ga3a616c

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot