Commit 3fc701d5 authored by Krzysztof Helt's avatar Krzysztof Helt Committed by David S. Miller

[CG6]: fix memory size detection

This patch fixes memory size detection on the CG6 card.
The 1MB TGX card has dblbuf property set to 0.
Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63213196
...@@ -677,6 +677,7 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id * ...@@ -677,6 +677,7 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id *
struct fb_info *info; struct fb_info *info;
struct cg6_par *par; struct cg6_par *par;
int linebytes, err; int linebytes, err;
int dblbuf;
info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev); info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev);
...@@ -698,7 +699,9 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id * ...@@ -698,7 +699,9 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id *
linebytes = of_getintprop_default(dp, "linebytes", linebytes = of_getintprop_default(dp, "linebytes",
info->var.xres); info->var.xres);
par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);
if (of_find_property(dp, "dblbuf", NULL))
dblbuf = of_getintprop_default(dp, "dblbuf", 0);
if (dblbuf)
par->fbsize *= 4; par->fbsize *= 4;
par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET, par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment