linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* no console switching
@ 2003-11-11 13:43 Manousaridis Angelos
  2003-11-11 13:53 ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Manousaridis Angelos @ 2003-11-11 13:43 UTC (permalink / raw)
  To: fbdev

Hello,

I am trying to implement a framebuffer device without console support. I 
want to display only graphics, no text at all.

Is there a way to avoid the console take over?

I don't have the actuall graphics device yet, so I have created an 
initial version of the driver looking a lot like the vfb device.
I set the dispsw variable of the display structure to fbcon_dummy.
When I load the module I see this:

fbcon_setup: No support for fontwidth 8
fbcon_setup: type 0 (aux 0, depth 8) not supported
Console: switching to colour frame buffer device 80x30
fb0: Teralogic 751 frame buffer device

The module count increases to 63 and I cannot unload the module.

Also, what do I have to put to the owner variable of the fb_ops 
structure? The above happens with this variable se to THIS_MODULE.

If I comment this line causing the owner variable to be undefined, the 
module count does not increase and the module can be unloaded.
But It seems that the device is NOT unregistered. When I load the module 
again, I see this:

fb1: Teralogic 751 frame buffer device

the fb0 is somewhere still defined, and when I try to access it, a page 
fault occurs. Is it wrong to leave the owner variable undefined?

--
Manousaridis Angelos



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/

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

* Re: no console switching
  2003-11-11 13:43 no console switching Manousaridis Angelos
@ 2003-11-11 13:53 ` Geert Uytterhoeven
  2003-11-12 12:14   ` Manousaridis Angelos
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2003-11-11 13:53 UTC (permalink / raw)
  To: Manousaridis Angelos; +Cc: fbdev

On Tue, 11 Nov 2003, Manousaridis Angelos wrote:
> I am trying to implement a framebuffer device without console support. I 
> want to display only graphics, no text at all.
> 
> Is there a way to avoid the console take over?

Disable CONFIG_VT_CONSOLE.

> I don't have the actuall graphics device yet, so I have created an 
> initial version of the driver looking a lot like the vfb device.
> I set the dispsw variable of the display structure to fbcon_dummy.
> When I load the module I see this:
> 
> fbcon_setup: No support for fontwidth 8
> fbcon_setup: type 0 (aux 0, depth 8) not supported

That's harmless, and caused by fbcon_dummy.

> Console: switching to colour frame buffer device 80x30
> fb0: Teralogic 751 frame buffer device
> 
> The module count increases to 63 and I cannot unload the module.

Because the virtual console subsystem uses 63 virtual consoles by default, and
increases the module counter for each of them.

> Also, what do I have to put to the owner variable of the fb_ops 
> structure? The above happens with this variable se to THIS_MODULE.

That's OK.

> If I comment this line causing the owner variable to be undefined, the 
> module count does not increase and the module can be unloaded.
> But It seems that the device is NOT unregistered. When I load the module 

Your module_cleanup() routine must unregister your fb_info.

> again, I see this:
> 
> fb1: Teralogic 751 frame buffer device
> 
> the fb0 is somewhere still defined, and when I try to access it, a page 
> fault occurs. Is it wrong to leave the owner variable undefined?

Yes, that's wrong. The .owner is there to protect you from removing the module
while it's still in use.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/

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

* Re: no console switching
  2003-11-11 13:53 ` Geert Uytterhoeven
@ 2003-11-12 12:14   ` Manousaridis Angelos
  2003-11-12 12:40     ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Manousaridis Angelos @ 2003-11-12 12:14 UTC (permalink / raw)
  Cc: fbdev

Thanks for you quick reply.

Geert Uytterhoeven wrote:
> On Tue, 11 Nov 2003, Manousaridis Angelos wrote:
> 
>>I am trying to implement a framebuffer device without console support. I 
>>want to display only graphics, no text at all.
>>
>>Is there a way to avoid the console take over?
> 
> Disable CONFIG_VT_CONSOLE.

I did that. there is no change.

>>I don't have the actuall graphics device yet, so I have created an 
>>initial version of the driver looking a lot like the vfb device.
>>I set the dispsw variable of the display structure to fbcon_dummy.
>>When I load the module I see this:
>>
>>fbcon_setup: No support for fontwidth 8
>>fbcon_setup: type 0 (aux 0, depth 8) not supported
> 
> That's harmless, and caused by fbcon_dummy.
> 
>>Console: switching to colour frame buffer device 80x30
>>fb0: Teralogic 751 frame buffer device
>>
>>The module count increases to 63 and I cannot unload the module.
> 
> Because the virtual console subsystem uses 63 virtual consoles by default, and
> increases the module counter for each of them.

In the register_fremabuffer routine, this is called for the first 
framebuffer that is registered:

  take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default)

This is what I don't like. When that happens, I cannot free fb0.
There is a give_up_console function but it is never called.


>>If I comment this line causing the owner variable to be undefined, the 
>>module count does not increase and the module can be unloaded.
>>But It seems that the device is NOT unregistered. When I load the module 
> 
> 
> Your module_cleanup() routine must unregister your fb_info.
> 

It does call unregister_framebuffer, but it returns "device busy" 
because fb0 is used as the system console.

I want either to avoid this :
"Console: switching to colour frame buffer device 80x30"
(which means take_over_console will not be called)
or, if I can't do that, to be able to take back by first framebuffer 
(fb0) from the console, so that I can unregister it.

What am I missing here?

--
Manousaridis Angelos



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/

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

* Re: no console switching
  2003-11-12 12:14   ` Manousaridis Angelos
@ 2003-11-12 12:40     ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2003-11-12 12:40 UTC (permalink / raw)
  To: Manousaridis Angelos; +Cc: fbdev

On Wed, 12 Nov 2003, Manousaridis Angelos wrote:
> >>I don't have the actuall graphics device yet, so I have created an 
> >>initial version of the driver looking a lot like the vfb device.
> >>I set the dispsw variable of the display structure to fbcon_dummy.
> >>When I load the module I see this:
> >>
> >>fbcon_setup: No support for fontwidth 8
> >>fbcon_setup: type 0 (aux 0, depth 8) not supported
> > 
> > That's harmless, and caused by fbcon_dummy.
> > 
> >>Console: switching to colour frame buffer device 80x30
> >>fb0: Teralogic 751 frame buffer device
> >>
> >>The module count increases to 63 and I cannot unload the module.
> > 
> > Because the virtual console subsystem uses 63 virtual consoles by default, and
> > increases the module counter for each of them.
> 
> In the register_fremabuffer routine, this is called for the first 
> framebuffer that is registered:
> 
>   take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default)
> 
> This is what I don't like. When that happens, I cannot free fb0.
> There is a give_up_console function but it is never called.

The module counters are actually incremented in the code before
take_over_console() is called.

> >>If I comment this line causing the owner variable to be undefined, the 
> >>module count does not increase and the module can be unloaded.
> >>But It seems that the device is NOT unregistered. When I load the module 
> > 
> > 
> > Your module_cleanup() routine must unregister your fb_info.
> > 
> 
> It does call unregister_framebuffer, but it returns "device busy" 
> because fb0 is used as the system console.
> 
> I want either to avoid this :
> "Console: switching to colour frame buffer device 80x30"
> (which means take_over_console will not be called)
> or, if I can't do that, to be able to take back by first framebuffer 
> (fb0) from the console, so that I can unregister it.
> 
> What am I missing here?

Comment out the code to increment the module counters and the code that calls
take_over_console().

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/

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

end of thread, other threads:[~2003-11-12 12:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11 13:43 no console switching Manousaridis Angelos
2003-11-11 13:53 ` Geert Uytterhoeven
2003-11-12 12:14   ` Manousaridis Angelos
2003-11-12 12:40     ` Geert Uytterhoeven

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