summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2012-09-28 15:11:12 +0000
committerAnatolij Gustschin <agust@denx.de>2012-11-07 00:48:44 +0100
commitc20ee073a61f32cd34bd76ec88797ab20f62c313 (patch)
treebbf8d8b960357ef00000b789e644b8cc86b4417e /drivers
parentf674f7cfc019baaa6bf961cd4ed8b4aee4362f97 (diff)
downloadu-boot-imx-c20ee073a61f32cd34bd76ec88797ab20f62c313.zip
u-boot-imx-c20ee073a61f32cd34bd76ec88797ab20f62c313.tar.gz
u-boot-imx-c20ee073a61f32cd34bd76ec88797ab20f62c313.tar.bz2
video: Implement additional video API functions in cfb_console
Implement the new video API functions to provide access to screen size, etc. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/cfb_console.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 9c67b63..6f5d4f2 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -2257,3 +2257,45 @@ int drv_video_init(void)
/* Return success */
return 1;
}
+
+void video_position_cursor(unsigned col, unsigned row)
+{
+ console_col = min(col, CONSOLE_COLS - 1);
+ console_row = min(row, CONSOLE_ROWS - 1);
+}
+
+int video_get_pixel_width(void)
+{
+ return VIDEO_VISIBLE_COLS;
+}
+
+int video_get_pixel_height(void)
+{
+ return VIDEO_VISIBLE_ROWS;
+}
+
+int video_get_screen_rows(void)
+{
+ return CONSOLE_ROWS;
+}
+
+int video_get_screen_columns(void)
+{
+ return CONSOLE_COLS;
+}
+
+void video_clear(void)
+{
+#ifdef VIDEO_HW_RECTFILL
+ video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
+ 0, /* dest pos x */
+ 0, /* dest pos y */
+ VIDEO_VISIBLE_COLS, /* frame width */
+ VIDEO_VISIBLE_ROWS, /* frame height */
+ bgx /* fill color */
+ );
+#else
+ memsetl(video_fb_address,
+ (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), bgx);
+#endif
+}