mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 08/10] video: Add screen_size field
Date: Wed, 18 Dec 2013 16:42:40 +0100	[thread overview]
Message-ID: <1387381362-7780-9-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1387381362-7780-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 drivers/video/fb.c | 2 ++
 include/fb.h       | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index 4263027..c36b9ad 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;
diff --git a/include/fb.h b/include/fb.h
index 98d5a03..22fa9b1 100644
--- a/include/fb.h
+++ b/include/fb.h
@@ -86,6 +86,7 @@ struct fb_info {
 	struct device_d dev;		/* This is this fb device */
 
 	void *screen_base;
+	unsigned long screen_size;
 
 	void *priv;
 
-- 
1.8.5.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-12-18 15:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 15:42 video / IPU patches Sascha Hauer
2013-12-18 15:42 ` [PATCH 01/10] video: ipufb: make disp_data_fmt configurable Sascha Hauer
2013-12-18 15:42 ` [PATCH 02/10] video: ipufb: do not use bitfields Sascha Hauer
2013-12-18 15:42 ` [PATCH 03/10] video: ipufb: calculate channel param fields from fb_bitfields Sascha Hauer
2013-12-18 15:42 ` [PATCH 04/10] video: ipufb: Fix 24bit format and implement 32bit format Sascha Hauer
2013-12-18 15:42 ` [PATCH 05/10] video: ipufb: Fix divider debug print Sascha Hauer
2013-12-18 15:42 ` [PATCH 06/10] video: ipufb: Allow to disable fractional pixelclock divider Sascha Hauer
2013-12-18 15:42 ` [PATCH 07/10] video: imx-ipu-fb: Do not modify pwm register Sascha Hauer
2013-12-18 15:42 ` Sascha Hauer [this message]
2013-12-18 15:42 ` [PATCH 09/10] video: imx-ipu-fb: Allow to specify framebuffer memory size via platform_data Sascha Hauer
2013-12-18 15:42 ` [PATCH 10/10] video: simplefb: Add of reserve entry for framebuffer memory Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1387381362-7780-9-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox