linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 6/8] fbcon/fbdev: Remove fbc
@ 2004-11-02 11:46 Petr Vandrovec
  2004-11-02 21:12 ` Antonino A. Daplas
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Vandrovec @ 2004-11-02 11:46 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Linux Fbdev development list, akpm

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.
                                                    Petr

> +   /* 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);
> +
>     return 0;
>  failVideoIO:;
>     matroxfb_g450_shutdown(PMINFO2);



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-03 12:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-02 11:46 [PATCH 6/8] fbcon/fbdev: Remove fbc Petr Vandrovec
2004-11-02 21:12 ` Antonino A. Daplas
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

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).