Skip to contentSkip to conversation

fb: calculate resource end

PATCH Applied Jan Weitzel 2 participants 2 messages Mar 28, 2013 – Apr 2, 2013 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fb: calculate resource end

commit 5f03074 changed storing struct resource end insted of size. Fix calculation of end in fb

---
 drivers/video/fb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/fb.c +2 -2
index ee53272..be29695 100644
@@ -86,7 +86,7 @@ static int fb_setup_mode(struct device_d *dev, struct param_d *param,
 	if (!ret) {
 		dev->resource[0].start = (resource_size_t)info->screen_base;
 		info->cdev.size = info->xres * info->yres * (info->bits_per_pixel >> 3);
-		dev->resource[0].end = info->cdev.size - 1;
+		dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
 		dev_param_set_generic(dev, param, val);
 	} else
 		info->cdev.size = 0;
@@ -116,7 +116,7 @@ int register_framebuffer(struct fb_info *info)
 	info->cdev.priv = info;
 	dev->resource = xzalloc(sizeof(struct resource));
 	dev->resource[0].start = (resource_size_t)info->screen_base;
-	dev->resource[0].end = info->cdev.size - 1;
+	dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
 	dev->resource[0].flags = IORESOURCE_MEM;
 	dev->num_resources = 1;
 
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 4 lines · Jan Weitzel

commit 5f03074 changed storing struct resource end insted of size. Fix calculation of end in fb

Applied, thanks

Sascha

Quoted 35 lines
---
 drivers/video/fb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/fb.c +2 -2
index ee53272..be29695 100644
@@ -86,7 +86,7 @@ static int fb_setup_mode(struct device_d *dev, struct param_d *param,
 	if (!ret) {
 		dev->resource[0].start = (resource_size_t)info->screen_base;
 		info->cdev.size = info->xres * info->yres * (info->bits_per_pixel >> 3);
-		dev->resource[0].end = info->cdev.size - 1;
+		dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
 		dev_param_set_generic(dev, param, val);
 	} else
 		info->cdev.size = 0;
@@ -116,7 +116,7 @@ int register_framebuffer(struct fb_info *info)
 	info->cdev.priv = info;
 	dev->resource = xzalloc(sizeof(struct resource));
 	dev->resource[0].start = (resource_size_t)info->screen_base;
-	dev->resource[0].end = info->cdev.size - 1;
+	dev->resource[0].end = dev->resource[0].start + info->cdev.size - 1;
 	dev->resource[0].flags = IORESOURCE_MEM;
 	dev->num_resources = 1;
 
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox