aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2007-08-02 00:39:32 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-03 17:08:26 -0400
commit3fc701d5d459f3b83ba874613048d36e91debca2 (patch)
tree48e91adb1a6364cc62d716a0e46be8da8c39bf72 /drivers/video
parent63213196fd4b05b9c3539cbe34775c60f1f6fad0 (diff)
[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: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/cg6.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 87c747123538..ee9046db9c7d 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -677,6 +677,7 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id *
677 struct fb_info *info; 677 struct fb_info *info;
678 struct cg6_par *par; 678 struct cg6_par *par;
679 int linebytes, err; 679 int linebytes, err;
680 int dblbuf;
680 681
681 info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev); 682 info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev);
682 683
@@ -698,7 +699,9 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id *
698 linebytes = of_getintprop_default(dp, "linebytes", 699 linebytes = of_getintprop_default(dp, "linebytes",
699 info->var.xres); 700 info->var.xres);
700 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 701 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);
701 if (of_find_property(dp, "dblbuf", NULL)) 702
703 dblbuf = of_getintprop_default(dp, "dblbuf", 0);
704 if (dblbuf)
702 par->fbsize *= 4; 705 par->fbsize *= 4;
703 706
704 par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET, 707 par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET,