Bug in uninorth-agp.c parsing of module parameter uninorth_agp.aperture
Hi,
i found a bug in uninorth-agp.c, function uninorth_fetch_size.
the line
size <http://lxr.free-electrons.com/ident?i=size> =memparse <http://lxr.free-electrons.com/ident?i=memparse>(aperture <http://lxr.free-electrons.com/ident?i=aperture>, &aperture <http://lxr.free-electrons.com/ident?i=aperture>) >> 20;
always sets size to zero which makes the driver allocate the default size of 256 MB which is obviously too large for older uninorth revisions.
I split the line into memparse and shifting and inserted diagnostic messages, output with uninorth_agp.aperture = 32 as boot parameter:
Feb 15 19:12:44 mac-mini kernel: [ 2.568636] agpgart-uninorth 0000:00:0b.0: size in uninorth_fetch_size after memparse: 32 Feb 15 19:12:44 mac-mini kernel: [ 2.568642] agpgart-uninorth 0000:00:0b.0: size after >> 20: 0
It would be nice if a patch could be produced so i can experiment with different aperture sizes without having to rebuild the kernel every time :-)
Cheers
Jochen
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Jochen Rollwagen
Hi,
i found a bug in
uninorth-agp.c, functionuninorth_fetch_size.the line
size =
memparse(aperture, &aperture)>> 20;always sets size to zero which makes the driver allocate the default size of 256 MB which is obviously too large for older uninorth revisions.
Sounds like the default should be lower for older UniNorth revisions. Can you make a patch for that?
Quoted 7 lines
I split the line into memparse and shifting and inserted diagnostic messages, output with uninorth_agp.aperture = 32 as boot parameter:
Feb 15 19:12:44 mac-mini kernel: [ 2.568636] agpgart-uninorth0000:00:0b.0: size in
uninorth_fetch_sizeafter memparse: 32 Feb 15
19:12:44 mac-mini kernel: [ 2.568642] agpgart-uninorth
0000:00:0b.0: size after >> 20: 0
Following your memparse link to
http://lxr.free-electrons.com/source/lib/cmdline.c#L127 , you can see that the memparse function supports suffices such as 'M' or 'm'; without suffix, the size is interpreted as bytes.
So you need something like uninorth_agp.aperture=32m .
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel