linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>,
	James Simmons <jsimmons@infradead.org>
Subject: fbdev/console initialisation
Date: Sat, 15 Nov 2003 13:12:10 +1100	[thread overview]
Message-ID: <1068862329.4001.40.camel@gaston> (raw)

Hi !

There's something I don't understand with the way fbdev's and
fbcon are supposed to be initialized.

So the problem started when working on the ppc64 kernel tree on
the G5, radeonfb for some reason why displaying crap. After some
tracing, it appeared that the "fix" structure wasn't initialized
properly.

After more digging, it appeared that a different IBM 64 bits
machine experienced the same problem with 2 video cards in it
(the G5 had only one though...). Tracing on that later machine,
it appeared that the problem came from fbcon_startup() doing:

	info = registered_fb[num_registered_fb-1];	

That is, it picked the _last_ registered fbdev and called
open(), set_par(), etc.... on that (matroxfb in this case). But the
con2fbmap was full of zeros, and thus, fbcon actually used the _first_
registered fbdev (radeonfb here) to draw, thus drawing using an
fbdev on which it didn't do open, set_var, etc... with an uninitialized
"fix" structure (well, partially uninitialized).

Changing the above line to registered_fb[0] fixed it for this. The
G5 was still broken though. The symptom was exactly the same, leading
me to think it was all about a "fix" init. issue though. I didn't have
time to go deep into what was going on. I just noticed that if I added
those 2 lines in the arch code of ppc64 that we had on ppc32 and not
on ppc64, it made things work (there are executed from setup_arch(),
that is very early during the boot process):

#ifdef CONFIG_DUMMY_CONSOLE
	conswitchp = &dummy_con;
#endif

This is quite mysterious to me. It seems the fbcon layer is cery fragile
in the way it decides to initialize vs. use an fbdev. Shoud I go  back
doing what I did in early 2.5 days and just for a set_var of the default
mode from the driver themselves just before registering ?

Also, I'm having reports of similar problems when radeonfb and/or fbcon
are used as modules (that is mismatch or absent call to initial
set_var).

Ben.



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl

                 reply	other threads:[~2003-11-15  2:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1068862329.4001.40.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).