summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-11-06 16:10:42 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-06 16:10:42 +0100
commit1d9295b344a885e5a79de38df28740a1db6f6103 (patch)
treeca427bbf13a04f3480fb398630473bede4ef6463 /drivers/video
parent736a74ba7a1c3983105b92a709c263e206fe3913 (diff)
parent6face0e8ab8d97dcc7284a8a5d7ae1f4d134798f (diff)
downloadbarebox-1d9295b344a885e5a79de38df28740a1db6f6103.tar.gz
barebox-1d9295b344a885e5a79de38df28740a1db6f6103.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fb.c15
-rw-r--r--drivers/video/fbconsole.c3
2 files changed, 13 insertions, 5 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index 3672c44202..d159d607f5 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -31,6 +31,12 @@ static int fb_ioctl(struct cdev* cdev, int req, void *data)
return 0;
}
+static void fb_release_shadowfb(struct fb_info *info)
+{
+ free(info->screen_base_shadow);
+ info->screen_base_shadow = NULL;
+}
+
static int fb_alloc_shadowfb(struct fb_info *info)
{
if (info->screen_base_shadow && info->shadowfb)
@@ -47,8 +53,7 @@ static int fb_alloc_shadowfb(struct fb_info *info)
memcpy(info->screen_base_shadow, info->screen_base,
info->line_length * info->yres);
} else {
- free(info->screen_base_shadow);
- info->screen_base_shadow = NULL;
+ fb_release_shadowfb(info);
}
return 0;
@@ -79,6 +84,8 @@ int fb_disable(struct fb_info *info)
info->fbops->fb_disable(info);
+ fb_release_shadowfb(info);
+
info->enabled = false;
return 0;
@@ -92,9 +99,9 @@ static int fb_enable_set(struct param_d *param, void *priv)
enable = info->p_enable;
if (enable)
- info->fbops->fb_enable(info);
+ fb_enable(info);
else
- info->fbops->fb_disable(info);
+ fb_disable(info);
return 0;
}
diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
index b10503eb84..c38d13c304 100644
--- a/drivers/video/fbconsole.c
+++ b/drivers/video/fbconsole.c
@@ -192,8 +192,9 @@ static void printchar(struct fbc_priv *priv, int c)
buf = gui_screen_render_buffer(priv->sc);
- memcpy(buf, buf + line_height, line_height * (priv->rows + 1));
+ memcpy(buf, buf + line_height, line_height * priv->rows);
memset(buf + line_height * priv->rows, 0, line_height);
+
gu_screen_blit(priv->sc);
priv->y = priv->rows;
}