summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-12-18 16:22:01 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-12-20 09:35:38 +0100
commit8bec1f2f1676a3914d46868064afa94b85a7b8cb (patch)
tree9e792a97828f4afc51af6af290ca2d9173edba54 /drivers/video
parent484cc65fdb24b1d1b054007f75dd5ac08064853d (diff)
downloadbarebox-8bec1f2f1676a3914d46868064afa94b85a7b8cb.tar.gz
barebox-8bec1f2f1676a3914d46868064afa94b85a7b8cb.tar.xz
video: Add screen_size field
barebox does not need the screen size directly, but we pass the framebuffer to Linux via simnplefb it is desirable to pass the full size of the framebuffer. Default to calculated values from the screen resolution. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index 4263027bf7..c36b9adcea 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -78,6 +78,8 @@ static int fb_setup_mode(struct device_d *dev, struct param_d *param,
if (!info->line_length)
info->line_length = info->xres * (info->bits_per_pixel >> 3);
+ if (!info->screen_size)
+ info->screen_size = info->line_length * info->yres;
if (!ret) {
dev->resource[0].start = (resource_size_t)info->screen_base;