linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: linux-fbdev-devel@lists.sourceforge.net,
	Otto Wyss <otto.wyss@orpatec.ch>
Subject: Re: Re: [PATCH 4/5][RFC] fbdev: Clean up framebuffer  initialization
Date: Sat, 4 Sep 2004 20:37:16 +0800	[thread overview]
Message-ID: <200409042037.16923.adaplas@hotpop.com> (raw)
In-Reply-To: <413972D0.EAC13CC4@orpatec.ch>

On Saturday 04 September 2004 15:46, Otto Wyss wrote:
> "Antonino A. Daplas" wrote:
> > 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

  reply	other threads:[~2004-09-04 12:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04  3:08 [PATCH 4/5][RFC] fbdev: Clean up framebuffer initialization Antonino A. Daplas
2004-09-04  3:36 ` Thomas Winischhofer
2004-09-04  6:53   ` Antonino A. Daplas
2004-09-04  7:46     ` Otto Wyss
2004-09-04 12:37       ` Antonino A. Daplas [this message]
2004-09-05  9:16 ` Geert Uytterhoeven
2004-09-05  9:50   ` [Linux-fbdev-devel] " Antonino A. Daplas
2004-09-05 10:13     ` Geert Uytterhoeven
2004-09-05 10:40       ` Antonino A. Daplas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409042037.16923.adaplas@hotpop.com \
    --to=adaplas@hotpop.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=otto.wyss@orpatec.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).