linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cg6: fix memory size detection
@ 2007-08-01 23:11 Krzysztof Helt
  2007-08-02  4:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Helt @ 2007-08-01 23:11 UTC (permalink / raw)
  To: Linux-fbdev-devel; +Cc: David Miller

From: Krzysztof Helt <krzysztof.h1@wp.pl>

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>

---
This patch requires the cg6-cleanup patch posted earlier to apply cleanly.

--- linux-2.6.23smp/drivers/video/cg6.c	2007-08-02 00:24:06.000000000 +0200
+++ linux-2.6.23/drivers/video/cg6.c	2007-08-02 00:27:34.000000000 +0200
@@ -669,6 +669,7 @@ static int __devinit cg6_probe(struct of
 	struct fb_info *info;
 	struct cg6_par *par;
 	int linebytes, err;
+	int dblbuf;
 
 	info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev);
 
@@ -690,7 +691,9 @@ static int __devinit cg6_probe(struct of
 	linebytes = of_getintprop_default(dp, "linebytes",
 					  info->var.xres);
 	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->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET,

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cg6: fix memory size detection
  2007-08-01 23:11 [PATCH] cg6: fix memory size detection Krzysztof Helt
@ 2007-08-02  4:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-08-02  4:42 UTC (permalink / raw)
  To: krzysztof.h1; +Cc: linux-fbdev-devel

From: Krzysztof Helt <krzysztof.h1@wp.pl>
Date: Thu, 2 Aug 2007 01:11:33 +0200

> From: Krzysztof Helt <krzysztof.h1@wp.pl>
> 
> 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>

Applied.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-02  4:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-01 23:11 [PATCH] cg6: fix memory size detection Krzysztof Helt
2007-08-02  4:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).