Thread (9 messages) 9 messages, 4 authors, 2004-09-05

Re: Re: [PATCH 4/5][RFC] fbdev: Clean up framebuffer initialization

From: Antonino A. Daplas <hidden>
Date: 2004-09-04 12:37:42

On Saturday 04 September 2004 15:46, Otto Wyss wrote:
"Antonino A. Daplas" wrote:
quoted
Mainly cleanup, but also point #5.  The i810fb, for instance, depends on
agpgart, but agpgart gets initialized way after fbdev.  The workaround is
for i810fb to explicitly call intel_agp_init().  Besides the ugliness,
forcibly initializing the agpgart subsystem out of sequence may cause
problems.
Sorry if I interrupt without deeper knowledge but doesn't this sound
very strange?
Yes, it was confusing the first time I noticed this.
Why is a subsystem initialized much later than the one
which depends on it? Doesn't this look like a design error?
I don't know about the design error part, but this is due to explicit
initialization.

The framebuffer system gets initialized quite early in the boot process.
This is because fbmem_init() is called by drivers/char/mem.c:chr_dev_init(),
then each of the fbdev's xxxfb_init(), in turn, are called by fbmem_init().
If you look at drivers/char/Makefile, you'll see that mem.o is the very
first in the list, while agp is one of the last. For i810fb, it will always
get initialized first before agp, and it doesn't have any choice on the
matter.

Anyway, if you look at drivers/char/agp/intel-agp.c, you'll see this
comment:

/* intel_agp_init() must not be declared static for explicit
   early initialization to work (ie i810fb) */

In theory, with the patch, the above hack will not be needed. The explicit
initializations of fbmem, fbcon, and xxxfb are removed.  Each will have
their own module_init(), meaning their initialization order will now depend
on their link order (basically Makefile order). I can then choose to move
i810fb to load after agp.

Tony




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help