Thread (11 messages) 11 messages, 6 authors, 2008-03-11

Re: [PATCH 1/4] gxfb: Replace FBSIZE config option with a kernel argument

flat view

From: Andres Salomon <hidden>
Date: 2008-02-28 00:55:45
Also in: lkml

On Wed, 27 Feb 2008 16:31:05 -0800
Andrew Morton [off-list ref] wrote:
On Sat, 23 Feb 2008 01:10:45 -0500
Andres Salomon [off-list ref] wrote:
quoted
@@ -425,7 +424,10 @@ static int __init gxfb_setup(char *options)
 		if (!*opt)
 			continue;
 
-		mode_option = opt;
+		if (!strncmp(opt, "fbsize:", 7))
+			fbsize = simple_strtoul(opt+7, NULL, 0);
+		else
+			mode_option = opt;
 	}
The above shouldn't be necessary.
It looks like that's done in other drivers in case MODULE isn't defined.  I'm
assuming this is historical at this point, and manual options parsing can
be removed from all fb drivers at this point, or is there another reason
why manual parsing would be necessary?

And it should have been documented in Documentation/kernel-parameters.txt.
Yeah, I wasn't actually sure about that; I did check for other fb drivers
documenting stuff in kernel-parameters.txt, and didn't see it.  It looks
like they instead document stuff in Documentation/fb/.  Which is preferred?


And "fbsize=N" would be a lot more conventional than "fbsize:N"
I can certainly change that.  Regarding convention, I toyed with renaming
it 'vram' (as most of the fb drivers use that), and will probably do
that unless Jordan objects.

I suspect that the formulation you have here will not permit "fbsize:128k",
whereas "fbsize=128k" or "gxfb.fbsize=128k" should work.  Needs checking.
quoted
 	return 0;
@@ -456,5 +458,8 @@ module_exit(gxfb_cleanup);
 module_param(mode_option, charp, 0);
 MODULE_PARM_DESC(mode_option, "video mode (<x>x<y>[-<bpp>][@<refr>])");
 
+module_param(fbsize, int, 0);
+MODULE_PARM_DESC(fbsize, "video memory size");
+
Because the module_param() already makes fbsize available on the kernel
boot command line via gxfb.fbsize=42 (or something similar).
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help