From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Petr Vandrovec <VANDROVE@vc.cvut.cz>
Cc: Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>,
akpm@osdl.org
Subject: Re: [PATCH 6/8] fbcon/fbdev: Remove fbc
Date: Wed, 3 Nov 2004 05:12:15 +0800 [thread overview]
Message-ID: <200411030512.16925.adaplas@hotpop.com> (raw)
In-Reply-To: <82235870BEB@vcnet.vc.cvut.cz>
On Tuesday 02 November 2004 19:46, Petr Vandrovec wrote:
> On 2 Nov 04 at 19:46, Antonino A. Daplas wrote:
> > diff -Nru a/drivers/video/matrox/matroxfb_base.c
> > b/drivers/video/matrox/matroxfb_base.c ---
> > a/drivers/video/matrox/matroxfb_base.c 2004-10-23 02:52:37 +08:00 +++
> > b/drivers/video/matrox/matroxfb_base.c 2004-11-01 08:32:54 +08:00 @@
> > -1877,16 +1876,21 @@
> > }
> > printk("fb%d: %s frame buffer device\n",
> > ACCESS_FBINFO(fbcon.node), ACCESS_FBINFO(fbcon.fix.id));
> > - if (ACCESS_FBINFO(fbcon.currcon) < 0) {
> > - /* there is no console on this fb... but we have to initialize
> > hardware - * until someone tells me what is proper thing to do */
> > - printk(KERN_INFO "fb%d: initializing hardware\n",
> > - ACCESS_FBINFO(fbcon.node));
> > - /* We have to use FB_ACTIVATE_FORCE, as we had to put
> > vesafb_defined to the fbcon.var - * already before, so
> > register_framebuffer works correctly. */ - vesafb_defined.activate
> > |= FB_ACTIVATE_FORCE;
> > - fb_set_var(&ACCESS_FBINFO(fbcon), &vesafb_defined);
> > - }
> > + /*
> > + * Tony: If this driver is to be mapped to the console, then
> > + * fbcon will automatically do a set_par for us. The code
> > below + * may not be needed.
> > + */
>
> Code below (which you made unconditional now) was executed if and only if
> there is no fbcon attached to this device. If there is fbcon attached
> to this device, fbcon.currcon would be >= 0 after register_framebuffer()
> (and fbcon's startup already did needed set_*). If there is no fbcon,
> this adapter is secondary, and it must be initialized too before leaving
> driver. But it must not be initialized before call to
> register_framebuffer, as otherwise taking over vgacon won't work correctly.
>
> You could put some 'ACCESS_FBINFO(flags.hw_initialized) = 1' somewhere
> into matroxfb's set_par and then test this flag instead of fbcon.currcon.
>
> But your current code probably does not work very well on primary adapter.
Why not just leave the hardware uninitialized after register_framebuffer? Then,
initialize it at the first call to xxxfb_open()? We can even check a
flag so we do this only once. This way if people accidentally enabled
matroxfb but forgot to enable fbcon, they will still get a usable vga
console.
Tony
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
next prev parent reply other threads:[~2004-11-02 21:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 11:46 [PATCH 6/8] fbcon/fbdev: Remove fbc Petr Vandrovec
2004-11-02 21:12 ` Antonino A. Daplas [this message]
2004-11-03 0:17 ` Petr Vandrovec
2004-11-03 2:37 ` Antonino A. Daplas
2004-11-03 3:15 ` Antonino A. Daplas
2004-11-03 12:05 ` Petr Vandrovec
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=200411030512.16925.adaplas@hotpop.com \
--to=adaplas@hotpop.com \
--cc=VANDROVE@vc.cvut.cz \
--cc=akpm@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.